Re[2]: State of CVS-to-git conversion tools (Was: Re: cvsps: bad usage: invalid argument --norc)

2013-04-23 Thread Ilya Basin
ESR> Ilya Basin :
>> For new branches the 'from' command can refer the common ancestor in
>> an existing branch. For example:
>> 
>>  /--E thebranch
>> /
>> A---B---C---D master
>> 
>> Commit E is newer than D; we already imported D; thebranch is new.
>> Instead of:
>> from refs/heads/thebranch^0
>> refer the parent as:
>> from refs/heads/master^2

ESR> Understood.  Do you actually need this much generality in practice, 
ESR> or is it a theoretical case?

Such cases occur quite often.

-- 

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re[2]: State of CVS-to-git conversion tools (Was: Re: cvsps: bad usage: invalid argument --norc)

2013-04-23 Thread Ilya Basin
>> But if the branch is new, but it's parent commit is already imported,
>> I guess, the only way to refer it is by its SHA-1
>> Eric, what parent information can cvsps provide for the first commit
>> in a branch, when invoked with the '-d' flag?

ESR> At the moment it doesn't provide any at all.  That case wasn't on my
ESR> radar when I was fixing the code.  If you can specify a behavior you
ESR> think would be useful, I'm listening.

For new branches the 'from' command can refer the common ancestor in
an existing branch. For example:

 /--E thebranch
/
A---B---C---D master

Commit E is newer than D; we already imported D; thebranch is new.
Instead of:
from refs/heads/thebranch^0
refer the parent as:
from refs/heads/master^2



ESR> Look at the -i option.  That may do what you need.
ESR>

OK, something's wrong with the man page: starting with '-A' the
description is unstructured:

   -A authormap
   Apply an author-map file to the attribution lines. Each line must be 
of the form

   ferd = Ferd J. Foonly  America/Chicago

   and will be applied to map the Unix username ferd to the DVCS-style 
user identity specified after the equals
   sign. The timezone field (after > and whitespace) is optional and 
(if present) is used to set the timezone
   offset to be attached to the date; acceptable formats for the 
timezone field are anything that can be in the TZ
   environment variable, including a [+-]hhmm offset. Whitespace around 
the equals sign is stripped. Lines
   beginning with a # or not containing an equals sign are silently 
ignored. -R revmap:: Write a revision map to
   the specified argument filename. Each line of the revision map 
consists of three whitespace-separated fields: a
   filename, an RCS revision number, and the mark of the commit to 
which that filename-revision pair was assigned.
   -v:: show very verbose parsing messages. -t:: show some brief memory 
usage statistics. --summary-first:: when
   multiple patchset diffs are being generated, put the patchset 
summary for all patchsets at the beginning of the
   output. --diffs-opts option string:: send a custom set of options to 
diff, for example to increase the number
   of context lines, or change the diff format. --debuglvl bitmask:: 
enable various debug output channels. -Z
   compression:: A value 1-9 which specifies amount of compression. A 
value of 0 disables compression. --root
   cvsroot:: Override the setting of CVSROOT (overrides working 
directory and environment). -i:: Incremental
   export. Each commit with no ancestor gets a from pointer name. When 
importing to an existing repository, this
   will attach each such commit as a child of the last commit on 
$BRANCH in the existing repository. -k:: Kill
   keywords: will extract files with -kk from the CVS archive to avoid 
noisy changesets. -T:: Force deterministic
   dates for regression testing. Each patchset will have a 
monotonic-increasing attributed date computed from its
   patchset ID. --fast-export:: Emit the report as a git import stream. 
--convert-ignores:: Convert ..cvsignore
   files to .gitignore files. --reposurgeon:: Emit for each commit a 
list of the CVS file:revision pairs composing
   it as a bzr-style commit property named "cvs-revisions". From 
version 2.12 onward, reposurgeon can interpret
   these and use them as hints for reference-lifting. -V:: Emit the 
program version and exit.  module-path::
   Operate on the specified module. If this option is not given, either 
the CVSROOT environment variable must be
   set to point directly at the module or cvsps must be run in a 
checkout directory or repository module
   subdirectory.

--
 

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re[2]: State of CVS-to-git conversion tools (Was: Re: cvsps: bad usage: invalid argument --norc)

2013-04-20 Thread Ilya Basin
Hi Eric.

ESR> cvs-fast-export does not have incremental-import support.
ESR> Whether git-cvs-import has it depend on which version you have
ESR> and what backend it it is using. I don't maintain that wrapper.
Did you mean "git-fast-import"? Or do you know any wrapper that
already uses cvsps3 --fast-export?


>> I need it, because full import takes too long.
>> The central repo of my employer is CVS, other people commit to it and
>> I use git internally to be able to tidy my commit history before
>> exporting to CVS.

ESR> You are out of luck. That feature was dependent on a very fragile
ESR> coupling...
OK, OK, I get it.


First of all, I think cvsps3 has almost everithing required for
incremental import: one could just take the date of the last commit
and invoke cvs ps with the '-d' flag. However, to import new commits
into existing branches the stream should contain the "from" command in
oldest commits in each branch (now missing).
If the branch already exists in the target git repo, it's easy to
refer it in the stream:
from refs/heads/branchname^0

But if the branch is new, but it's parent commit is already imported,
I guess, the only way to refer it is by its SHA-1
Eric, what parent information can cvsps provide for the first commit
in a branch, when invoked with the '-d' flag?


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html