#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):

 Yes, it exist also in version 0.9.28

 You should say, that dir2 exist before, and a and b are files.

 Have two test scripts, that triggers it
 http://www.henrynestler.com/tailor/test-scripts/test-mtn2mtn-#113
 -directory-deletion-and-rename.sh

 http://www.henrynestler.com/tailor/test-scripts/test-mtn2svn-#113
 -directory-deletion-and-rename.sh

 {{{
 ERROR:
 # 07:45:19 [I] testdir/rootdir/mtn2side $ mtn drop --recursive -- dir1
 # 07:45:19 [I] [Ok]
 # Error stream:
 # mtn: dropping dir1/b from workspace manifest
 # mtn: dropping dir1/a from workspace manifest
 # mtn: dropping dir1 from workspace manifest
 # 07:45:19 [I] testdir/rootdir/mtn2side $ mtn rename -- dir1/a dir2/a
 # 07:45:19 [W] [Status 1]
 # Error stream:
 # mtn: misuse: source file dir1/a is not versioned
 # 07:45:19 [E] Failure replaying: Revision:
 603a9ccf04cfd6ec7e991a15b51f7effe34b95bc
 # Date: 2007-06-15 05:45:17+00:00
 # Author: key-dummy
 # Entries: dir1(DEL at 603a9ccf04cfd6ec7e991a15b51f7effe34b95bc),
 dir2/a(REN from dir1/a), dir2/b(REN from dir1/b)
 # Log: remove file and than directory
 #
 # linearized ancestor: 8e735146388c89dc3335c87ec40778fd13c1eb8f
 # real ancestor(s): 8e735146388c89dc3335c87ec40778fd13c1eb8f
 # Traceback (most recent call last):
 #   File "tailor-0.9.28-henry/vcpx/target.py", line 117, in
 replayChangeset
 #     self._replayChangeset(changeset)
 #   File "tailor-0.9.28-henry/vcpx/target.py", line 320, in
 _replayChangeset
 #     action(group)
 #   File "tailor-0.9.28-henry/vcpx/target.py", line 477, in _renameEntries
 #     self._renamePathname(e.old_name, e.name)
 #   File "tailor-0.9.28-henry/vcpx/repository/monotone.py", line 971, in
 _renamePathname
 #     raise ChangesetApplicationFailure(
 # ChangesetApplicationFailure: testdir/rootdir/mtn2side $ mtn rename --
 dir1/a dir2/a returned status 1
 ----------------

 Implementation should:
 Sort the DEL and REN entries by pathname (bottom up), from longest down to
 shortest dirname.
 But must use the oldpath of REN (not the new name!).
 1. REN from dir2/a
 2. REN from dir1/a
 3. DEL      dir1

 This should also work for multiple DEL of directories, for example:
 1. REN from dir3/dir2/dir1/file
 2. DEL      dir3/dir2/dir1
 3. DEL      dir3/dir2
 }}}

-- 
Ticket URL: <http://progetti.arstecnica.it/tailor/ticket/113#comment:2>
Tailor <http://progetti.arstecnica.it/tailor>
An inter-VCs changeset exchanger
_______________________________________________
Tailor mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/tailor

Reply via email to