[Svnmerge] Initializing New Branches - Already Initialized?
Thomas F. O'Connell
tf at o.ptimized.com
Mon Jan 8 14:01:30 PST 2007
On Jan 8, 2007, at 3:50 PM, Daniel Rall wrote:
> On Mon, 08 Jan 2007, Thomas F. O'Connell wrote:
>
>> On Jan 4, 2007, at 3:04 PM, Daniel Rall wrote:
>>
>>> On Thu, 04 Jan 2007, Thomas F. O'Connell wrote:
>>>
>>>> Whenever I create a new branch, e.g.,
>>>>
>>>> cd working-copy-top-dir
>>>> svn copy trunk branches/new-branch-n
>>>>
>>>> And then try to initialize the branch, e.g.,
>>>>
>>>> cd branches/new-branch-n
>>>> svnmerge.py init
>>>>
>>>> I get the following error:
>>>>
>>>> svnmerge: /vhost/trunk has already been initialized at .
>>>> Use --force to re-initialize
>>>>
>>>> Am I missing something? Why would brand new branches already be
>>>> initialized?
>>>
>>> Does trunk already have the svnmerge-integrated property set on it
>>> before you create the branch (via 'svn cp')?
>>
>> Apparently. In trunk:
>>
>> svn proplist .
>> Properties on '.':
>> svnmerge-blocked
>> svnmerge-integrated
>> svk:merge
>>
>> Is this ill-advised? What should I do to correct it?
>
> Well, you can't re-initialize a branch directory. If you no longer
> need the record of merges which have occurred into your trunk, you can
> delete the merge info via:
>
> svn propdel svnmerge-integrated
>
> BEWARE: This will LOSE ALL MERGE HISTORY for merges into trunk.
>
> Alternately, you can use 'svnmerge.py merge --record-only' (or just
> 'svn propedit') to explicitly mark all revisions from trunk as merged
> into your new branch (which is probably closer to what you're looking
> for).
Well, here's my scenario: I have a trunk and often create feature-
specific branches that get developed at a variety of paces, but none
of which I want to hold up patches to the trunk or merging of other
branches. My expectation is that the trunk and branches are all
bidirectional (although I've had a hard time deciphering what the
best practices are for initial setup and ongoing maintenance of this
scenario).
From reading the built-in help and the wiki documentation, I had
thought that the appropriate way to create a new branch was to create
a copy of trunk as a branch and then to initialize both.
E.g.,
cd cd working-copy-top-dir
svn copy trunk branches/new-branch-n
cd branches/new-branch-n
svnmerge.py init
cd ../trunk
svnmerge.py init -r 1:[revision corresponding to n] [URL to new-
branch-n]
Often, I'll need to patch something in trunk as branches are
midstream. Then I want to merge a branch back to trunk and possibly
merge those changes out to other feature branches.
Initial setup has been one confusing aspect. In the case above, when
I got the error, I went ahead and just used --force to
"re-"initialize the new branch(es).
I'm also a little unclear about when/how to use -b to my benefit when
conducting merges.
I see all these issues as related to what would strike me as a fairly
common usage pattern, and I'd be happy to contribute to improving
documentation once I get my head around how best to proceed a little
better.
--
Thomas F. O'Connell
optimizing modern web applications
: for search engines, for usability, and for performance :
http://o.ptimized.com/
615-260-0005
More information about the Svnmerge
mailing list