git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Tracking CVS

From
Jon Smirl <jonsmirl@gmail.com>
Date
Jun 22, 2006, 14:17 UTC
Message-ID
<9e4733910606220717of2ba299ta8a38c7d63fd5635@mail.gmail.com>
In-Reply-To
<20060622135831.GB21864@pasky.or.cz>
On 6/22/06, Petr Baudis <pasky@suse.cz> wrote:
Show 33 quoted lines
> 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
Previous: Petr BaudisNext: Petr Baudis
Message 3 of 11 in “Tracking CVS”
  1. Jon SmirlJun 22, 2006
  2. Petr BaudisJun 22, 2006
  3. Jon SmirlJun 22, 2006
  4. Petr BaudisJul 19, 2006
  5. Junio C HamanoJun 22, 2006
  6. Jakub NarebskiJun 22, 2006
  7. Junio C HamanoJun 22, 2006
  8. Jon SmirlJun 23, 2006
  9. Jon SmirlJun 23, 2006
  10. Petr BaudisJun 23, 2006
  11. Jon SmirlJun 23, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.