Rev 4516: (mbp) add xfail tests for bug 395556 in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed Jul 8 07:29:56 BST 2009


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 4516 [merge]
revision-id: pqm at pqm.ubuntu.com-20090708062954-l77om4r4z10qvfos
parent: pqm at pqm.ubuntu.com-20090708012443-fd0130qlk7tfjy2q
parent: mbp at sourcefrog.net-20090708052706-4mf1303c061zhqc9
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2009-07-08 07:29:54 +0100
message:
  (mbp) add xfail tests for bug 395556
modified:
  bzrlib/tests/blackbox/test_commit.py test_commit.py-20060212094538-ae88fc861d969db0
  bzrlib/tests/workingtree_implementations/test_commit.py test_commit.py-20060421013633-1610ec2331c8190f
=== modified file 'bzrlib/tests/blackbox/test_commit.py'
--- a/bzrlib/tests/blackbox/test_commit.py	2009-05-12 04:29:32 +0000
+++ b/bzrlib/tests/blackbox/test_commit.py	2009-07-08 05:27:06 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2006, 2007 Canonical Ltd
+# Copyright (C) 2005, 2006, 2007, 2009 Canonical Ltd
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -639,3 +639,25 @@
         out, err = self.run_bzr("commit tree/hello.txt")
         last_rev = tree.branch.repository.get_revision(tree.last_revision())
         self.assertEqual('save me some typing\n', last_rev.message)
+
+    def test_commit_and_mv_dance_a(self):
+        # see https://bugs.launchpad.net/bzr/+bug/395556
+        tree = self.make_branch_and_tree(".")
+        self.build_tree(["a"])
+        tree.add("a")
+        self.check_output("a => b\n", ["mv", "a", "b"])
+        self.check_output("", ["commit", "-q", "-m", "Actually no, b"])
+        self.check_output("b => a\n", ["mv", "b", "a"])
+        self.check_output("", ["commit", "-q", "-m", "No, really, a"])
+
+    def test_commit_and_mv_dance_b(self):
+        # see https://bugs.launchpad.net/bzr/+bug/395556
+        tree = self.make_branch_and_tree(".")
+        self.build_tree(["b"])
+        tree.add("b")
+        self.check_output("b => a\n", ["mv", "b", "a"])
+        self.check_output("", ["commit", "-q", "-m", "Actually no, a"])
+        self.check_output("a => b\n", ["mv", "a", "b"])
+        self.expectFailure("bug 395556: gives DuplicateFileId "
+            "committing renames",
+            self.check_output, "", ["commit", "-q", "-m", "No, really, b"])

=== modified file 'bzrlib/tests/workingtree_implementations/test_commit.py'
--- a/bzrlib/tests/workingtree_implementations/test_commit.py	2009-03-27 04:10:25 +0000
+++ b/bzrlib/tests/workingtree_implementations/test_commit.py	2009-07-08 05:27:06 +0000
@@ -602,3 +602,29 @@
         revid = tree.commit('first post')
         committed_tree = tree.basis_tree()
         self.assertTrue(committed_tree.has_filename("newfile"))
+
+    def test_commit_and_mv_dance_a(self):
+        # should fail because of
+        # <https://bugs.launchpad.net/bzr/+bug/395556> but apparently does
+        # not, while the blackbox.test_commit equivalent does - maybe because
+        # of different format combinations
+        tree = self.make_branch_and_tree(".")
+        self.build_tree(["a"])
+        tree.add("a")
+        tree.rename_one("a", "b")
+        tree.commit("Actually no, b")
+        tree.rename_one("b", "a")
+        tree.commit("No, really, a")
+
+    def test_commit_and_mv_dance_b(self):
+        # should fail because of
+        # <https://bugs.launchpad.net/bzr/+bug/395556> but apparently does
+        # not, while the blackbox.test_commit equivalent does - maybe because
+        # of different format combinations
+        tree = self.make_branch_and_tree(".")
+        self.build_tree(["b"])
+        tree.add("b")
+        tree.rename_one("b", "a")
+        tree.commit("Actually no, a")
+        tree.rename_one("a", "b")
+        tree.commit("No, really, b")




More information about the bazaar-commits mailing list