~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Ross Lagerwall
  • Date: 2012-08-07 06:32:51 UTC
  • mto: (6437.63.5 2.5)
  • mto: This revision was merged to the branch mainline in revision 6558.
  • Revision ID: rosslagerwall@gmail.com-20120807063251-x9p03ghg2ws8oqjc
Add bzrlib/locale to .bzrignore

bzrlib/locale is generated with ./setup.py build_mo which is in turn called
by ./setup.py build

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2011, 2013, 2016 Canonical Ltd
 
1
# Copyright (C) 2005-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
63
63
        # This should look like we are back in revno 1
64
64
        self.assertEqual(['a1'], wt.get_parent_ids())
65
65
        out, err = self.run_bzr('status')
66
 
        self.assertEqual(out, 'modified:\n  a\n')
 
66
        self.assertEquals(out, 'modified:\n  a\n')
67
67
 
68
68
    def test_uncommit_interactive(self):
69
69
        """Uncommit seeks confirmation, and doesn't proceed without it."""
105
105
 
106
106
        # uncommit in a checkout should uncommit the parent branch
107
107
        # (but doesn't effect the other working tree)
108
 
        self.assertEqual(['a1'], checkout_tree.get_parent_ids())
109
 
        self.assertEqual('a1', wt.branch.last_revision())
110
 
        self.assertEqual(['a2'], wt.get_parent_ids())
 
108
        self.assertEquals(['a1'], checkout_tree.get_parent_ids())
 
109
        self.assertEquals('a1', wt.branch.last_revision())
 
110
        self.assertEquals(['a2'], wt.get_parent_ids())
111
111
 
112
112
    def test_uncommit_bound(self):
113
113
        os.mkdir('a')
287
287
        revid = tree.commit('message')
288
288
        tree.branch.tags.set_tag("atag", revid)
289
289
        out, err = self.run_bzr('uncommit --force tree')
290
 
        self.assertEqual({}, tree.branch.tags.get_tag_dict())
 
290
        self.assertEquals({}, tree.branch.tags.get_tag_dict())
291
291
 
292
292
    def test_uncommit_keep_tags(self):
293
293
        tree = self.make_branch_and_tree('tree')
294
294
        revid = tree.commit('message')
295
295
        tree.branch.tags.set_tag("atag", revid)
296
296
        out, err = self.run_bzr('uncommit --keep-tags --force tree')
297
 
        self.assertEqual({"atag": revid}, tree.branch.tags.get_tag_dict())
 
297
        self.assertEquals({"atag": revid}, tree.branch.tags.get_tag_dict())
298
298
 
299
299
 
300
300
class TestSmartServerUncommit(TestCaseWithTransport):
314
314
        self.assertLength(14, self.hpss_calls)
315
315
        self.assertLength(1, self.hpss_connections)
316
316
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)
317
 
 
318
 
 
319
 
class TestInconsistentDelta(TestCaseWithTransport):
320
 
    # See https://bugs.launchpad.net/bzr/+bug/855155
321
 
    # See https://bugs.launchpad.net/bzr/+bug/1100385
322
 
    # bzr uncommit may result in error
323
 
    # 'An inconsistent delta was supplied involving'
324
 
 
325
 
    def test_inconsistent_delta(self):
326
 
        # Script taken from https://bugs.launchpad.net/bzr/+bug/855155/comments/26
327
 
        wt = self.make_branch_and_tree('test')
328
 
        self.build_tree(['test/a/', 'test/a/b', 'test/a/c'])
329
 
        wt.add(['a', 'a/b', 'a/c'])
330
 
        wt.commit('initial commit', rev_id='a1')
331
 
        wt.remove(['a/b', 'a/c'])
332
 
        wt.commit('remove b and c', rev_id='a2')
333
 
        self.run_bzr("uncommit --force test")