Re: Feedback on using cvs2bzr
Michael Haggerty <[email protected]>
| Newsgroups | gmane.comp.version-control.subversion.cvs2svn.user |
|---|---|
| Message-ID | <[email protected]> |
Alexander Belchenko wrote:
> Max Bowsher пишет:
>> Alexander Belchenko wrote:
>>> I've just successfully converted CVS repo hosted on sf.net to Bazaar
>>> format and I'd like to provide some feedback about this process.
>> Thanks!
>>
>> Summary point 3): Extensionless scripts don't work on Windows.
>
> Yes.
>
> For bzr project in the past I wrote special support in setup.py to create
> batch wrapper at install time. If you wish I can help to port this
solution
> to your setup.py.
I see two possibilities:
1. Create a batch wrapper at install time, like you suggest. This makes
it easier to run cvs2xxx without thinking about it, but requires that
cvs2xxx be installed (which, on unix at least, is otherwise not required).
2. Document that under Windows the program should be started by typing
x:\my\path\to\python.exe cvs2svn ...
I'd be happy to accept a patch implementing either or both of these
solutions.
For the specific case that bzr wants to start cvs2bzr, solution (1)
would work, or it could use its knowledge that cvs2bzr is a python
script and invoke it using (2), with sys.executable as the path to the
python interpreter.
Also very valuable would be step-to-step instructions telling Windows
users how to do a simple conversion with cvs2svn. We periodically get
Windows newbie questions on the mailing lists but I can't really help them.
>> I guess we should FAQ this.
> [...]
>>> Unfortunately I've discovered that resulting dump file has no texts for
>>> all files at all. And after importing this dumpfile to bzr format I've
>>> got correct revision history but all files has zero length.
>>>
>>> As I discovered later the problem was in CVSNT executable which is used
>>> by TortoiseCVS installed on my computer:
>>>
>>> C:\>cvs version
>>> Concurrent Versions System (CVSNT) 2.5.03 (Scorpio) Build 2382
>>> (client/server)
>> This sucks. Though I have to admit, my plate is sufficiently full with
>> non-Windows stuff that I'm unlikely to ever do anything about this
>> particular issue myself :-/
>
> I'm Python programmer and I can help to debug/fix this if you can guide me.
> Although I'm not CVS/CVSNT expert. In the past I've heavily used TortoiseCVS
> as my main GUI client, then I've switched to bzr. But my knowledge of CVS
> CLI is very poor.
I'm surprised that the CVSNT cvs executable is not usable for cvs2svn.
This is a serious problem, because using the --use-cvs option and the
CVSNT executable is pretty much the only hope of a valid conversion for
people with repositories that use CVSNT-specific features.
So it would be much preferable if we could figure out how to allow
cvs2svn to work with the CVSNT executable. Currently, we invoke cvs in
the following ways (see cvs2svn_lib/cvs_revision_manager.py, class
CVSRevisionReader):
$CVSPATH $CVSOPTS -d $CVSROOT co -r$CVSREV -p $RCSPATH
$CVSPATH $CVSOPTS -d $CVSROOT co -r$CVSREV -p -kk $RCSPATH
where $CVSPATH is the path to the cvs executable as specified by the
--cvs=PATH option, $CVSREV is a cvs revision number (e.g., "1.4.6.3"),
$RCSPATH is the path to a *,v file, and $CVSOPTS is the first of the
following possibilities that allows "$CVS $CVSOPTS --version" to run
with exit status=0 and without writing anything to stderr:
CVSOPTS=-q -R -f
CVSOPTS=-q -R
CVSOPTS=-q -f
CVSOPTS=-q
. The reason that various CVSOPTS combinations are tried is that
different CVS versions support different combinations of options.
It is expected that the first of the CVS commands outputs the contents
of the specified revision to standard output *with* keyword expansion,
and the second outputs the contents *without* keyword expansion.
That you experienced a silent failure is probably due to a lack of error
checking when invoking the cvs command. This should be fixed by r4961.
Please check if using this version of cvs2svn with CVSNT still silently
creates a repository with zero-length revisions, or whether it fails
noisily (the preferred outcome). If the latter, then we can start
trying to figure out how to get cvs2bzr to work with the CVSNT executable.
Michael
------------------------------------------------------
http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1670&dsMessageId=2422964
To unsubscribe from this discussion, e-mail: [[email protected]].