On Mar 31, 2008, at 04:02, Ryan Schmidt wrote:
> On Mar 31, 2008, at 01:53, Ding Honghui wrote:
>
>> Ryan Schmidt wrote:
>>
>>> On Mar 30, 2008, at 21:43, Ding Honghui wrote:
>>>
>>>> At version 9, I copy trunk code as branch and develop both in
>>>> branch and
>>>> trunk. Now, I want merge the branch code to trunk and I forgot
>>>> which
>>>> version I copied to. Then how can I merge the change back to trunk?
>>>
>>> At *revision* 9, you copied trunk to a new branch. Hopefully,
>>> that's all
>>> you did in revision 9 -- that is, hopefully you didn't copy trunk
>>> to a
>>> branch *and* make changes in the branch in revision 9.
>>>
>>> Now you've made changes in the branch and let's assume the HEAD
>>> of the
>>> repository is now 20 and you want to merge the branch back into the
>>> trunk. Get a working copy of trunk, and merge revisions 9 thru 20
>>> of the
>>> branch to the trunk, like this:
>>>
>>> svn merge -r 9:20 url://to/your/branch
>>>
>>> Resolve any conflicts, test to make sure everything works, then
>>> you can
>>> commit the change:
>>>
>>> svn ci -m "Merging r9:20 of my branch into trunk"
>>
>> The question is *I forget which version I copied to branch*
>>
>> Should I go over the log to find it?
>>
>> and If the log is NULL, the things is worse..
>
> Use the --stop-on-copy option to svn log to determine what revision
> you copied the branch from. Example:
>
> $ svn log http://svn.collab.net/repos/svn/branches/1.5.x/ --stop-on-
> copy -r 1:HEAD --limit 1
> ----------------------------------------------------------------------
> --
> r29081 | hwright | 2008-01-30 12:01:24 -0600 (Wed, 30 Jan 2008) | 2
> lines
>
> Create the release branch for release 1.5.0.
>
> ----------------------------------------------------------------------
> --
>
> So we now know that the 1.5.x branch of Subversion was created in
> r29081.
Sorry, I forgot a bit:
$ svn log http://svn.collab.net/repos/svn/branches/1.5.x/ --stop-on-
copy -r 1:HEAD --limit 1 -v
------------------------------------------------------------------------
r29081 | hwright | 2008-01-30 12:01:24 -0600 (Wed, 30 Jan 2008) | 2
lines
Changed paths:
A /branches/1.5.x (from /trunk:29080)
Create the release branch for release 1.5.0.
------------------------------------------------------------------------
You see, with the -v flag, the log furthermore tells us that the
1.5.x branch was copied from r29080 of trunk. That's the information
you probably really wanted.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-03-31 11:13:00 CEST