Will's blog

purpose: Will Kahn-Greene's blog of Python, Linux, random content, PyBlosxom, Miro, and other projects mixed in there ad hoc, half-baked, and with a twist of lemon

Wed, 12 Dec 2007

Pretending to add new files with cvs

I was throwing together a patch for Firefox 3 and needed to add some files to CVS but I don't have add privs. If I don't add the files, then they don't show up in the diff. After a Google search, I bumped into fakeadd which tweaks the Entries file so that the new files show up in the diff. No clue if that's a good thing, but it certainly fixes the problem I was having.

Posted by Stephen Vermeulen on Thu Dec 13 09:39:01 2007
You could also so a distributed version control tool like Mercurial to help with this sort of thing. just go to the parent directory where your CVS checkout starts (a directory called mydir below) at do:

hg init mydir
cd mydir

and then add the files you want to track with one or more runs of:

hg add *.cpp

if you need to do this recursively for all sub directories:

hg add glob:**.cpp

would work

then you can do:

hg status

or:

hg diff

to see what you've touched or done.

If you:

hg commit -m "some message"

you can checkpoint your work in your private repository as needed.

Mercurial only adds one ".hg" subdirectory to "mydir" (not throught the whole tree like CVS) and it should work alongside CVS without confusing things.


Posted by will on Thu Dec 13 09:48:55 2007
I was using bazaar to keep track of changes in my changes locally.

However, that doesn't actually solve my issue.  I needed to create a patch against the latest in CVS of the changes I had made including the new files I needed to add.  But new files to CVS won't show up in the diff unless they've been added to the CVS tree (unless I'm doing it wrong--that's entirely possible).  But I can't add because I don't have CVS checkin privs.

fakeadd solved that problem.


Please keep comments appropriate. I reserve the right to remove anonymous comments, flames, spammy, inappropriate, and other comments that I deem to be worth removing.

Note: New comments get placed in a "draft" status and will NOT show up on the site until I explicitly approve it. Usually that happens within 24 hours, but sometimes I go away and it takes a day or two.

Note 2: There is now a preview button for those of you who want to see a preview! However, it doesn't quite work the way you'd think it should work. I'll look into adjusting it some day.

Note 3: If you can't for some reason post a comment, send me an email: willg at bluesock dot org.

Your name:


Your e-mail address (this doesn't get displayed to anyone--I use it to contact you if there are issues):


URL of your website (optional):


Comment:


Yes, I am a human!

pyblosxom::2.0 dev

All contents Copyright 1996 to 2008 Will Guaraldi.
Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.