Discussion:
Switching to a branch
Wayne Johnson
2013-04-26 18:46:48 UTC
Permalink
Quite often I will start coding a feature on our trunk (AKA HEAD) and after starting to change the code realize that I probably want to do this on a branch. This is fairly easy to do, I simply create the branch with something like:

cvs rtag forkName all
cvs rtag -b branchName -r forkName all

Then from my modified workspace I morph it into the created branch:

cvs up -r branchName

The problem I'm having is that any file that has been added previously is not morphed over to the branch but remains "added" to the trunk.

To fix this, I've gone into the CVS/Entries file and appended the branch tag to the added file entries (don't try this without parental supervision kids).

Is there a better way?


 
---
Wayne Johnson,             | There are two kinds of people: Those
3943 Penn Ave. N.          | who say to God, "Thy will be done,"
Minneapolis, MN 55412-1908 | and those to whom God says, "All right,
(612) 522-7003             | then, have it your way." --C.S. Lewis
Arthur Barrett
2013-04-29 21:46:35 UTC
Permalink
Wayne,

All I can think of is:
ivybridge-3:test abarrett$ cvs up -A -r branch-1 | grep ^A
cvs update: Updating .
A bzzt.txt
ivybridge-3:test abarrett$ mv bzzt.txt bzzt-1.txt
ivybridge-3:test abarrett$ cvs remove bzzt.txt
cvs remove: removed `bzzt.txt'
ivybridge-3:test abarrett$ mv bzzt-1.txt bzzt.txt
ivybridge-3:test abarrett$ cvs add bzzt.txt
cvs add: scheduling file `bzzt.txt' for addition on branch `branch-1'
cvs add: use `cvs commit' to add this file permanently
ivybridge-3:test abarrett$ cvs ci -m "test"


But I agree - it's a lot of work for a small payoff.

I've added an enhancement request for CVSNT:
http://customer.march-hare.com/webtools/bugzilla/ttshow_bug.cgi?tt=1&id=6663

Regards,


Arthur Barrett
-----Original Message-----
org] On Behalf Of Wayne Johnson
Sent: 27 April 2013 04:47
Subject: Switching to a branch
Quite often I will start coding a feature on our trunk (AKA
HEAD) and after starting to change the code realize that I
probably want to do this on a branch. This is fairly easy to
cvs rtag forkName all
cvs rtag -b branchName -r forkName all
cvs up -r branchName
The problem I'm having is that any file that has been added
previously is not morphed over to the branch but remains
"added" to the trunk.
To fix this, I've gone into the CVS/Entries file and appended
the branch tag to the added file entries (don't try this
without parental supervision kids).
Is there a better way?
 
---
Wayne Johnson,             | There are two kinds
of people: Those
3943 Penn Ave. N.          | who say to God, "Thy will be done,"
Minneapolis, MN 55412-1908 | and those to whom God says, "All right,
(612) 522-7003             | then, have it your
way." --C.S. Lewis
Loading...