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 <gavinl@compacsort.com> wrote:
>
>
>>Quoth Kevin Hung <mailto:cykhung@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
Received on Mon Nov 14 13:12:28 2005