Jan Zyka
Jan Zyka

Reputation: 17888

CVS commit into directory checked out as branch commits into trunk

I created a new CVS branch, checked it out and addded some folder and files into it. Once I committed the branch changes the files and the directory were committed not into my branch as one would expect but into the trunk.

According to this page this is caused ...

Due to a bug in cvs 1.3 (on which rcvs is currently based), if you add a new file in a directory checked out on a branch, the file will appear on the main line, not on your branch. Caveat scriptor.

So currently I have these new files in trunk only. Fortunatelly no harm. But how can I get those new files into the branch as well? Any tips? Ideally using IntelliJ 9.0 as CVS client. Thanks!

Upvotes: 1

Views: 978

Answers (2)

Jan Zyka
Jan Zyka

Reputation: 17888

So I solved it finally so sharing my experience:

  • suprisingly adding new files to CVS branch is headache in general and everyone (except of myself) knew that.
  • there are many clients which can't do that like IntelliJ 9 or SmartCVS 6 but there is at least one which is capable of this super-diffcult task of adding new files into a branch ...
  • for me the winner was tortoiseCVS

Upvotes: 0

Oliver Giesen
Oliver Giesen

Reputation: 9439

In the simplest case, this should do it (inside your working copy, from the parent folder of your new directory):

cvs up -rBranch
cvs up -jHEAD -d NewDirectory

I.e. update your working copy to the branch and then merge in changes from the trunk version of NewDirectory (creating it in the process (the -d argument)). You still need to commit after that.

Upvotes: 2

Related Questions