Hello,
I tried to submit a patch on the Tailor Trac instance but cannot gain
sufficient privileges, so I'm posting this patch here. I found that I
couldn't create a new CVS module in an existing repository with Tailor -
it tries to create a completely new CVS repository, fails, and then
complains about it like this:
14:30:02 [C] Could not import checked out tree in "/tmp/migrated"!
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/vcpx/tailor.py", line 89, in
bootstrap
dwd.importFirstRevision(self.source, actual, 'INITIAL'==revision)
File "/usr/lib/python2.4/site-packages/vcpx/dualwd.py", line 107, in
importFirstRevision
self.target.importFirstRevision(source_repo, changeset, initial)
File "/usr/lib/python2.4/site-packages/vcpx/target.py", line 622, in
importFirstRevision
isinitialcommit = True)
File "/usr/lib/python2.4/site-packages/vcpx/repository/cvsps.py", line
774, in _commit
raise ChangesetApplicationFailure("%s returned status %d" %
ChangesetApplicationFailure: /tmp/migrated/bsweb $ cvs -f -q ci -F
/tmp/tailorZW15U1cvs . returned status 1
Failure applying upstream changes: /tmp/migrated/bsweb $ cvs -f -q ci -F
/tmp/tailorZW15U1cvs . returned status 1
Perversely, I have exported to CVS previously, and I seem to remember
that it didn't involve an existing CVS module, although I could be
wrong. Anyway, attached is the patch for this issue. The documentation
is very vague about things like repository settings, and various
examples I've found confuse the CVS repository with actual modules in
such a repository - they are not the same thing at all. Here's an
example configuration file which should illustrate the concepts:
[DEFAULT]
verbose = True
[project]
target = cvs:target
root-directory = /tmp/migrated
state-file = tailor.state
source = hg:source
subdir = projectname
[hg:source]
module = projectname
repository = .
[cvs:target]
module = projectname
repository = /cvsroot
This should convert the project in the current directory, managed by
Mercurial, to a CVS module in /cvsroot/projectname which is accessed
through the checkout at /tmp/migrated/projectname. Running tailor
--configfile projectname.tailor (the name of the above file - obviously
arbitrary) seems to perform the conversion with the patch applied.
Paul
--- vcpx/repository/cvsps.py 2009-06-15 11:03:24.000000000 +0200
+++ vcpx/repository/cvsps.py 2009-07-20 14:38:53.000000000 +0200
@@ -85,16 +85,14 @@
# Remote repository
return
- if exists(join(path, 'CVSROOT')):
- return
-
- makedirs(path)
- cmd = self.command("-f", "-d", path, "init")
- c = ExternalCommand(command=cmd)
- c.execute()
- if c.exit_status:
- raise TargetInitializationFailure("Could not create CVS repository at %r",
- path)
+ if not exists(join(path, 'CVSROOT')):
+ makedirs(path)
+ cmd = self.command("-f", "-d", path, "init")
+ c = ExternalCommand(command=cmd)
+ c.execute()
+ if c.exit_status:
+ raise TargetInitializationFailure("Could not create CVS repository at %r",
+ path)
if self.module:
tempwc = mkdtemp('cvs', 'tailor')
_______________________________________________
Tailor mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/tailor