1
# Copyright (C) 2005, 2006, 2007 Canonical Ltd
1
# Copyright (C) 2005, 2006, 2007, 2009 Canonical Ltd
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
639
639
out, err = self.run_bzr("commit tree/hello.txt")
640
640
last_rev = tree.branch.repository.get_revision(tree.last_revision())
641
641
self.assertEqual('save me some typing\n', last_rev.message)
643
def test_commit_and_mv_dance_a(self):
644
# see https://bugs.launchpad.net/bzr/+bug/395556
645
tree = self.make_branch_and_tree(".")
646
self.build_tree(["a"])
648
self.check_output("a => b\n", ["mv", "a", "b"])
649
self.check_output("", ["commit", "-q", "-m", "Actually no, b"])
650
self.check_output("b => a\n", ["mv", "b", "a"])
651
self.check_output("", ["commit", "-q", "-m", "No, really, a"])
653
def test_commit_and_mv_dance_b(self):
654
# see https://bugs.launchpad.net/bzr/+bug/395556
655
tree = self.make_branch_and_tree(".")
656
self.build_tree(["b"])
658
self.check_output("b => a\n", ["mv", "b", "a"])
659
self.check_output("", ["commit", "-q", "-m", "Actually no, a"])
660
self.check_output("a => b\n", ["mv", "a", "b"])
661
self.expectFailure("bug 395556: gives DuplicateFileId "
662
"committing renames",
663
self.check_output, "", ["commit", "-q", "-m", "No, really, b"])