[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: synchronizing local with repository
From: |
Rob Helmer |
Subject: |
Re: synchronizing local with repository |
Date: |
Mon, 15 Apr 2002 09:49:10 -0700 |
User-agent: |
Mutt/1.2.5i |
On Mon, Apr 15, 2002 at 05:14:53PM +0100, Nathan Coast wrote:
> Hi,
>
> I'm trying to automate the following:
>
> Commit all modified files.
> Add all files present locally but missing from repository.
> Merge all files (if possible) that are edited locally and on repository.
>
> I'm trying to eliminate as much human error as possible due to
> developers forgetting to keep the repository consistent with their local
> environments.
>
> I'm assuming that this is possible with cvs. Is it possible to achieve
> this with existing cvs commands or will I have to add intermediary
> stages e.g. generate a list of all files requiring adding and then
> iterate over the list adding each one.
You should get a list of files requiring addition, or you'll get alot
of annoying warnings. It's better to not generate errors than to generate
"ignorable" errors :)
You could take the output of 'cvs -n update', and for each line beginning
with '? ' do a 'cvs add <rest of line>', then 'cvs commit -m "$1"' ( assuming
you're getting input from the developers on commit messages ... )
This is one way that may work, I'm sure there are others ( maybe more
direct than parsing the output of 'cvs -n update' ).
HTH,
Rob Helmer