~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-11-04 18:51:39 UTC
  • mfrom: (2961.1.1 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20071104185139-kaio3sneodg2kp71
Authentication ring implementation (read-only)

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=0)[0]
81
 
        self.assertEqualDiff('Other branch is up to date.\n', lines3)
 
80
        lines3 = self.run_bzr('missing ../b --theirs-only', retcode=1)[0]
 
81
        lines3 = lines3.splitlines()
 
82
        self.assertEqual(0, len(lines3))
82
83
 
83
84
        # relative to a, missing the 'merge' commit 
84
85
        os.chdir('../b')
88
89
        lines2 = self.run_bzr('missing ../a --theirs-only', retcode=1)[0]
89
90
        lines2 = lines2.splitlines()
90
91
        self.assertEqual(lines, lines2)
91
 
        lines3 = self.run_bzr('missing ../a --mine-only', retcode=0)[0]
92
 
        self.assertEqualDiff('This branch is up to date.\n', lines3)
 
92
        lines3 = self.run_bzr('missing ../a --mine-only', retcode=1)[0]
 
93
        lines3 = lines3.splitlines()
 
94
        self.assertEqual(0, len(lines3))
93
95
        lines4 = self.run_bzr('missing ../a --short', retcode=1)[0]
94
96
        lines4 = lines4.splitlines()
95
97
        self.assertEqual(4, len(lines4))
107
109
        self.assertEqual("modified:", lines8[-2])
108
110
        self.assertEqual("  a", lines8[-1])
109
111
 
110
 
        os.chdir('../a')
111
 
        self.assertEqualDiff('Other branch is up to date.\n',
112
 
                             self.run_bzr('missing ../b --theirs-only')[0])
113
 
 
114
112
        # after a pull we're back on track
115
113
        b_tree.pull(a_branch)
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])
 
114
        self.assertEqual("Branches are up to date.\n", self.run_bzr('missing ../a')[0])
126
115
 
127
116
    def test_missing_check_last_location(self):
128
117
        # check that last location shown as filepath not file URL
142
131
 
143
132
        # check last location
144
133
        lines, err = self.run_bzr('missing', working_dir='../b')
145
 
        self.assertEquals('Using saved parent location: %s\n'
 
134
        self.assertEquals('Using last location: %s\n'
146
135
                          'Branches are up to date.\n' % location,
147
136
                          lines)
148
137
        self.assertEquals('', err)