~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2016-02-01 19:13:13 UTC
  • mfrom: (6614.2.2 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20160201191313-wdfvmfff1djde6oq
(vila) Release 2.7.0 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005-2011, 2013, 2016 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.assertEquals(out, 'modified:\n  a\n')
 
66
        self.assertEqual(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.assertEquals(['a1'], checkout_tree.get_parent_ids())
109
 
        self.assertEquals('a1', wt.branch.last_revision())
110
 
        self.assertEquals(['a2'], wt.get_parent_ids())
 
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())
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.assertEquals({}, tree.branch.tags.get_tag_dict())
 
290
        self.assertEqual({}, 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.assertEquals({"atag": revid}, tree.branch.tags.get_tag_dict())
 
297
        self.assertEqual({"atag": revid}, tree.branch.tags.get_tag_dict())
298
298
 
299
299
 
300
300
class TestSmartServerUncommit(TestCaseWithTransport):