74
74
# get extra revision from b
76
bzr('commit -m merge')
76
bzr('commit', '-m', 'merge')
78
78
# compare again, but now we have the 'merge' commit extra
79
lines = bzr('missing ../b', retcode=1).splitlines()
79
lines = bzr('missing', '../b', retcode=1).splitlines()
80
80
self.assertEqual("You have 1 extra revision(s):", lines[0])
81
81
self.assertEqual(8, len(lines))
82
lines2 = bzr('missing ../b --mine-only', retcode=1)
82
lines2 = bzr('missing', '../b', '--mine-only', retcode=1)
83
83
lines2 = lines2.splitlines()
84
84
self.assertEqual(lines, lines2)
85
lines3 = bzr('missing ../b --theirs-only', retcode=1)
85
lines3 = bzr('missing', '../b', '--theirs-only', retcode=1)
86
86
lines3 = lines3.splitlines()
87
87
self.assertEqual(0, len(lines3))
89
89
# relative to a, missing the 'merge' commit
91
lines = bzr('missing ../a', retcode=1).splitlines()
91
lines = bzr('missing', '../a', retcode=1).splitlines()
92
92
self.assertEqual(missing, lines[0])
93
93
self.assertEqual(8, len(lines))
94
lines2 = bzr('missing ../a --theirs-only', retcode=1)
94
lines2 = bzr('missing', '../a', '--theirs-only', retcode=1)
95
95
lines2 = lines2.splitlines()
96
96
self.assertEqual(lines, lines2)
97
lines3 = bzr('missing ../a --mine-only', retcode=1)
97
lines3 = bzr('missing', '../a', '--mine-only', retcode=1)
98
98
lines3 = lines3.splitlines()
99
99
self.assertEqual(0, len(lines3))
100
lines4 = bzr('missing ../a --short', retcode=1)
100
lines4 = bzr('missing', '../a', '--short', retcode=1)
101
101
lines4 = lines4.splitlines()
102
102
self.assertEqual(4, len(lines4))
103
lines5 = bzr('missing ../a --line', retcode=1)
103
lines5 = bzr('missing', '../a', '--line', retcode=1)
104
104
lines5 = lines5.splitlines()
105
105
self.assertEqual(2, len(lines5))
106
lines6 = bzr('missing ../a --reverse', retcode=1)
106
lines6 = bzr('missing', '../a', '--reverse', retcode=1)
107
107
lines6 = lines6.splitlines()
108
108
self.assertEqual(lines6, lines)
109
lines7 = bzr('missing ../a --show-ids', retcode=1)
109
lines7 = bzr('missing', '../a', '--show-ids', retcode=1)
110
110
lines7 = lines7.splitlines()
111
111
self.assertEqual(11, len(lines7))
112
lines8 = bzr('missing ../a --verbose', retcode=1)
112
lines8 = bzr('missing', '../a', '--verbose', retcode=1)
113
113
lines8 = lines8.splitlines()
114
114
self.assertEqual("modified:", lines8[-2])
115
115
self.assertEqual(" a", lines8[-1])
117
118
# after a pull we're back on track
119
self.assertEqual("Branches are up to date.\n", bzr('missing ../a'))
120
self.assertEqual("Branches are up to date.\n",
121
bzr('missing', '../a'))
121
123
def test_missing_check_last_location(self):
122
124
# check that last location shown as filepath not file URL