You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Kevin Hung <cy...@yahoo.com> on 2005/11/14 01:13:21 UTC

Newbie question about tagging

In svn, we can use "copy" to do tagging. My concern is
that just before svn processes my copy command,
another user just checks in a new version of a file
(say foo.c). In this case, would my tag include the
new version of foo.c? I want the tag to have the old
version of foo.c which is the same as my local copy.

 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Newbie question about tagging

Posted by Theo Van Dinter <fe...@kluge.net>.
On Sun, Nov 13, 2005 at 05:13:21PM -0800, Kevin Hung wrote:
> In svn, we can use "copy" to do tagging. My concern is
> that just before svn processes my copy command,
> another user just checks in a new version of a file
> (say foo.c). In this case, would my tag include the
> new version of foo.c? I want the tag to have the old
> version of foo.c which is the same as my local copy.

I'd say that it would depend on your copy command.  The easiest thing,
I believe, would be to add in the appropriate "-r REV" option and then
it's not an issue. :)

-- 
Randomly Generated Tagline:
Have an affair.  It will help break up the monogamy.

Re: Newbie question about tagging

Posted by Steve Williams <st...@kromestudios.com>.
Kevin Hung wrote:
> Then what about a more complicated scenario like
> below:
> 
> (1) I have made a few changes in my local workspace
> and committed all these changes into the repository. 
> 
> (2) I have not done any work for a few days. However
> during these few days, someone commits whole bunch of
> changes into the repository.
> 
> Now I want to make a tag based on the revisions of all
> the files in my local workspace. Is this possible? Or
> is it possible to figure the revision number of the
> root directory corresponding to my local workspace?

The revision number is repository-wide, so there is no revision number 
per file.

You can find the revision of your working copy by using the 'svnversion' 
command-line tool.

The revision number of your commit is returned after the commit 
succeeds.  You could try remembering that number.

You could always check the log as well.  That will tell you the revision 
number of your commit.

-- 
Sly


This message and its attachments may contain legally privileged or confidential information. This message is intended for the use of the individual or entity to which it is addressed. If you are not the addressee indicated in this message, or the employee or agent responsible for delivering the message to the intended recipient, you may not copy or deliver this message or its attachments to anyone. Rather, you should permanently delete this message and its attachments and kindly notify the sender by reply e-mail. Any content of this message and its attachments, which does not relate to the official business of the sending company must be taken not to have been sent or endorsed by the sending company or any of its related entities. No warranty is made that the e-mail or attachment(s) are free from computer virus or other defect.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Newbie question about tagging

Posted by Duncan Murdoch <su...@murdoch-sutherland.com>.
Kevin Hung wrote:
> Then what about a more complicated scenario like
> below:
> 
> (1) I have made a few changes in my local workspace
> and committed all these changes into the repository. 
> 
> (2) I have not done any work for a few days. However
> during these few days, someone commits whole bunch of
> changes into the repository.
> 
> Now I want to make a tag based on the revisions of all
> the files in my local workspace. Is this possible? Or
> is it possible to figure the revision number of the
> root directory corresponding to my local workspace?

This question doesn't quite make sense.  Tags correspond to states of 
the repository, not your working copy.  So you need to think about how 
to get your work into the repository without having it be contaminated 
by all those changes in (2), and *then* tag it.

The way to do this is to create a branch, commit your changes to that 
branch, and then create a tag based on that commit.  In svn, you'd use 
svn copy to create the branch (with a -r option to fix the starting 
version), svn switch to switch your working copy to the branch, svn 
commit to commit your changes, and then svn copy again to create a tag.

This is not the best way to work.  A better way to work is to create the 
branch before you make any changes; then you don't have changes to trunk 
files in your working copy that don't really belong on the trunk.  But 
sometimes you do start the work before realizing how extensive it will be.

It's also a good idea to commit frequently.  Don't have uncommitted 
changes sitting in your working copy.  If the changes aren't ready for 
prime time, commit them on a branch.

Duncan Murdoch



> 
> 
> 
> --- Gavin Lambert <ga...@compacsort.com> wrote:
> 
> 
>>Quoth Kevin Hung <ma...@yahoo.com>:
>>
>>>But then what if I have a lot of directories and
>>>files? I know that I can "copy" recursively from
>>
>>the
>>
>>>top-level directory and do the copy based on the
>>>version number of the top-level directory. But how
>>
>>do
>>
>>>I know the relationship between the version number
>>
>>of
>>
>>>the top-level directory and the version number of
>>
>>any 
>>
>>>particular file?
>>
>>Do the copy based on the highest-numbered revision
>>that you want to copy
>>(which will be the file's revision, not the
>>top-level folder's
>>revision).
>>
>>So if you've done a commit and the files involved in
>>the commit got
>>listed as revision 67, then copy from the root dir
>>with -r67.  It
>>doesn't matter what revision the top-level dir says
>>-- that's the latest
>>revision that the folder itself got changed, which
>>usually won't
>>correspond with the changes you just made.  And the
>>next commit that
>>anyone makes, no matter where in the repository they
>>make it, will be
>>assigned the next revision number (68), which means
>>that you'll exclude
>>it from your copy.
>>
>>
> 
> 
> 
> 
> 		
> __________________________________ 
> Start your day with Yahoo! - Make it your home page! 
> http://www.yahoo.com/r/hs
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Newbie question about tagging

