Rev 6366: (gz) Fix bzr mv error report on bzr mv of a removed non-ascii file (Martin in file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/

Patch Queue Manager pqm at pqm.ubuntu.com
Wed Dec 14 15:54:00 UTC 2011


At file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 6366 [merge]
revision-id: pqm at pqm.ubuntu.com-20111214155359-u6b2wjk5efk20g06
parent: pqm at pqm.ubuntu.com-20111214125359-l2d2nv046utd1vfz
parent: martin.packman at canonical.com-20111206123654-0c1jlu0usq50xuvs
committer: Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2011-12-14 15:53:59 +0000
message:
  (gz) Fix bzr mv error report on bzr mv of a removed non-ascii file (Martin
   Packman)
modified:
  bzrlib/tests/blackbox/test_mv.py test_mv.py-20060705114902-33tkxz0o9cdshemo-1
  bzrlib/workingtree.py          workingtree.py-20050511021032-29b6ec0a681e02e3
=== modified file 'bzrlib/tests/blackbox/test_mv.py'
--- a/bzrlib/tests/blackbox/test_mv.py	2011-10-17 13:40:28 +0000
+++ b/bzrlib/tests/blackbox/test_mv.py	2011-12-06 12:36:26 +0000
@@ -521,3 +521,14 @@
         self.build_tree([u"\xA7"])
         out, err = self.run_bzr_error(["Could not rename", "not versioned"],
             ["mv", u"\xA7", "b"])
+
+    def test_mv_removed_non_ascii(self):
+        """Clear error on mv of a removed non-ascii file, see lp:898541"""
+        self.requireFeature(UnicodeFilenameFeature)
+        tree = self.make_branch_and_tree(".")
+        self.build_tree([u"\xA7"])
+        tree.add([u"\xA7"])
+        tree.commit(u"Adding \xA7")
+        os.remove(u"\xA7")
+        out, err = self.run_bzr_error(["Could not rename", "not exist"],
+            ["mv", u"\xA7", "b"])

=== modified file 'bzrlib/workingtree.py'
--- a/bzrlib/workingtree.py	2011-12-07 14:03:01 +0000
+++ b/bzrlib/workingtree.py	2011-12-14 15:53:59 +0000
@@ -2795,9 +2795,8 @@
                 # something is wrong, so lets determine what exactly
                 if not self.has_filename(from_rel) and \
                    not self.has_filename(to_rel):
-                    raise errors.BzrRenameFailedError(from_rel,to_rel,
-                        errors.PathsDoNotExist(paths=(str(from_rel),
-                        str(to_rel))))
+                    raise errors.BzrRenameFailedError(from_rel, to_rel,
+                        errors.PathsDoNotExist(paths=(from_rel, to_rel)))
                 else:
                     raise errors.RenameFailedFilesExist(from_rel, to_rel)
             rename_entry.only_change_inv = only_change_inv




More information about the bazaar-commits mailing list