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

Re: svn merge question

From: Troy Curtis Jr <troycurtisjr_at_gmail.com>
Date: 2007-10-18 05:09:01 CEST

On 10/17/07, Jack Repenning <jrepenning@collab.net> wrote:
> On Oct 17, 2007, at 5:03 PM, Kamesh Jayachandran wrote:
> > I don't think if there was a discussion on this front. We support
> > 'merge source' from some other WC target(and hence can be relative
> > path), in that case we will derive the url from it. Probably we may
> > need *REPOURL*(mapping to current target) or some keywords like
> > PREV, HEAD, COMMITTED upon which we can leverage such relative urls.
> While I can't recall any discussion of this in the context of the
> merge tracking, the fact that "-g" fixes that one case is really kind
> of a coincidence -- and not entirely general, since it sometimes
> happens that you need to merge "from" several different sources, in
> which case this "remember the last one" thing won't save you from
> typing the alternate URL.
> There has, however, been talk from time to time about relative,
> composite local-repository parameters. For example,
> svn merge ./../../../branches/SOMEBRANCH
> would mean "find the URL for '.', apply the relative path shown, and
> use that as the URL for the merge." There are some ambiguities here
> that would have to be worked out, but nothing insurmountable. For
> example, how do you know whether that's a mixed-mode source URL, or
> actually refers to some file? Some modified syntax would probably
> work, say
> svn merge .@@/../../../branches/SOMEBRANCH
> Anyway: there has been some such discussion, but there's no great
> sense of urgency; if you think this is really important, you should
> make your case here, see if someone gets interested.
> As simple work-arounds, I've built myself two little helpers. One,
> called "root", prints out the repository root for the current working
> directory:
> svn info | sed -n '/Repository Root: /s///p'
> Another, called "herein", prints out the URL to the current working
> directory, but on another branch. So, for example, if I'm in ".../
> root/greek/A/B", and type "herein branches/R1", it prints ".../
> branches/R1/greek/A/B". This one's a bit too complicated to paste
> into email, but if you're interested I'd be glad to toss you a copy
> by other means.
> Some examples of use:
> (1) My Buddy Joe emails me "I fixed that bug in r2249." I think
> "hmmm, my wc's at 2319, why is it still broken for me?" I cd to the
> directory where I think the bug is and type "svn log -r2249"; svn
> says precisely nothing. "Grrr, must be in some other directory," I
> grumble. "I wonder where." Oh, never mind, I don't need to guess:
> svn log -vr2249 `root`
> (2) I see that, yeah sure, it was fixed in r2249, but on branches/B1,
> not in trunk where I want it. OK, so I need to merge that:
> svn merge `herein branches/B1`
> -==-
> Jack Repenning
> Chief Technology Officer
> CollabNet, Inc.
> 8000 Marina Boulevard, Suite 600
> Brisbane, California 94005
> office: +1 650.228.2562
> mobile: +1 408.835.8090
> raindance: +1 877.326.2337, x844.7461
> aim: jackrepenning
> skype: jrepenning

I know that I have got many complaints about full URLs from some of
the developers that use the Subversion repo that I administer. I've
also done my fair share of grumbling when I'm having to work directly
with the repo. I was really excited when svnmerge introduced the
ability to use "non-ambiguous" substrings of your initialized paths.
Of course, it has it easier since you must init the destination
directory before you do anything else (which I didn't particularly
like, but what can you do). It was also a big hit with my users and
in fact almost completely rid them of having to type full URLs.

While supporting relative URLs as you have them may be useful in some
situations, I find that keeping track of all those "../"s very
difficult. I am mainly looking for a relative to the repository root
syntax. I do think that other people have similar opinions

I think it would be best to mirror the svn:externals relative syntax
as much as possible for consistency. I personally only *really* care
about the "^/branches/a" syntax for root relative values. Like you
said in order to support "../" concepts some other markup would have
to be introduced.

I would think that Blair Zajac would have already done much of the
work needed to support the "^/branches/a" syntax and that putting it
into the command-line client shouldn't be too much of a problem. I
will try to look into implementing it myself, (possibly) based on
Blairs work.


"Beware of spyware. If you can, use the Firefox browser." - USA Today
Download now at http://getfirefox.com
Registered Linux User #354814 ( http://counter.li.org/)
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 18 05:09:44 2007

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

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