#113: Delete and rename in one revision
---------------------+------------------------------------------------------
Reporter: nijel | Owner: lele
Type: defect | Status: new
Priority: major | Milestone: VersionOne
Component: svn | Version: 0.9
Resolution: | Keywords:
---------------------+------------------------------------------------------
Comment(by HenryN):
Found the problem for Monotone as Source.
The changese for rename must be inserted before the changeset for delete.
I'm not shure, perhaps should be do this better outside of the monotone.py
module, because all other reposities would have this problem.
Here is the Parch monotone-dir-move-and-del.patch for Monotone:
{{{
--- tailor-Darcs/vcpx/repository/monotone.py
+++ tailor-Darcs/vcpx/repository/monotone.py
@@ -556,7 +556,23 @@
self.repository.log.warning("Can not rename
'%s' to "
"'%s' self" %
(fname, newname))
else:
- chentry = chset.addEntry(newname[1:-1],
chset.revision)
+
+ # From this commands:
+ # mtn rename dir/file file
+ # mtn drop dir
+ # Has output:
+ # delete "dir"
+ # rename "dir/file"
+ # to "file"
+ #
+ # Fix this by insert the RENAME before the
DELETE.
+ before = None
+ for i,e in enumerate(chset.entries):
+ if e.action_kind == e.DELETED and
fname[1:-1].startswith(e.name):
+ before = e
+ break
+
+ chentry = chset.addEntry(newname[1:-1],
chset.revision, before)
chentry.action_kind = chentry.RENAMED
chentry.old_name= fname[1:-1]
elif token == "patch":
}}}
--
Ticket URL: <http://progetti.arstecnica.it/tailor/ticket/113#comment:3>
Tailor <http://progetti.arstecnica.it/tailor>
An inter-VCs changeset exchanger
_______________________________________________
Tailor mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/tailor