Ticket #147 (closed defect: fixed)
svn directory renames cause import errors in hg
| Reported by: | chris | Owned by: | lele |
|---|---|---|---|
| Priority: | major | Milestone: | VersionOne |
| Component: | hg | Version: | 0.9 |
| Keywords: | svn hg directory rename renaming | Cc: |
Description
Any SVN revision which contains a directory rename appears to fail with an error while replaying it in HG:
23:57:15 [I] Bootstrapping "svn-hg" in "/tmp/tailor-svn-hg"
23:57:15 [I] Initializing new repository in '/tmp/tailor-svn-hg/hg'...
.hgignore
No username found, using 'chris@rocio.int.aidworld.org' instead
23:57:15 [I] $ svn ls --non-interactive http://www.boxbackup.org/svn
23:57:16 [I] [Ok]
23:57:16 [I] $ svn ls --non-interactive http://www.boxbackup.org
23:57:16 [W] [Status 1]
23:57:16 [I] $ svn co --quiet --ignore-externals --revision 2015 http://www.boxbackup.org/svn/box/trunk@2015 /tmp/tailor-svn-hg/svn 2>&1
23:57:39 [I] [Ok]
23:57:39 [I] /tmp/tailor-svn-hg/svn $ svn log --verbose --xml --non-interactive --revision 2015 2>&1
23:57:39 [I] [Ok]
23:57:39 [I] $ rsync --archive --exclude .svn --exclude .hg --exclude .hgtags /tmp/tailor-svn-hg/svn/ /tmp/tailor-svn-hg/hg
23:57:39 [I] [Ok]
adding BUGS.txt
...
adding win32.bat
23:57:39 [I] Committing 'Tailorization'...
BUGS.txt
...
win32.bat
23:57:40 [I] Bootstrap completed
23:57:40 [I] Updating "svn-hg" in "/tmp/tailor-svn-hg"
23:57:40 [I] /tmp/tailor-svn-hg/svn $ svn log --verbose --xml --non-interactive --revision 2016:HEAD .
23:57:41 [I] [Ok]
23:57:41 [W] Ignoring u'/box/trunk' since it is not under '/box/trunk/'
23:57:41 [I] Cached information about 93 pending changesets
23:57:41 [I] Applying pending upstream changesets
23:57:41 [I] Changeset #1
23:57:41 [I] Changeset "2016"
23:57:41 [I] Log message: Rename html to box-html so that images and CSS are found automatically,
and only one directory needs to be copied for publication.
23:57:41 [I] /tmp/tailor-svn-hg/svn $ svn update --ignore-externals --revision 2016 . 2>&1
23:57:44 [I] [Ok]
23:57:44 [I] $ rsync --archive --exclude .svn --exclude .hg --exclude .hgtags /tmp/tailor-svn-hg/svn/ /tmp/tailor-svn-hg/hg
23:57:44 [I] [Ok]
23:57:44 [I] Renaming 'documentation/boxbackup/html' to 'documentation/boxbackup/box-html'...
documentation/boxbackup/box-html does not exist!
23:57:44 [E] Failure replaying: Revision: 2016
Date: 2008-01-02 13:29:33.425614+00:00
Author: chris
Entries: documentation/boxbackup/box-html(REN from documentation/boxbackup/html)
Log: Rename html to box-html so that images and CSS are found automatically,
and only one directory needs to be copied for publication.
Traceback (most recent call last):
File "build/bdist.linux-i686/egg/vcpx/target.py", line 117, in replayChangeset
self._replayChangeset(changeset)
File "build/bdist.linux-i686/egg/vcpx/target.py", line 320, in _replayChangeset
action(group)
File "build/bdist.linux-i686/egg/vcpx/target.py", line 489, in _renameEntries
self._renamePathname(e.old_name, e.name)
File "build/bdist.linux-i686/egg/vcpx/repository/hg.py", line 410, in _renamePathname
repo.remove([oldname], unlink=True)
File "/var/lib/python-support/python2.5/mercurial/localrepo.py", line 1028, in remove
util.unlink(self.wjoin(f))
File "/var/lib/python-support/python2.5/mercurial/util.py", line 648, in unlink
os.unlink(f)
OSError: [Errno 21] Is a directory: '/tmp/tailor-svn-hg/hg/documentation/boxbackup/html'
23:57:44 [E] Couldn't replay changeset
Revision: 2016
Date: 2008-01-02 13:29:33.425614+00:00
Author: chris
Entries: documentation/boxbackup/box-html(REN from documentation/boxbackup/html)
Log: Rename html to box-html so that images and CSS are found automatically,
and only one directory needs to be copied for publication.
Traceback (most recent call last):
File "build/bdist.linux-i686/egg/vcpx/source.py", line 141, in applyPendingChangesets
replay(c)
File "build/bdist.linux-i686/egg/vcpx/dualwd.py", line 108, in replayChangeset
self.target.replayChangeset(changeset)
File "build/bdist.linux-i686/egg/vcpx/target.py", line 117, in replayChangeset
self._replayChangeset(changeset)
File "build/bdist.linux-i686/egg/vcpx/target.py", line 320, in _replayChangeset
action(group)
File "build/bdist.linux-i686/egg/vcpx/target.py", line 489, in _renameEntries
self._renamePathname(e.old_name, e.name)
File "build/bdist.linux-i686/egg/vcpx/repository/hg.py", line 410, in _renamePathname
repo.remove([oldname], unlink=True)
File "/var/lib/python-support/python2.5/mercurial/localrepo.py", line 1028, in remove
util.unlink(self.wjoin(f))
File "/var/lib/python-support/python2.5/mercurial/util.py", line 648, in unlink
os.unlink(f)
OSError: [Errno 21] Is a directory: '/tmp/tailor-svn-hg/hg/documentation/boxbackup/html'
23:57:44 [C] Upstream change application failed
Traceback (most recent call last):
File "/usr/bin/tailor", line 5, in <module>
pkg_resources.run_script('tailor==0.9.30', 'tailor')
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 448, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1173, in run_script
exec script_code in namespace, namespace
File "/usr/bin/tailor", line 35, in <module>
File "build/bdist.linux-i686/egg/vcpx/tailor.py", line 342, in main
File "build/bdist.linux-i686/egg/vcpx/tailor.py", line 147, in __call__
File "build/bdist.linux-i686/egg/vcpx/tailor.py", line 111, in update
File "build/bdist.linux-i686/egg/vcpx/dualwd.py", line 97, in applyPendingChangesets
File "build/bdist.linux-i686/egg/vcpx/source.py", line 141, in applyPendingChangesets
File "build/bdist.linux-i686/egg/vcpx/dualwd.py", line 108, in replayChangeset
File "build/bdist.linux-i686/egg/vcpx/target.py", line 117, in replayChangeset
File "build/bdist.linux-i686/egg/vcpx/target.py", line 320, in _replayChangeset
File "build/bdist.linux-i686/egg/vcpx/target.py", line 489, in _renameEntries
File "build/bdist.linux-i686/egg/vcpx/repository/hg.py", line 410, in _renamePathname
File "/var/lib/python-support/python2.5/mercurial/localrepo.py", line 1028, in remove
util.unlink(self.wjoin(f))
File "/var/lib/python-support/python2.5/mercurial/util.py", line 648, in unlink
os.unlink(f)
OSError: [Errno 21] Is a directory: '/tmp/tailor-svn-hg/hg/documentation/boxbackup/html'
Tailor configuration:
[DEFAULT] verbose = True projects = svn-hg [svn-hg] source = svn:box-trunk start-revision = 2015 root-directory = tailor-svn-hg state-file = state target = hg:box-trunk [hg:box-trunk] repository = hg-trunk-copy # repository = http://localhost:8000/ subdir = hg [svn:box-trunk] module = /box/trunk repository = http://www.boxbackup.org/svn subdir = svn
Change History
Note: See
TracTickets for help on using
tickets.

It seems that the hg backend isn't filtering out non-file entries...