#170: BzrRenameFailedError: Could not rename...
---------------------+------------------------------------------------------
  Reporter:  gour    |       Owner:  lele      
      Type:  defect  |      Status:  new       
  Priority:  major   |   Milestone:  VersionOne
 Component:  tailor  |     Version:  0.9       
Resolution:          |    Keywords:            
---------------------+------------------------------------------------------

Comment(by lele):

 Apparently the same problem, reported on IRC by zombat: the following
 configuration
 {{{
 [DEFAULT]
 verbose = True

 [project]
 target = bzr:target
 start-revision = INITIAL
 root-directory = /tmp/attitude
 state-file = tailor.state
 source = darcs:source

 [bzr:target]
 subdir = bzrsize

 [darcs:source]
 subdir = darcsside
 repository = http://zombat.de/code/attitude
 }}}

 stops at revision 36 with this error
 {{{
 15:08:31 [I] Changeset #36
 15:08:31 [I] Upstream revision "template ordner verschoben" by Thomas Bilk
 <[email protected]>, 2008-07-26 16:56:21+00:00
 15:08:31 [I] /tmp/attitude/darcsside $ darcs pull --all --quiet --match
 "hash 20080726165621-0909a-c9bd6934d98cae80b2dd4c36164796495471efc5.gz"
 2>&1
 15:08:33 [I] [Ok]
 15:08:33 [I] /tmp/attitude/darcsside $ darcs changes --match "hash
 20080726165621-0909a-c9bd6934d98cae80b2dd4c36164796495471efc5.gz" --xml-
 output --summ
 15:08:33 [I] [Ok]
 15:08:33 [I] $ rsync --archive --exclude _darcs --exclude .bzr
 /tmp/attitude/darcsside/ /tmp/attitude/bzrsize
 15:08:33 [I] [Ok]
 15:08:33 [I] Renaming u'website/templates' to u'templates'...
 15:08:33 [I] Renaming u'templates/entry.html' to
 u'templates/website/entry.html'...
 15:08:33 [E] Failure replaying: Revision: template ordner verschoben
 Date: 2008-07-26 16:56:21+00:00
 Author: Thomas Bilk <[email protected]>
 Entries: templates(REN from website/templates)
          templates/website[DIR](ADD)
          templates/website/entry.html(REN from templates/entry.html)
          templates/website/imprint-ie.html(REN from templates/imprint-
 ie.html)
          templates/website/imprint.html(REN from templates/imprint.html)
          templates/website/index-ie.html(REN from templates/index-ie.html)
          templates/website/index.html(REN from templates/index.html)
          templates/website/laden-ie.html(REN from templates/laden-ie.html)
          templates/website/laden.html(REN from templates/laden.html)
          templates/spotguide[DIR](ADD)
          templates/spotguide/gallery.html(REN from
 spotguide/templates/gallery.html)
          templates/spotguide/map.html(REN from
 spotguide/templates/map.html)
          templates/spotguide/setspot.html(REN from
 spotguide/templates/setspot.html)
          spotguide/models.py(UPD)
          spotguide/templates/base.html(DEL)
          spotguide/templates[DIR](DEL)
          spotguide/views.py(UPD)
          website/views.py(UPD)
 Log:
 Traceback (most recent call last):
   File "/home/lele/wip/tailor/tailor.hashed/vcpx/target.py", line 134, in
 replayChangeset
     self._replayChangeset(changeset)
   File "/home/lele/wip/tailor/tailor.hashed/vcpx/target.py", line 330, in
 _replayChangeset
     action(group)
   File "/home/lele/wip/tailor/tailor.hashed/vcpx/target.py", line 502, in
 _renameEntries
     self._renamePathname(e.old_name, e.name)
   File "/home/lele/wip/tailor/tailor.hashed/vcpx/repository/bzr.py", line
 411, in _renamePathname
     self._working_tree.rename_one(oldname, newname)
   File "/usr/local/lib/python2.5/site-packages/bzrlib/mutabletree.py",
 line 52, in tree_write_locked
     return unbound(self, *args, **kwargs)
   File "/usr/local/lib/python2.5/site-packages/bzrlib/workingtree_4.py",
 line 1234, in rename_one
     WorkingTree.rename_one(self, from_rel, to_rel, after)
   File "/usr/local/lib/python2.5/site-packages/bzrlib/mutabletree.py",
 line 52, in tree_write_locked
     return unbound(self, *args, **kwargs)
   File "/usr/local/lib/python2.5/site-packages/bzrlib/workingtree.py",
 line 1401, in rename_one
     rename_entries = self._determine_mv_mode(rename_entries, after)
   File "/usr/local/lib/python2.5/site-packages/bzrlib/workingtree.py",
 line 1301, in _determine_mv_mode
     str(to_rel))))
 BzrRenameFailedError: Could not rename entry.html => entry.html: Path(s)
 do not exist: templates/entry.html templates/website/entry.html
 15:08:33 [C] Couldn't replay changeset:
 Revision: template ordner verschoben
 Date: 2008-07-26 16:56:21+00:00
 Author: Thomas Bilk <[email protected]>
 Entries: templates(REN from website/templates)
          templates/website[DIR](ADD)
          templates/website/entry.html(REN from templates/entry.html)
          templates/website/imprint-ie.html(REN from templates/imprint-
 ie.html)
          templates/website/imprint.html(REN from templates/imprint.html)
          templates/website/index-ie.html(REN from templates/index-ie.html)
          templates/website/index.html(REN from templates/index.html)
          templates/website/laden-ie.html(REN from templates/laden-ie.html)
          templates/website/laden.html(REN from templates/laden.html)
          templates/spotguide[DIR](ADD)
          templates/spotguide/gallery.html(REN from
 spotguide/templates/gallery.html)
          templates/spotguide/map.html(REN from
 spotguide/templates/map.html)
          templates/spotguide/setspot.html(REN from
 spotguide/templates/setspot.html)
          spotguide/models.py(UPD)
          spotguide/templates/base.html(DEL)
          spotguide/templates[DIR](DEL)
          spotguide/views.py(UPD)
          website/views.py(UPD)
 Log:
 15:08:33 [I] 147 pending changesets in state file
 15:08:33 [C] Upstream change application failed: Could not rename
 entry.html => entry.html: Path(s) do not exist: templates/entry.html
 templates/website/entry.html
 15:08:33 [C] Something unexpected!
 Traceback (most recent call last):
   File "/home/lele/wip/tailor/tailor.hashed/vcpx/tailor.py", line 156, in
 __call__
     self.update()
   File "/home/lele/wip/tailor/tailor.hashed/vcpx/tailor.py", line 120, in
 update
     applyable=self._applyable, applied=self._applied)
   File "/home/lele/wip/tailor/tailor.hashed/vcpx/dualwd.py", line 102, in
 applyPendingChangesets
     applied=applied)
   File "/home/lele/wip/tailor/tailor.hashed/vcpx/source.py", line 136, in
 applyPendingChangesets
     replay(c)
   File "/home/lele/wip/tailor/tailor.hashed/vcpx/dualwd.py", line 113, in
 replayChangeset
     self.target.replayChangeset(changeset)
   File "/home/lele/wip/tailor/tailor.hashed/vcpx/target.py", line 134, in
 replayChangeset
     self._replayChangeset(changeset)
   File "/home/lele/wip/tailor/tailor.hashed/vcpx/target.py", line 330, in
 _replayChangeset
     action(group)
   File "/home/lele/wip/tailor/tailor.hashed/vcpx/target.py", line 502, in
 _renameEntries
     self._renamePathname(e.old_name, e.name)
   File "/home/lele/wip/tailor/tailor.hashed/vcpx/repository/bzr.py", line
 411, in _renamePathname
     self._working_tree.rename_one(oldname, newname)
   File "/usr/local/lib/python2.5/site-packages/bzrlib/mutabletree.py",
 line 52, in tree_write_locked
     return unbound(self, *args, **kwargs)
   File "/usr/local/lib/python2.5/site-packages/bzrlib/workingtree_4.py",
 line 1234, in rename_one
     WorkingTree.rename_one(self, from_rel, to_rel, after)
   File "/usr/local/lib/python2.5/site-packages/bzrlib/mutabletree.py",
 line 52, in tree_write_locked
     return unbound(self, *args, **kwargs)
   File "/usr/local/lib/python2.5/site-packages/bzrlib/workingtree.py",
 line 1401, in rename_one
     rename_entries = self._determine_mv_mode(rename_entries, after)
   File "/usr/local/lib/python2.5/site-packages/bzrlib/workingtree.py",
 line 1301, in _determine_mv_mode
     str(to_rel))))
 BzrRenameFailedError: Could not rename entry.html => entry.html: Path(s)
 do not exist: templates/entry.html templates/website/entry.html
 }}}

 That changeset first renames a directory, then moves (part of) its
 content into a subdirectory:
 {{{
 $ mv website/templates templates
 $ mkdir templates/website
 $ mv templates/entry.html templates/website
 $ mv templates/imprint-ie.html templates/website
 ...
 }}}

 Tailor should probably surf the changeset actions and find out the
 right name (the original one) to the `rename_one()` function.

-- 
Ticket URL: <http://progetti.arstecnica.it/tailor/ticket/170#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