[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to go back to the branch after mistakenly switching to the trunk

From: Ming Kin Lai
Subject: Re: How to go back to the branch after mistakenly switching to the trunk
Date: Mon, 12 Sep 2005 17:07:51 -0700

Ming Kin Lai <address@hidden> writes:

> I did not read carefully the documentation on "cvs commit -r REV" and
> made a mistake by committing a revision with a specified REV number on
> a branch.
> Specifically, I made a tag on the trunk (let's say at revision 1.1)
> called "Root-of-Branch" before creating a branch called MyBranch using
> "cvs tag -b MyBranch".
> Then I made some changes and tried to call it 2.1 by using
> "cvs commit -r 2.1".

   cvs update -j2.1 -jRoot-of-Branch
   cvs commit

should get the mainline text to be what it was before your problem
commit... assuming that Root-of-Branch was still the top-of-tree
version prior to your problem commit.

> My question is: How can I go back on the branch so that my next
> revision is on the branch?

  cvs update -r MyBranch
  : ...modify the files you want to change
  cvs commit

Actually I am not sure whether I switched to the branch before I committed as Revision 2.1. That is, I am not sure I issued the command
cvs update -r mybranch
after creating that branch (tag -b mybranch) but before commiting the changes as 2.1.
Now after I did a
cvs update -j2.1 -jRoot-of-Branch
I have conflicts that require merging.
1. Does the method you told me depend on whether I did the
cvs update -r mybranch
or not?
2. How can I find out where I am now, trunk or mybranch?  I did a
cvs status -v
The sticky tag is 2.1 - neither blank (if so, I would be on the trunk) nor mybranch (if so, I would be on mybranch).
Thanks for the help.

FREE pop-up blocking with the new MSN Toolbar – get it now!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]