[Top][All Lists]

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

Re: [Newbie] Committing .. and then?

From: Jim Hyslop
Subject: Re: [Newbie] Committing .. and then?
Date: Sun, 26 Jul 2009 13:51:39 -0400
User-agent: Thunderbird (Macintosh/20090605)

Hash: SHA1

address@hidden wrote:
> May I ask another question?  I have a load of shell scripts in $HOME/bin...
> nothing fancy, just some shit that I've knocked together over the years to
> do various menial crap that I can't be bothered remembering the various
> switches to.  Now I want to add them to cvs, but what do I do with the
> files in $HOME/bin ?  They need to stay there, as my $PATH points there.
> When an 'import' is done, are the files in $HOME/bin copied to $CVSROOT, a
> la 'ln -s'?  In short, do I need to do.. 
> $ cd $HOME/bin
> $ cvs import -m "my shell scripts" me bin *
> $ rm -rfv $HOME/bin
> $ cvs checkout bin
> ..?
> Wouldn't that recreate the appropriate files in $HOME/bin, and I could
> edit, commit and update at will?   Do I *need* to delete them at all?
> Can't I just .. 
> $ cd $HOME/bin
> $ cvs import -m "my shell scripts" me bin *
> $ cvs checkout bin
No, because the checkout command not only retrieves the files from the
repository, it creates a CVS subdirectory containing its administrative
files. If you tried checking out with the files present, you would get a
lot of confusing error messages.

What I often do for scripts like that is to import the scripts, then set
up a commit script that will copy the files from the repository into the
target directory (in your case, $HOME/bin). I do that because sometimes
the modifications and fine-tuning take longer than expected, and I have
to switch to other tasks before the modifications are complete. In that
case, I don't want to use the half-baked scripts.

See the Cederquist section "Keeping a checked out copy"
( for
details on how to do that.

- --
Jim Hyslop
Dreampossible: Better software. Simply.
                 Consulting * Mentoring * Training in
    C/C++ * OOD * SW Development & Practices * Version Management
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla -


reply via email to

[Prev in Thread] Current Thread [Next in Thread]