[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Merge issues

From: Lakshman Srilakshmanan <lakshman.srilakshmanan_at_tradingpost.com.au>
Date: 2006-09-27 04:44:10 CEST

Hmmmmm interesting...!!! :)

How did you create a branch ? I don't think you created a branch from
trunk using svn copy file:///repos/trunk file:///repos/branch/my_branch
b_dir.

If you branched before you added the file then your branch would be
revision one and your file in trunk will be revision 2.

if you branched after you added your file in trunk then your branch
would include the file in trunk.

Thanks
Lakshman

> -----Original Message-----
> From: Negron, Carlos [mailto:carlos.negron@credit-suisse.com]
> Sent: Wednesday, 27 September 2006 6:51 AM
> To: 'Jamie Wellnitz'; Negron, Carlos
> Cc: Lakshman Srilakshmanan
> Subject: RE: Merge issues
>
> Hi Jamie,
>
> Your first assumption is correct. Code in the r1 (there is no r0)
> does not make it into my merge.
>
> So my question is how do I merge revision 1 of my trunk into my
current
> branch? And why do I specify a url at the end of the command?
>
> Thanks Again.
>
> I await your reply?
>
> -----Original Message-----
> From: 'Jamie Wellnitz' [mailto:Jamie.Wellnitz@emulex.com]
> Sent: Tuesday, September 26, 2006 2:42 PM
> To: Negron, Carlos
> Cc: 'Lakshman Srilakshmanan'
> Subject: Re: Merge issues
>
> On Tue, Sep 26, 2006 at 02:27:49PM -0400, Negron, Carlos wrote:
> > Hi Jamie,
>
> Hi Carlos,
>
> >
> > Yes this makes sense and this is what I did, but I have to review.
> >
> > Here are the command I executed:
> >
> > svn co -r file:///repos/branch/my_branch b_dir cd b_dir svn merge -r
> > 1:HEAD file:///repos/trunk
> >
> > When I do this I have found that specific code from revision 1 in my
> > branch is missing.
>
> I'm assuming you mean code that is in the trunk at revision 1 did not
get merged to the branch.
> Given that . . .
>
> >
> > Any thoughts on this?
>
> svn merge basically works as "diff and patch". The command
>
> svn merge -r 1:HEAD file:///repos/trunk
>
> says "produce a diff of the changes from r1 to the current HEAD and
apply that diff to the current
> working directory". Because the diff generation started with revision
1, any changes from r0 to r1
> won't be in the diff.
>
> Rereading this it looks like maybe you meant that some code that is
currently in the branch
> disappeared in the merge. If that's the case, the same code was
almost certainly on the trunk, but
> was removed at some point and that change (removal of some code) got
merged.
>
> >
> > Regards
> >
> > Carlos
>
> Regards,
> Jamie
>
> >
> > -----Original Message-----
> > From: Jamie Wellnitz [mailto:Jamie.Wellnitz@emulex.com]
> > Sent: Tuesday, September 26, 2006 1:26 PM
> > To: Negron, Carlos
> > Cc: 'Lakshman Srilakshmanan'; users@subversion.tigris.org
> > Subject: Re: Merge issues
> >
> > Carlos,
> >
> > It seems like you might have been closer in your first email.
> >
> > This command:
> >
> > svn merge -r 25:30 file:///repos/branch
> >
> > Merges the changes between r25 and r30 *on the branch* into whatever
working directory you run it
> from.
> >
> > Your first email said:
> >
> > "I am basically attempting to merge from the trunk revision 1 to a
branch"
> >
> > Generally, the most straight-forward way to merge is:
> >
> > 1. check out working directory of target (where you want the merge
> > result) 2. svn merge -r start:end <source URL> 3. svn diff, build,
etc
> > to verify the result 4. svn commit
> >
> > If you want to merge from the trunk to the branch, then the merge
command probably has to be more
> like:
> >
> > svn merge -r 25:30 file:///repos/trunk
> >
> > and needs to be run from within a branch working directory.
> >
> > Does that make sense?
> >
> > Jamie
> >
> > On Tue, Sep 26, 2006 at 06:15:52PM +0100, Negron, Carlos wrote:
> > > Lakshman,
> > >
> > > Thanks for you reply. I read the link and got a deeper
understanding of
> > > how "svn merge -r <num>:<num>" would work.
> > > So it partially answered my question. Also the link focused on
using some
> > > tool, I am using the command line on Unix.
> > >
> > > You see I understand this syntax: svn merge <url>@verA
> > > <url>@verB
> > >
> > > Based on the link below command will take files verA and
compare them to
> > > verB. This issue I found with this type of
> > > merge is, for example: verA of file foo.c has lines of code I
want to
> > > keep. verB has new functionality but does not
> > > have the code I want to keep from verA. So I want to merge.
Thus when I
> > > do a merge the code that I want to keep
> > > gets deleted. I would at least expect a conflict. Also my
working
> > > repository is the branch that contains verB.
> > > This also happens vice versa.
> > >
> > > What I don't understand is this syntax: svn merge -r verA:verB
> > > [1]url@ver
> > >
> > > Can you clarify this syntax as the documentation clearly
explains the -r
> > > options but not what the [2]url@ver indicates?
> > >
> > > Please let me know.
> > >
> > > thanks
> > > Carlos
> > >
> > >
> > >
--------------------------------------------------------------------
> > > --
> > > ----
> > >
> > > From: Lakshman Srilakshmanan
> > > [mailto:lakshman.srilakshmanan@tradingpost.com.au]
> > > Sent: Tuesday, September 26, 2006 1:18 AM
> > > To: Negron, Carlos
> > > Cc: users@subversion.tigris.org
> > > Subject: RE: Merge issues
> > >
> > > Hi Carlos,
> > >
> > >
> > >
> > > Please read the following link
> > > [3]http://svn.haxx.se/users/archive-2006-01/0149.shtml from
Ryan Schmidt.
> > >
> > >
> > >
> > > The above link helped me understand merging. If after reading
the link you
> > > are still unclear let me know and I will attempt to clear your
doubt.
> > >
> > >
> > >
> > > Thanks
> > >
> > > Lakshman
> > >
> > >
> > >
--------------------------------------------------------------------
> > > --
> > > ----
> > >
> > > From: Negron, Carlos [mailto:carlos.negron@credit-suisse.com]
> > > Sent: Tuesday, 26 September 2006 5:14 AM
> > > To: 'users@subversion.tigris.org'
> > > Subject: Merge issues
> > >
> > >
> > >
> > > I'm failing to understand the merge syntax thus failing to
merge my
> > > branches predictably.
> > >
> > > Please explain to me the exact meaning of the command:
> > >
> > > svn merge -r 25:30 [4]file:///repos/branch
> > >
> > > I am basically attempting to merge from the trunk revision 1 to
a branch,
> > > but
> > > I keep seeing my results of "A" for some files and it attempts
to delete
> > > other files
> > > which I don't want and it also deletes portions of code that I
don't want.
> > >
> > > Please help.
> > >
> > > Thanks
> > >
> > > Carlos A. Negron Jr.
> > >
> > >
> > >
====================================================================
> > > ==
> > > ========
> > >
> > > Please access the attached hyperlink for an important electronic
communications disclaimer:
> > >
> > >
> > >
> > > http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
> > >
> > >
> > >
====================================================================
> > > ==
> > > ========
> > >
> > >
> > >
====================================================================
> > > == ======== Please access the attached hyperlink for an important
> > > electronic communications disclaimer:
> > >
> > > http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
> > >
> > >
====================================================================
> > > ==
> > > ========
> > >
> > > References
> > >
> > > Visible links
> > > 1. mailto:url@ver
> > > 2. mailto:url@ver
> > > 3. http://svn.haxx.se/users/archive-2006-01/0149.shtml
> > > 4. file:///\\repos\branch
> >
> >
======================================================================
> > ======== Please access the attached hyperlink for an important
> > electronic communications disclaimer:
> >
> > http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
> >
======================================================================
> > ========
> >
>
>
========================================================================
======
> Please access the attached hyperlink for an important electronic
communications disclaimer:
>
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
>
========================================================================
======

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Sep 27 05:30:40 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.