#165: Darcs to Bzr cannot handle files moved and deleted in the same commit
----------------------------+-----------------------------------------------
Reporter: batterseapower | Owner: lele
Type: defect | Status: new
Priority: major | Milestone: VersionOne
Component: tailor | Version: 0.9
Keywords: |
----------------------------+-----------------------------------------------
The attached testcase contains:
* A source Darcs repository with 2 patches: an initial patch, creating
the file dir1/dir2/file, and a reorganisation patch which first renames
dir1 to newdir1 and then deletes newdir1/dir2/file
* A script "convert" which tries to convert this to Bzr format
* A script "reset" which will clean up after that attempt
* A Bzr repository which is what I >want< Tailor to output, but which it
cannot because the conversion fails with this error:
{{{
14:01:38 [I] Bootstrap completed
14:01:38 [I] Updating "project" in "/Users/mbolingbroke/JunkTailor"
14:01:38 [I] /Users/mbolingbroke/JunkTailor/cvt-darcs $ darcs pull --dry-
run --xml-output /Users/mbolingbroke/JunkTailor/darcs 2>&1
14:01:38 [D] Executing darcs pull --dry-run --xml-output
/Users/mbolingbroke/JunkTailor/darcs ('/Users/mbolingbroke/JunkTailor/cvt-
darcs')
14:01:38 [I] [Ok]
Output stream:
<patches>
<patch author='Max Bolingbroke <[EMAIL PROTECTED]>'
date='20080725124940' local_date='Fri Jul 25 12:49:40 UTC 2008'
inverted='False'
hash='20080725124940-9b787-4eb4e19d5f62ddc9842b17a62fcf159d0d7146fe.gz'>
<name>Reorganisation</name>
</patch>
</patches>
14:01:38 [I] Cached information about 1 pending changesets
14:01:38 [I] Applying pending upstream changesets
14:01:38 [I] Changeset #1
14:01:38 [I] Upstream revision "Reorganisation" by Max Bolingbroke
<[EMAIL PROTECTED]>, 2008-07-25 12:49:40+00:00
14:01:38 [D] Going to apply changeset:
Revision: Reorganisation
Date: 2008-07-25 12:49:40+00:00
Author: Max Bolingbroke <[EMAIL PROTECTED]>
Entries:
Log:
14:01:38 [I] /Users/mbolingbroke/JunkTailor/cvt-darcs $ darcs pull --all
--quiet --match "hash
20080725124940-9b787-4eb4e19d5f62ddc9842b17a62fcf159d0d7146fe.gz" 2>&1
14:01:38 [D] Executing darcs pull --all --quiet --match "hash
20080725124940-9b787-4eb4e19d5f62ddc9842b17a62fcf159d0d7146fe.gz"
('/Users/mbolingbroke/JunkTailor/cvt-darcs')
14:01:38 [I] [Ok]
14:01:38 [I] /Users/mbolingbroke/JunkTailor/cvt-darcs $ darcs changes
--match "hash
20080725124940-9b787-4eb4e19d5f62ddc9842b17a62fcf159d0d7146fe.gz" --xml-
output --summ
14:01:38 [D] Executing darcs changes --match "hash
20080725124940-9b787-4eb4e19d5f62ddc9842b17a62fcf159d0d7146fe.gz" --xml-
output --summ ('/Users/mbolingbroke/JunkTailor/cvt-darcs')
14:01:38 [I] [Ok]
Output stream:
<changelog>
<patch author='Max Bolingbroke <[EMAIL PROTECTED]>'
date='20080725124940' local_date='Fri Jul 25 13:49:40 BST 2008'
inverted='False'
hash='20080725124940-9b787-4eb4e19d5f62ddc9842b17a62fcf159d0d7146fe.gz'>
<name>Reorganisation</name>
<summary>
<move from="dir1" to="dir1new"/>
<remove_file>
dir1new/dir2/file
</remove_file>
</summary>
</patch>
</changelog>
14:01:38 [I] $ rsync --archive --ignore-times --exclude _darcs --exclude
.bzr /Users/mbolingbroke/JunkTailor/cvt-darcs/
/Users/mbolingbroke/JunkTailor/cvt-bzr
14:01:38 [D] Executing rsync --archive --ignore-times --exclude _darcs
--exclude .bzr /Users/mbolingbroke/JunkTailor/cvt-darcs/
/Users/mbolingbroke/JunkTailor/cvt-bzr ('/Users/mbolingbroke/JunkTailor')
14:01:38 [I] [Ok]
14:01:38 [I] Renaming u'dir1' to u'dir1new'...
14:01:38 [I] Removing dir1new/dir2/file...
14:01:38 [I] removed dir1new/dir2/file
14:01:38 [I] Committing Reorganisation...
14:01:38 [C] Couldn't replay changeset:
Revision: Reorganisation
Date: 2008-07-25 12:49:40+00:00
Author: Max Bolingbroke <[EMAIL PROTECTED]>
Entries: dir1new(REN from dir1)
dir1new/dir2/file(DEL)
Log:
14:01:38 [C] Upstream change application failed: Path(s) are not
versioned: dir1new/dir2/file
14:01:38 [C] Something unexpected!
Traceback (most recent call last):
File "/Users/mbolingbroke/Programming/Checkouts/tailor/vcpx/tailor.py",
line 156, in __call__
self.update()
File "/Users/mbolingbroke/Programming/Checkouts/tailor/vcpx/tailor.py",
line 120, in update
applyable=self._applyable, applied=self._applied)
File "/Users/mbolingbroke/Programming/Checkouts/tailor/vcpx/dualwd.py",
line 102, in applyPendingChangesets
applied=applied)
File "/Users/mbolingbroke/Programming/Checkouts/tailor/vcpx/source.py",
line 136, in applyPendingChangesets
replay(c)
File "/Users/mbolingbroke/Programming/Checkouts/tailor/vcpx/dualwd.py",
line 113, in replayChangeset
self.target.replayChangeset(changeset)
File "/Users/mbolingbroke/Programming/Checkouts/tailor/vcpx/target.py",
line 143, in replayChangeset
entries, tags = changeset.tags)
File
"/Users/mbolingbroke/Programming/Checkouts/tailor/vcpx/repository/bzr.py",
line 396, in _commit
timestamp=timestamp, timezone=timezone)
File "<string>", line 4, in commit_write_locked
File "/opt/local/lib/python2.5/site-packages/bzrlib/workingtree_4.py",
line 240, in commit
result = WorkingTree3.commit(self, message, revprops, *args, **kwargs)
File "<string>", line 4, in commit_write_locked
File "/opt/local/lib/python2.5/site-packages/bzrlib/mutabletree.py",
line 197, in commit
revprops=revprops, *args, **kwargs)
File "/opt/local/lib/python2.5/site-packages/bzrlib/commit.py", line
315, in commit
specific_files, [self.basis_tree, self.work_tree])
File "/opt/local/lib/python2.5/site-packages/bzrlib/tree.py", line 623,
in find_ids_across_trees
require_versioned)
File "/opt/local/lib/python2.5/site-packages/bzrlib/tree.py", line 650,
in _find_ids_across_trees
raise errors.PathsNotVersionedError(not_versioned)
PathsNotVersionedError: Path(s) are not versioned: dir1new/dir2/file
}}}
--
Ticket URL: <http://progetti.arstecnica.it/tailor/ticket/165>
Tailor <http://progetti.arstecnica.it/tailor>
An inter-VCs changeset exchanger
_______________________________________________
Tailor mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/tailor