[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Checking out HEAD versus switching to it from a working copy of a branch
From: |
Mahender Didwania |
Subject: |
Checking out HEAD versus switching to it from a working copy of a branch |
Date: |
Tue, 30 Dec 2008 09:05:15 +0000 (GMT) |
Is there any difference between checking out the HEAD versus switching to it
later from a branch (using cvs up -A) ?
I have a branch created from another branch and checked out as my working copy.
I wish to replace HEAD with the working copy, the working copy has no
uncommitted changes. I followed the instructions at
http://kb.wisc.edu/middleware/page.php?id=4087 (section 'Replacing one branch
with another'). But because the commit failed due to pre-commit checks
configured by CVS admin here, I tried the alternative way of checking out HEAD,
doing a merge again as per the instructions on the page referred to above and
then thought it would be better to do a diff between the merge-result from my
first attempt (where I had the branch checked out and later switched to HEAD
before merge) and this attempt; and I found there were differences between the
two post-merge situations. So, is it the case that checking out a branch, then
switching to HEAD, then replacing the working copy with the branch xyz is not
the same as checking out HEAD and replacing the working copy with the branch
xyz?
The descripton of what was done is as follows (assuming I had the branch
checked out, my scenario 1 in above):
HEAD can be replaced with another using a similar syntax to a merge.
Tag the end of your branch
sandbox$ cvs tag merge_NEW_FEATURE_ADD_BRANCH
Move back to HEAD, or to the branch you want to REPLACE:
To HEAD:
sandbox$ cvs up -A
Do the replace. (Order is important. Note that the version that is being
replaced comes first.)
Replacing HEAD:
sandbox$ cvs up -jHEAD -jNEW_FEATURE_ADD_BRANCH
Commit changes back to CVS.
sandbox$ cvs ci
I read somewhere that merging using a tag will result in commit failure. So,
the merge uses the branch name and not the tag name as the argument to the
second -j option.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Checking out HEAD versus switching to it from a working copy of a branch,
Mahender Didwania <=