git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Langhoff <martin.langhoff@gmail.com>
To: Junio C Hamano <junkio@cox.net>
Cc: Yann Dirson <ydirson@altern.org>,
	git@vger.kernel.org, Martin Langhoff <martin@catalyst.net.nz>
Subject: Re: [PATCH] Teach cvsexportcommit to add new files
Date: Sat, 7 Jan 2006 20:29:08 +1300	[thread overview]
Message-ID: <46a038f90601062329s35163616i7c658e4d6ede294b@mail.gmail.com> (raw)
In-Reply-To: <7virsxrnik.fsf@assigned-by-dhcp.cox.net>

On 1/7/06, Junio C Hamano <junkio@cox.net> wrote:
> Yann Dirson <ydirson@altern.org> writes:
>
> > Teach cvsexportcommit to add new files
> > "cvs add" support was already there, but the "unknown" status
> > returned when querying a file not yet known to cvs caused the
> > script to abort prematurely.
>
> Thanks.  I'll take the patch as is, but I noticed that the
> cvsexportcommit still has some room for polishing.

Definitely. It's a bit of a hack job that I got started with, and as
it's /worked for me/ so far, haven't done much with it. I am actually
quite busy at the moment, so I don't think you'll see many patches
from me on this fron yet...

(BTW: I'm hoping to find a bit of time to code the git-cvsdaemon that
I've mentioned before, which would be a hell of an interesting
addition, methinks.)

>  * The command is to be run from CVS working copy (as desribed
>    in the documentation) and seems to assume that the parent
>    commit is checked out at least for the paths involved between
>    the commit and the parent (not clearly documented).

Indeed, and you can also use it for the same thing you'd use git-am --
for instance, to "merge into CVS" feature branches kept on GIT.

>  * I wonder if it is safe with filenames with embedded SP?

It's not -- shame on me. Backticks should be replaced with
safe_pipe_capture() as Eric's done on git-archimport.

>  * I think this grep '^Binary' is unsafe; different versions of
>    gnu diff say just "Files differ".

Unsure how to detect binary files safely. Is there a way to ask git
whether it considers the files to be binary?

(snipped several good suggestions here...)

> I am getting an impression that _if_ we care about applying
> fuzzy patch like this, giving fuzz feature to git-apply would
> help this program somewhat, but at the same time I do not think
> of a good reason to even accept nonexact patch when synching two
> SCM histories.

Well, with some fuzz you can use this to merge something into CVS even
if the trunk or branch you're merging into has moved forward a bit.
OTOH, I guess you can go back to git and do a git-rebase if needed.

cheers,


martin

  reply	other threads:[~2006-01-07  7:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-06 20:54 [PATCH] Teach cvsexportcommit to add new files Yann Dirson
2006-01-06 22:37 ` Junio C Hamano
2006-01-07  7:29   ` Martin Langhoff [this message]
2006-01-07  9:01     ` cvsexportcommit / cvsimport issues Yann Dirson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46a038f90601062329s35163616i7c658e4d6ede294b@mail.gmail.com \
    --to=martin.langhoff@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=martin@catalyst.net.nz \
    --cc=ydirson@altern.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).