info-cvs
[Top][All Lists]
Advanced

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

Re: loosing branch when updating to a tag on the branch


From: todd breslow
Subject: Re: loosing branch when updating to a tag on the branch
Date: Fri, 23 Jul 2004 11:14:26 -0400

Jim and Royan,

Many thanks. In my example robots.txt did not change, but I did expected to see the status reflect that I still had the branch in my working directory. After updating to the test_tag_in_branch tag and looking at the status of another file that is indeed different on the branch than in the trunk:

[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!

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?

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)








reply via email to

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