Posted by Kevin Hung <cy...@yahoo.com>.
Then what about a more complicated scenario like
below:

(1) I have made a few changes in my local workspace
and committed all these changes into the repository. 

(2) I have not done any work for a few days. However
during these few days, someone commits whole bunch of
changes into the repository.

Now I want to make a tag based on the revisions of all
the files in my local workspace. Is this possible? Or
is it possible to figure the revision number of the
root directory corresponding to my local workspace?



--- Gavin Lambert <ga...@compacsort.com> wrote:

> Quoth Kevin Hung <ma...@yahoo.com>:
> > But then what if I have a lot of directories and
> > files? I know that I can "copy" recursively from
> the
> > top-level directory and do the copy based on the
> > version number of the top-level directory. But how
> do
> > I know the relationship between the version number
> of
> > the top-level directory and the version number of
> any 
> > particular file?
> 
> Do the copy based on the highest-numbered revision
> that you want to copy
> (which will be the file's revision, not the
> top-level folder's
> revision).
> 
> So if you've done a commit and the files involved in
> the commit got
> listed as revision 67, then copy from the root dir
> with -r67.  It
> doesn't matter what revision the top-level dir says
> -- that's the latest
> revision that the folder itself got changed, which
> usually won't
> correspond with the changes you just made.  And the
> next commit that
> anyone makes, no matter where in the repository they
> make it, will be
> assigned the next revision number (68), which means
> that you'll exclude
> it from your copy.
> 
> 



		
__________________________________ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Newbie question about tagging

Posted by Gavin Lambert <ga...@compacsort.com>.
Quoth Kevin Hung <ma...@yahoo.com>:
> But then what if I have a lot of directories and
> files? I know that I can "copy" recursively from the
> top-level directory and do the copy based on the
> version number of the top-level directory. But how do
> I know the relationship between the version number of
> the top-level directory and the version number of any 
> particular file?

Do the copy based on the highest-numbered revision that you want to copy
(which will be the file's revision, not the top-level folder's
revision).

So if you've done a commit and the files involved in the commit got
listed as revision 67, then copy from the root dir with -r67.  It
doesn't matter what revision the top-level dir says -- that's the latest
revision that the folder itself got changed, which usually won't
correspond with the changes you just made.  And the next commit that
anyone makes, no matter where in the repository they make it, will be
assigned the next revision number (68), which means that you'll exclude
it from your copy.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Newbie question about tagging

Posted by Kevin Hung <cy...@yahoo.com>.
But then what if I have a lot of directories and
files? I know that I can "copy" recursively from the
top-level directory and do the copy based on the
version number of the top-level directory. But how do
I know the relationship between the version number of
the top-level directory and the version number of any
particular file? 

I think this must be doable and I am missing
something.



--- Steve Williams <st...@kromestudios.com>
wrote:

> Kevin Hung wrote:
> > In svn, we can use "copy" to do tagging. My
> concern is
> > that just before svn processes my copy command,
> > another user just checks in a new version of a
> file
> > (say foo.c). In this case, would my tag include
> the
> > new version of foo.c? I want the tag to have the
> old
> > version of foo.c which is the same as my local
> copy.
> 
> Use the -r option to copy a particular revision. 
> Then it doesn't matter 
> how many people commit changes just prior to you
> issuing the copy 
> command.  You will always get a copy of the exact
> revision that you want.
> 
> -- 
> Sly
> 
> 
> This message and its attachments may contain legally
> privileged or confidential information. This message
> is intended for the use of the individual or entity
> to which it is addressed. If you are not the
> addressee indicated in this message, or the employee
> or agent responsible for delivering the message to
> the intended recipient, you may not copy or deliver
> this message or its attachments to anyone. Rather,
> you should permanently delete this message and its
> attachments and kindly notify the sender by reply
> e-mail. Any content of this message and its
> attachments, which does not relate to the official
> business of the sending company must be taken not to
> have been sent or endorsed by the sending company or
> any of its related entities. No warranty is made
> that the e-mail or attachment(s) are free from
> computer virus or other defect.
> 



		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Newbie question about tagging

Posted by Steve Williams <st...@kromestudios.com>.
Kevin Hung wrote:
> In svn, we can use "copy" to do tagging. My concern is
> that just before svn processes my copy command,
> another user just checks in a new version of a file
> (say foo.c). In this case, would my tag include the
> new version of foo.c? I want the tag to have the old
> version of foo.c which is the same as my local copy.

Use the -r option to copy a particular revision.  Then it doesn't matter 
how many people commit changes just prior to you issuing the copy 
command.  You will always get a copy of the exact revision that you want.

-- 
Sly


This message and its attachments may contain legally privileged or confidential information. This message is intended for the use of the individual or entity to which it is addressed. If you are not the addressee indicated in this message, or the employee or agent responsible for delivering the message to the intended recipient, you may not copy or deliver this message or its attachments to anyone. Rather, you should permanently delete this message and its attachments and kindly notify the sender by reply e-mail. Any content of this message and its attachments, which does not relate to the official business of the sending company must be taken not to have been sent or endorsed by the sending company or any of its related entities. No warranty is made that the e-mail or attachment(s) are free from computer virus or other defect.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org