I've found an edge condition with cvs sources where I'm getting AssertionError: <directory> should be empty
on a case that should work. What's happening is that I have a subdirectory in CVS (NOT the top-level directory) that is having all its contents removed and new ones added in the same commit. In coming up with a test case I also discovered that it's order-dependent - if the remove happens first the assertion is hit, if the add happens first it works fine. I don't have any immediate idea how to fix this, so I'm just sending a couple of test cases (CVS module tarballs) and the .tailor file to demonstrate this. The -failure tarball demonstrates the failure, and the -success tarball demonstrates how the exact same case can succeed by swapping the names of the files. My test case happens to be going into mercurial but I doubt that matters. This is with latest darcs tailor from http://darcs.arstecnica.it/tailor. :; ~/src/tailor2/tailor --configfile=buggy.tailor 21:53:41 [I] Bootstrapping "project" in "/home/bdowning/src/foo/hgbuggy" 21:53:41 [I] $ cvs -f -d /home/bdowning/cvs rlog -r:HEAD -b buggy 21:53:41 [I] [Ok] 21:53:41 [I] Cached information about 2 pending changesets 21:53:41 [I] /home/bdowning/src/foo/hgbuggy $ cvs -q -d /home/bdowning/cvs checkout -d buggy -D "2006-05-16 02:05:34 UTC" buggy 21:53:42 [I] [Ok] 21:53:42 [I] Forcing CVS sticky tag in /home/bdowning/src/foo/hgbuggy/buggy 21:53:42 [I] Working copy up to revision 2006-05-16 02:05:34 by bdowning 21:53:42 [I] 1 pending changesets in state file adding .hgignore adding dir/1 .hgignore dir/1 21:53:42 [I] Bootstrap completed 21:53:42 [I] Updating "project" in "/home/bdowning/src/foo/hgbuggy" 21:53:42 [I] Applying pending upstream changesets 21:53:42 [I] Changeset "2006-05-16 02:06:02 by bdowning" 21:53:42 [I] Log message: remove foo, bar 1.1 21:53:42 [I] /home/bdowning/src/foo/hgbuggy/buggy $ cvs -d /home/bdowning/cvs -q update -d -r 1.2 dir/1 21:53:42 [I] [Ok] 21:53:42 [I] /home/bdowning/src/foo/hgbuggy/buggy $ cvs -d /home/bdowning/cvs -q update -d -r 1.1 dir/2 21:53:43 [I] [Ok] 21:53:43 [E] Couldn't apply changeset Revision: 2006-05-16 02:06:02 by bdowning Date: 2006-05-16 02:06:02 Author: bdowning Removed: dir/1,dir Added: dir/2 Log: remove foo, bar 1.1 Traceback (most recent call last): File "/home/bdowning/src/tailor2/vcpx/source.py", line 103, in applyPendingChangesets res = self._applyChangeset(c) File "/home/bdowning/src/tailor2/vcpx/cvsps.py", line 222, in _applyChangeset assert listdir(join(self.basedir, e.name)) == ['CVS'], '%s should be empty' % e.name AssertionError: dir should be empty 21:53:43 [C] Upstream change application failed Traceback (most recent call last): File "/home/bdowning/src/tailor2/tailor", line 33, in ? main() File "/home/bdowning/src/tailor2/vcpx/tailor.py", line 332, in main tailorizer() File "/home/bdowning/src/tailor2/vcpx/tailor.py", line 144, in __call__ self.update() File "/home/bdowning/src/tailor2/vcpx/tailor.py", line 107, in update last, conflicts = dwd.applyPendingChangesets( File "/home/bdowning/src/tailor2/vcpx/dualwd.py", line 97, in applyPendingChangesets applied=applied) File "/home/bdowning/src/tailor2/vcpx/source.py", line 103, in applyPendingChangesets res = self._applyChangeset(c) File "/home/bdowning/src/tailor2/vcpx/cvsps.py", line 222, in _applyChangeset assert listdir(join(self.basedir, e.name)) == ['CVS'], '%s should be empty' % e.name AssertionError: dir should be empty Thanks, -bcd -- *** Brian Downing <bdowning at lavos dot net>
[DEFAULT] verbose = True [project] target = hg:target start-revision = INITIAL root-directory = /home/bdowning/src/foo/hgbuggy state-file = project.state source = cvs:source subdir = buggy patch-name-format = refill-changelogs = Yes [hg:target] [cvs:source] module = buggy repository = /home/bdowning/cvs encoding = iso8859-1
buggy-failure.tar.gz
Description: Binary data
buggy-success.tar.gz
Description: Binary data
_______________________________________________ Tailor mailing list [email protected] http://lists.zooko.com/mailman/listinfo/tailor
