> -----Original Message-----
> From: Richard Jones [mailto:richard.d.jones@imperial.ac.uk]
>
> Hi Folks,
>
> Apologies for this potentially newbie questions, but I've been
> scratching my head over this problem for a couple of days,
> and have no
> idea where I'm going wrong.
You went wrong at the beginning. =)
a) You need to specify a range of revisions on the SOURCE branch that
get merged to your workset.
b) Your workset is the TARGET branch.
c) If you ever find yourself trying to specify the TARGET branch in
your merge command, don't, and then refer to a & b above.
d) You're not 'merging' in the traditional sense. Instead you are
applying a set of changes (-r rev1:rev2) from the SOURCE branch to your
workspace (which is the TARGET branch.)
Go read the free O'Reilly Subversion book on the subversion website.
> svn: Revision 50 doesn't match existing revision 31 in 'src/uk'
This means that src/uk does not have a common ancestor. Normally, you
need to use --ignore-ancestry to get around this, however, in your case,
your mis-understanding of Subversion merge is the root issue. Ignore
this for now.
You need to:
1) find what revision the feature branch branched from trunk at: svn
log -v --stop-on-copy url_branch
Look at the last entry:
r222 | jdoe | ....
Changed paths:
A /feature/branch (from /trunk:123)
This will give you REV1. Record REV1. (r222 is REV1, not 123)
REV1 is the start of the range of changes you want from the
SOURCE branch.
2) find the HEAD revision of the feature branch. This is REV2. Record
it.
Find the specific revision and do *not* use HEAD. HEAD is a
random number. Refer to 5) below.
REV2 is the end of the range of changes you want from the SOURCE
branch.
3) check out the workset (which is the TARGET branch)
svn co TARGET_url/trunk
4) svn merge -r REV1:REV2 source_url
where source_url is your feature branch
Note that we do NOT specify the TARGET branch, because the
target is the workset.
This will merge the all the revisions on the SOURCE branch to the
workset.
5) When you commit, you need to record the merge in the commit comment:
merge -r REV1:REV2 source_url
6) The next merge you do from the SOURCE branch, will start at REV2+1.
Ex:
svn merge -r REV2+1:REV3 source_url
where REV3 is the HEAD revision of the SOURCE branch.
>
> I am attempting to merge a feature branch back to a main branch in my
> repository, and it is, for some unknown reason, deleting
> files which are
> present in both branches, thus:
>
> $ svn merge https://[repository]/branches/spiral-bib_item-status
> https://[repository]/branches/spiral-bib
The merge is borked because you're trying to merge
the HEAD of the feature branch (a single revision) plus
the HEAD of the trunk (another single revision)
into
the trunk. :-O
You need to merge a range of revisions on the SOURCE branch to your
workset (your workset is the TARGET branch.)
*****
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. AL622
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jul 21 19:25:14 2006