[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: loosing branch when updating to a tag on the branch
From: |
Rohan Nandode |
Subject: |
Re: loosing branch when updating to a tag on the branch |
Date: |
Fri, 23 Jul 2004 21:44:59 +0530 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830 |
[production/codebase/Objects] breslow% cvs status AbstractEntry.php
===================================================================
File: AbstractEntry.php Status: Up-to-date
Working revision: 1.17.4.1
Repository revision: 1.17.4.1
/usr/home/giro1150/cvsroot/codebase/Objects/AbstractEntry.php,v
Sticky Tag: test_tag_in_branch (revision: 1.17.4.1)
Sticky Date: (none)
Sticky Options: (none)
[production/codebase/Objects] breslow%
I can see that the file is indeed the revision from the branch. But as
now the sticky tag is the tag name I updated to the association with the
branch is lost? (I now understand what Rohan says, tags are not
associated with branches but with revisions of files.)
I edited this file and tried to check it in and got the following:
[production/codebase/Objects] breslow% cvs ci -m "Will it check in to
branch?" AbstractEntry.php
cvs server: sticky tag `test_tag_in_branch' for file `AbstractEntry.php'
is not a branch
cvs [server aborted]: correct above errors first!
Tags are to basically to mark certain state of your code base for future
references. so when you update on that tag you are going to that
particular state - which is a state in past. As we cannot change our
past, you cannot change this updated code in CVS. Its kind of readonly.
Branches give you way to have separate code base, where you can change
your code as required. When you update on branch tag (don't think -A
would be needed, check man page though), you get the latest code of that
branch.
What is the correct practise here when you tag the state of your working
directory when working in a branch, update to that tag (let's say to
rollback a change) and want to check edits back in to the branch? Is it
possible to update -A -r <branch_name> and that is how my edits would
get merged into the branch and then I check in and I am good to go?
I'm sorry, I don't understand what you want to do!
BTW, If you want to rollback changes done in a branch after certain tag,
- take branch code
- take diff of a file with this tag
- apply those changes to the file ( you can directly merge versions,
see manual at www.cvshome.org for more help)
- with cvs diff check the changes done
- commit file the file - it will be commited in the branch
HTH
Rohan
Many thanks,
Todd
On Jul 23, 2004, at 10:50 AM, Rohan Nandode wrote:
[g5/production/codebase] breslow% cvs status robots.txt
===================================================================
File: robots.txt Status: Up-to-date
Working revision: 1.3
Repository revision: 1.3
/usr/home/giro1150/cvsroot/codebase/robots.txt,v
Sticky Tag: release_5_branch (branch: 1.3.4)
Sticky Date: (none)
Sticky Options: (none)
[g5/production/codebase] breslow% cvs tag test_tag_in_branch
[g5/production/codebase] breslow% cvs up -r test_tag_in_branch
[g5/production/codebase] breslow% cvs status robots.txt
===================================================================
File: robots.txt Status: Up-to-date
Working revision: 1.3
Repository revision: 1.3
/usr/home/giro1150/cvsroot/codebase/robots.txt,v
Sticky Tag: test_tag_in_branch (revision: 1.3)
Sticky Date: (none)
Sticky Options: (none)
Your branch is not lost, cvs just updated the file from branch to one
particular tag, whhich happens to be on trunk.
This is because robots.txt is same for both trunk and branch( see its
version is 1.3 for both). if you check in this file into the branch,
its version will be increamented for branch and then cvs update on
branch will give you the branch version.
There is one more thing that tags are not associated with branches but
its associated with versions. i.e. if you tag branch code, cvs
wouldn't store that tag is for branch code. so when you update for
that tag, it just takes out particular version of all files tagged
with the tag.
So you will never get, something like this, when you update on sticky
tag. i.e no (brach:version) in "Sticky Tag"
> /usr/home/giro1150/cvsroot/codebase/robots.txt,v
> Sticky Tag: test_tag_in_branch ( branch: <whatever_ver>)
> Sticky Date: (none)
> Sticky Options: (none)
- loosing branch when updating to a tag on the branch, todd breslow, 2004/07/23
- RE: loosing branch when updating to a tag on the branch, Jim.Hyslop, 2004/07/23
- RE: loosing branch when updating to a tag on the branch, Jim.Hyslop, 2004/07/23
- RE: loosing branch when updating to a tag on the branch, Rick Genter, 2004/07/23
- RE: loosing branch when updating to a tag on the branch, Jim.Hyslop, 2004/07/23
- RE: loosing branch when updating to a tag on the branch, Fabian Cenedese, 2004/07/26
- RE: loosing branch when updating to a tag on the branch, Rick Genter, 2004/07/26
- RE: loosing branch when updating to a tag on the branch, Yamuna Ramasubramaniyan, 2004/07/26