[techtalk] Re: Write down while you are modifying the system... (was: [techtalk] New here)

Laurel Fan lf25+ at andrew.cmu.edu
Mon Apr 30 11:10:42 EST 2001


Excerpts from linuxchix: 30-Apr-101 Re: [techtalk] Re: Write do.. by
Mary Gardiner at puzzling.o 
> X outside project (say an open source project) has a cvs tree. I
> want to be able to import their CVS tree, whilst at the same time
> maintaining my own tree, probably minor, of changes, and resyncing
> every so often.

I'm assuming you don't want to commit to their tree.  If you do, it
would be easier to use branching within their repository.

If what you want to do is essentially to keep your personal patch to
their stuff in your own repository, what I do is:

1. Start by checking out their repository, 

2. Working in your checkout of their repository, make whatever changes
you want.

3. Make a patch for it using diff, or cvs diff.  using the -u option
makes it more readable, and patch likes it more.

4. Put this patch into your cvs.

If you want to make a change:

1. Work on your checkout of their repository, and make the change.

2. Make a new patch.

3. Commit the new patch on top of your old patch.

4. Now you have a revision history of your patch.

If you want to sync with the repository:

1. Do a cvs update of your checkout of their repository.

If it's clean (no conflicts), then you can stop here, since your old
patch will probably work, or you can make a new one, if it's changed.
(cvs and patch can handle the changed segment moving around)

If it's not, resolve the conflict, and then make patch/commit it.

Now, if you checkout a new copy of their repository, you should be
able to apply your patch to it, and get your modified version.  If you
want to be fancy, you can tag your patch with the same tags they use.






More information about the Techtalk mailing list