[MERGE][Bug #85237] Improve the message given when 'mv --after' should be used
Daniel Watkins
dwatkins.gcode at gmail.com
Wed Nov 7 07:51:38 GMT 2007
As someone has already voted on this, I won't resubmit. The patch
portion of the bundle being voted on is below. Apologies again for any
inconvenience.
# Begin patch
=== modified file 'NEWS'
--- NEWS 2007-11-06 11:11:18 +0000
+++ NEWS 2007-11-06 13:50:43 +0000
@@ -64,6 +64,9 @@
* Wrap medusa ftp test server as an FTPServer feature.
(Vincent Ladeuil, #157752)
+ * The error message when ``move --after`` should be used makes how to do so
+ clearer. (Daniel Watkins, #85237)
+
API BREAKS:
* ``osutils.backup_file`` is deprecated. Actually it's not used in bzrlib
=== modified file 'bzrlib/tests/blackbox/test_mv.py'
--- bzrlib/tests/blackbox/test_mv.py 2007-11-01 09:52:45 +0000
+++ bzrlib/tests/blackbox/test_mv.py 2007-11-06 04:33:38 +0000
@@ -272,7 +272,8 @@
self.build_tree(['a']) #touch a
self.run_bzr_error(
["^bzr: ERROR: Could not rename a => b because both files exist."
- " \(Use --after to update the Bazaar id\)$"],
+ " \(Use --after to tell bzr about a rename that has already"
+ " happened\)$"],
'mv a b')
self.failUnlessExists('a')
self.failUnlessExists('b')
@@ -320,8 +321,9 @@
self.build_tree(['a2']) #touch a2
self.run_bzr_error(
- ["^bzr: ERROR: Could not rename a1 => sub/a1 because both files exist."
- " \(Use --after to update the Bazaar id\)$"],
+ ["^bzr: ERROR: Could not rename a1 => sub/a1 because both files"
+ " exist. \(Use --after to tell bzr about a rename that has already"
+ " happened\)$"],
'mv a1 a2 sub')
self.failUnlessExists('a1')
self.failUnlessExists('a2')
=== modified file 'bzrlib/workingtree.py'
--- bzrlib/workingtree.py 2007-11-03 09:39:11 +0000
+++ bzrlib/workingtree.py 2007-11-06 04:30:57 +0000
@@ -1327,7 +1327,8 @@
str(to_rel))))
else:
raise errors.RenameFailedFilesExist(from_rel, to_rel,
- extra="(Use --after to update the Bazaar id)")
+ extra="(Use --after to tell bzr about a rename that has"
+ " already happened)")
rename_entry.only_change_inv = only_change_inv
return rename_entries
=== modified file 'bzrlib/workingtree_4.py'
--- bzrlib/workingtree_4.py 2007-11-05 19:40:28 +0000
+++ bzrlib/workingtree_4.py 2007-11-06 04:30:57 +0000
@@ -721,7 +721,8 @@
move_file = False
elif not after:
raise errors.RenameFailedFilesExist(from_rel, to_rel,
- extra="(Use --after to update the Bazaar id)")
+ extra="(Use --after to tell bzr about a rename that has"
+ " already happened)")
rollbacks = []
def rollback_rename():
--
Daniel Watkins (Odd_Bloke)
University of Warwick Christian Focus President
University of Warwick Computing Society WUGLUG Liaison Officer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071107/ea27e077/attachment.pgp
More information about the bazaar
mailing list