Re: Tracking CVS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/22/06, Petr Baudis <pasky@xxxxxxx> wrote:
Dear diary, on Thu, Jun 22, 2006 at 02:41:16PM CEST, I got a letter
where Jon Smirl <jonsmirl@xxxxxxxxx> said that...
> I'm tracking cvs using this sequence.
>
> cvs update
> cg rm -a
> cg commit
> cg add -r .
> cg commit
>
> Is there a way to avoid the two commits? If you do the add with out
> the intervening commit it just adds the files back.

I think the most straightforward way is:

        cvs update
        cg-rm -a
        cg-status -wns \? | xargs cg-add
        cg-commit

If you want to be careful about filenames polluted by non-newline
whitespaces,

        cg-status -wns \? | tr '\n' '\0' | xargs -0 cg-add

If you want to be safe even with filenames containing newlines, you need
to go at the Git level:

        git-ls-files -z --others | \
                xargs -0 git-update-index --add --

Perhaps we might make a special command which would sync the index set
with the working copy set...

How about a cg-sync? Tracking cvs (or other SCM) with git is probably
a common activitiy while you try to convince the other CVS users to
switch. It is probably worth a little write up in the readme on the
best way to do it.

cg-sync should probably default to having a prompt before actually
adding/removing the files. Add a -f or something to get rid of the
prompt.

--
Jon Smirl
jonsmirl@xxxxxxxxx
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]