tags:

views:

34

answers:

2

Hi! Here's my situation...

I'm working on a project and don't have rights to commit to the CVS repository. Instead I have to create and submit patches.

However, sometimes I need to share code with other developers and they send me patches of their own that I need to apply... but then when comes the time to generate my own patch, it includes their code as well and I don't want that!

Is there a way with CVS to generate a patch from a reference other than the repository? This way I could checkout the project twice, apply patches to both of them and compare them to retreive my own modifications...

OR has anyone got a better idea then that?

Thanks!

A: 

You could simulate branching by checking out 3 versions, and applying patches between them as needed, keeping one with just your changes, one with just other devs patches, and finally a third that can have both patches for testing. Generate your patches from the first checkout only and they will be clean.

A better option is to get permission to make commits to a particular branch and make commits to that, applying patches from other developers as needed.

Even better might be to implement your own version control locally, and you could branch and merge to your heart's content and only create patches for sharing when you're ready.

willoller
A: 

You could track your own changes with some DVCS technology. For example, git supports tracking CVS repositories: you keep a git repository synchronized with the CVS repository, and clone that for your own changes. When you receive external patches, you can commit them locally (perhaps creating further clones as necessary); this would allow you to merge and undo stuff fairly freely.

Technologically much more simple: keep a file containing all the external patches that you have applied. Before creating your own patch, revert those changes (with patch -R), then create your patch, then reapply the other changes to continue working.

Martin v. Löwis