> On Aug 18, 2009, at 22:10, David Carson wrote:
> >> On Tue, Aug 18, 2009 at 03:39:39PM -0700, David Carson wrote:
> >>> Why not solve both of these issues by simply adding a new
> >>> command: "svn origin"
> >>> 1. The new command would return URL:revision, and nothing else.
> >>> No parsing of the log output necessary.
> > All I care about right now is that all copies are done in such a
> > way that retrieving the source of the copy is simple and
> > definitive. This seems quite straightforward. The information is
> > available at the time of the copy, but it is too cumbersome to get
> > to it later, IMHO.
> Something like what the attached script does?
> $ svnorigin.sh http://svn.collab.net/repos/svn/tags/1.6.4
> $ svnorigin.sh http://svn.collab.net/repos/svn/branches/1.6.x
Yes, your script attempts to get the information I'm looking for. However, ...
> >>> 2. The new command would always return the real origin of the
> >>> branch, not a copy that might or might not be the original copy.
> I wasn't sure what you meant by this. Did you mean that, in the above
> example, if you use svnorigin on the 1.6.4 tag, it should say it came
> from trunk?
Your script does not work if the branch was renamed. This is the problem Derek raised. The problem is that the --stop-on-copy option causes the log command to stop the first time it sees a copy. The rename command is a delete followed by a copy.
I suppose this begs the question: Is the rename command the real culprit, and should it be made to behave such that it is distinguished from a regular delete/add series?
However, I don't want to go that deep just now. What I'm saying is, the origin information is basic and extremely valuable. So:
1. It seems prone to error if we all write our own scripts to get at it. (I also wrote a script that works slightly differently.) It should be a built-in command, which gives the core code the ability to change how it gets its information, but this is transparent to the end-user.
2. The origin that is most likely sought is the original copy, not the rename. But, I suppose that could be an option to the command. Namely, I want to see: (a) the latest copy (the rename); (b) I want to see the earliest copy (the branch creation); (c) I want to see all the copies; etc.
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-08-20 19:56:32 CEST