~lifeless/bzr/index.range_map

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_missing.py

  • Committer: Robert Collins
  • Date: 2008-06-19 01:17:19 UTC
  • mfrom: (3218.1.277 +trunk)
  • Revision ID: robertc@robertcollins.net-20080619011719-1c4g4uxzzhdls2wf
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
        lines2 = self.run_bzr('missing ../b --mine-only', retcode=1)[0]
78
78
        lines2 = lines2.splitlines()
79
79
        self.assertEqual(lines, lines2)
80
 
        lines3 = self.run_bzr('missing ../b --theirs-only', retcode=1)[0]
81
 
        lines3 = lines3.splitlines()
82
 
        self.assertEqual(0, len(lines3))
 
80
        lines3 = self.run_bzr('missing ../b --theirs-only', retcode=0)[0]
 
81
        self.assertEqualDiff('Other branch is up to date.\n', lines3)
83
82
 
84
83
        # relative to a, missing the 'merge' commit 
85
84
        os.chdir('../b')
89
88
        lines2 = self.run_bzr('missing ../a --theirs-only', retcode=1)[0]
90
89
        lines2 = lines2.splitlines()
91
90
        self.assertEqual(lines, lines2)
92
 
        lines3 = self.run_bzr('missing ../a --mine-only', retcode=1)[0]
93
 
        lines3 = lines3.splitlines()
94
 
        self.assertEqual(0, len(lines3))
 
91
        lines3 = self.run_bzr('missing ../a --mine-only', retcode=0)[0]
 
92
        self.assertEqualDiff('This branch is up to date.\n', lines3)
95
93
        lines4 = self.run_bzr('missing ../a --short', retcode=1)[0]
96
94
        lines4 = lines4.splitlines()
97
95
        self.assertEqual(4, len(lines4))
109
107
        self.assertEqual("modified:", lines8[-2])
110
108
        self.assertEqual("  a", lines8[-1])
111
109
 
 
110
        os.chdir('../a')
 
111
        self.assertEqualDiff('Other branch is up to date.\n',
 
112
                             self.run_bzr('missing ../b --theirs-only')[0])
 
113
 
112
114
        # after a pull we're back on track
113
115
        b_tree.pull(a_branch)
114
 
        self.assertEqual("Branches are up to date.\n", self.run_bzr('missing ../a')[0])
 
116
        self.assertEqualDiff("Branches are up to date.\n",
 
117
                             self.run_bzr('missing ../b')[0])
 
118
        os.chdir('../b')
 
119
        self.assertEqualDiff('Branches are up to date.\n',
 
120
                             self.run_bzr('missing ../a')[0])
 
121
        # If you supply mine or theirs you only know one side is up to date
 
122
        self.assertEqualDiff('This branch is up to date.\n',
 
123
                             self.run_bzr('missing ../a --mine-only')[0])
 
124
        self.assertEqualDiff('Other branch is up to date.\n',
 
125
                             self.run_bzr('missing ../a --theirs-only')[0])
115
126
 
116
127
    def test_missing_check_last_location(self):
117
128
        # check that last location shown as filepath not file URL