* Tracking CVS
@ 2006-06-22 12:41 Jon Smirl
2006-06-22 13:58 ` Petr Baudis
0 siblings, 1 reply; 11+ messages in thread
From: Jon Smirl @ 2006-06-22 12:41 UTC (permalink / raw)
To: git
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.
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Tracking CVS
2006-06-22 12:41 Tracking CVS Jon Smirl
@ 2006-06-22 13:58 ` Petr Baudis
2006-06-22 14:17 ` Jon Smirl
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Petr Baudis @ 2006-06-22 13:58 UTC (permalink / raw)
To: Jon Smirl; +Cc: git
Dear diary, on Thu, Jun 22, 2006 at 02:41:16PM CEST, I got a letter
where Jon Smirl <jonsmirl@gmail.com> 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...
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
A person is just about as big as the things that make them angry.
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: Tracking CVS
2006-06-22 13:58 ` Petr Baudis
@ 2006-06-22 14:17 ` Jon Smirl
2006-07-19 12:38 ` Petr Baudis
2006-06-22 17:05 ` Junio C Hamano
2006-06-23 2:18 ` Jon Smirl
2 siblings, 1 reply; 11+ messages in thread
From: Jon Smirl @ 2006-06-22 14:17 UTC (permalink / raw)
To: Petr Baudis; +Cc: git
On 6/22/06, Petr Baudis <pasky@suse.cz> wrote:
> Dear diary, on Thu, Jun 22, 2006 at 02:41:16PM CEST, I got a letter
> where Jon Smirl <jonsmirl@gmail.com> 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@gmail.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Tracking CVS
2006-06-22 14:17 ` Jon Smirl
@ 2006-07-19 12:38 ` Petr Baudis
0 siblings, 0 replies; 11+ messages in thread
From: Petr Baudis @ 2006-07-19 12:38 UTC (permalink / raw)
To: Jon Smirl; +Cc: git
Dear diary, on Thu, Jun 22, 2006 at 04:17:15PM CEST, I got a letter
where Jon Smirl <jonsmirl@gmail.com> said that...
> On 6/22/06, Petr Baudis <pasky@suse.cz> wrote:
> >Dear diary, on Thu, Jun 22, 2006 at 02:41:16PM CEST, I got a letter
> >where Jon Smirl <jonsmirl@gmail.com> 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.
>
> 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.
I have added and pushed out support for cg-add -a, now it should be
merely a matter of
cg-rm -a && cg-add -a
and I have documented that.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Snow falling on Perl. White noise covering line noise.
Hides all the bugs too. -- J. Putnam
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Tracking CVS
2006-06-22 13:58 ` Petr Baudis
2006-06-22 14:17 ` Jon Smirl
@ 2006-06-22 17:05 ` Junio C Hamano
2006-06-22 17:14 ` Jakub Narebski
2006-06-23 2:18 ` Jon Smirl
2 siblings, 1 reply; 11+ messages in thread
From: Junio C Hamano @ 2006-06-22 17:05 UTC (permalink / raw)
To: Petr Baudis; +Cc: git
Petr Baudis <pasky@suse.cz> writes:
> 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 --
If you want to avoid "xargs -0", you can replace it with
"git-update-index -z --stdin" I think.
> Perhaps we might make a special command which would sync the index set
> with the working copy set...
I think that makes sense. Something like what "git-commit -a"
does before making a commit.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Tracking CVS
2006-06-22 17:05 ` Junio C Hamano
@ 2006-06-22 17:14 ` Jakub Narebski
2006-06-22 17:43 ` Junio C Hamano
0 siblings, 1 reply; 11+ messages in thread
From: Jakub Narebski @ 2006-06-22 17:14 UTC (permalink / raw)
To: git
Junio C Hamano wrote:
> Petr Baudis <pasky@suse.cz> writes:
>> Perhaps we might make a special command which would sync the index set
>> with the working copy set...
>
> I think that makes sense. Something like what "git-commit -a"
> does before making a commit.
Isn't that what "git update-index --again" does?
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Tracking CVS
2006-06-22 17:14 ` Jakub Narebski
@ 2006-06-22 17:43 ` Junio C Hamano
0 siblings, 0 replies; 11+ messages in thread
From: Junio C Hamano @ 2006-06-22 17:43 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
Jakub Narebski <jnareb@gmail.com> writes:
> Junio C Hamano wrote:
>
>> Petr Baudis <pasky@suse.cz> writes:
>
>>> Perhaps we might make a special command which would sync the index set
>>> with the working copy set...
>>
>> I think that makes sense. Something like what "git-commit -a"
>> does before making a commit.
>
> Isn't that what "git update-index --again" does?
No.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Tracking CVS
2006-06-22 13:58 ` Petr Baudis
2006-06-22 14:17 ` Jon Smirl
2006-06-22 17:05 ` Junio C Hamano
@ 2006-06-23 2:18 ` Jon Smirl
2006-06-23 2:24 ` Jon Smirl
2006-06-23 2:31 ` Petr Baudis
2 siblings, 2 replies; 11+ messages in thread
From: Jon Smirl @ 2006-06-23 2:18 UTC (permalink / raw)
To: Petr Baudis; +Cc: git
On 6/22/06, Petr Baudis <pasky@suse.cz> wrote:
> Dear diary, on Thu, Jun 22, 2006 at 02:41:16PM CEST, I got a letter
> where Jon Smirl <jonsmirl@gmail.com> 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
This doesn't pick up new directories with recursion.
>
> 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...
>
> --
> Petr "Pasky" Baudis
> Stuff: http://pasky.or.cz/
> A person is just about as big as the things that make them angry.
>
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Tracking CVS
2006-06-23 2:18 ` Jon Smirl
@ 2006-06-23 2:24 ` Jon Smirl
2006-06-23 2:31 ` Petr Baudis
1 sibling, 0 replies; 11+ messages in thread
From: Jon Smirl @ 2006-06-23 2:24 UTC (permalink / raw)
To: Petr Baudis; +Cc: git
On 6/22/06, Jon Smirl <jonsmirl@gmail.com> wrote:
> > I think the most straightforward way is:
> >
> > cvs update
> > cg-rm -a
> > cg-status -wns \? | xargs cg-add
> > cg-commit
>
> This doesn't pick up new directories with recursion.
The new directories that came down were empty.
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Tracking CVS
2006-06-23 2:18 ` Jon Smirl
2006-06-23 2:24 ` Jon Smirl
@ 2006-06-23 2:31 ` Petr Baudis
2006-06-23 18:14 ` Jon Smirl
1 sibling, 1 reply; 11+ messages in thread
From: Petr Baudis @ 2006-06-23 2:31 UTC (permalink / raw)
To: Jon Smirl; +Cc: git
Dear diary, on Fri, Jun 23, 2006 at 04:18:32AM CEST, I got a letter
where Jon Smirl <jonsmirl@gmail.com> said that...
> On 6/22/06, Petr Baudis <pasky@suse.cz> wrote:
> > cvs update
> > cg-rm -a
> > cg-status -wns \? | xargs cg-add
> > cg-commit
>
> This doesn't pick up new directories with recursion.
Ah. Either pass -S to cg-status or -r to cg-add.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
A person is just about as big as the things that make them angry.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Tracking CVS
2006-06-23 2:31 ` Petr Baudis
@ 2006-06-23 18:14 ` Jon Smirl
0 siblings, 0 replies; 11+ messages in thread
From: Jon Smirl @ 2006-06-23 18:14 UTC (permalink / raw)
To: Petr Baudis; +Cc: git
My cg-sync script looks like this now:
#!/usr/bin/env bash
cg-rm -a
cg-status -wnSs \? | xargs cg-add
But when are no files to add or remove I get this:
[jonsmirl@jonsmirl mozilla]$ cg sync
cg-rm: no files to remove
cg-add: usage: cg-add [-N] [-r] FILE...
This is definitely a useful script for tracking CVS. I'd like to see
it added to cogito once it is fully debugged.
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2006-07-19 12:38 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-22 12:41 Tracking CVS Jon Smirl
2006-06-22 13:58 ` Petr Baudis
2006-06-22 14:17 ` Jon Smirl
2006-07-19 12:38 ` Petr Baudis
2006-06-22 17:05 ` Junio C Hamano
2006-06-22 17:14 ` Jakub Narebski
2006-06-22 17:43 ` Junio C Hamano
2006-06-23 2:18 ` Jon Smirl
2006-06-23 2:24 ` Jon Smirl
2006-06-23 2:31 ` Petr Baudis
2006-06-23 18:14 ` Jon Smirl
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).