Subversion 1.5 merge tracking and Trac

9 views
Skip to first unread message

Javier S.

unread,
May 20, 2009, 5:31:57 PM5/20/09
to Trac Users, javie...@pandasecurity.com
Hi,

In our team we are using Trac 0.11, and recently upgraded to
Subversion 1.5 to get the new merge tracking features. I was hoping
Trac had support for these new features, as I haven't found any
reference that suggests so, I'm writing to this list.
Specifically I was hoping for some of these things:

- Subversion 1.5 adds a -g parameter to the "svn log" command. When
used in a branch which has merges, for each log entry it shows, in
addition to the revision number, merge author and author's comments,
the original change's revision, author and comments, so that you know
where the merge came from. I was hoping Trac's revision log somehow
supported this.
- Something similar happens for "svn blame/annotate". The -g param
shows the original author for each line, instead of the merge author.
- Support in the source browser for some kind of parsing of the
svn:mergeinfo property, which contains all the merge tracking
information. Something like links to the involved branches and
revisions.

Any of this exists? maybe some plugin? or, if not, is it planned?.

Thanks.

Christian Boos

unread,
May 21, 2009, 11:36:12 AM5/21/09
to trac-...@googlegroups.com
Javier S. wrote:
> Hi,
>
> In our team we are using Trac 0.11, and recently upgraded to
> Subversion 1.5 to get the new merge tracking features. I was hoping
> Trac had support for these new features, as I haven't found any
> reference that suggests so, I'm writing to this list.
> Specifically I was hoping for some of these things:
>
> - Subversion 1.5 adds a -g parameter to the "svn log" command. When
> used in a branch which has merges, for each log entry it shows, in
> addition to the revision number, merge author and author's comments,
> the original change's revision, author and comments, so that you know
> where the merge came from. I was hoping Trac's revision log somehow
> supported this.

Sorry, there's nothing like that yet.

Maybe we could add this using a sub-table:

|| Rev || Date || Author || Log Message ||
|| 100 || ././. || xyz || merged bugfix #123 from stable ||
|| || || || ||
|| || || || ||Rev||Date||Author||Log Message|| ||
|| || || || ||98 || ...||xyz ||bugfix #123|| ||
|| || || || ||97 || ...||xyz ||clean-up || ||

I also think that this would be an interesting way to show the
merge information for other VCS, like Mercurial: in merge revisions,
we would show the first few changesets from the incoming branch and
simply have a link to "jump" on the revision log of that incoming
branch for seeing more ancestors (and incoming branches for that branch).

But I digress... ;-)

> - Something similar happens for "svn blame/annotate". The -g param
> shows the original author for each line, instead of the merge author.

I suppose this would be a bit harder to get right, given we don't have
that much space there. Is there any other repository viewer that already
does this (ViewVC, WebSVN, etc.) so we could get some ideas?

> - Support in the source browser for some kind of parsing of the
> svn:mergeinfo property, which contains all the merge tracking
> information. Something like links to the involved branches and
> revisions.

Already requested, but nobody has contributed a patch yet
(http://trac.edgewall.org/ticket/7715).


>
> Any of this exists? maybe some plugin? or, if not, is it planned?.

The svn:mergeinfo stuff is becoming hard to avoid those days, so I
should better try to understand them better and think about supporting
them if possible. I'm still not convinced it's working 100% reliably
though (e.g. http://trac.edgewall.org/changeset/8206#file1 why would
that file get its svn:mergeinfo changed?).
Also it looks like manipulating this merge info is not matching
svnmerge.py in simplicity (compare: `svn mergeinfo --show-revs eligible`
to `svnmerge avail`) and there's apparently no equivalent to `svnmerge
block`.

Still, I'm going to have a try at enhancing merge tracking support in
Trac - so watch #7715 ;-)

-- Christian

Javier Sanz

unread,
Jun 4, 2009, 4:48:32 PM6/4/09
to trac-...@googlegroups.com
Hi,

> Sorry, there's nothing like that yet.
>
> Maybe we could add this using a sub-table:
>
> || Rev || Date  || Author || Log Message                        ||
> || 100 || ././. || xyz    || merged bugfix #123 from stable     ||
> ||     ||       ||        ||                                    ||
> ||     ||       ||        || ||Rev||Date||Author||Log Message|| ||
> ||     ||       ||        || ||98 || ...||xyz   ||bugfix #123|| ||
> ||     ||       ||        || ||97 || ...||xyz   ||clean-up   || ||
>

That would be perfect.

> I also think that this would be an interesting way to show the
> merge information for other VCS, like Mercurial: in merge revisions,
> we would show the first few changesets from the incoming branch and
> simply have a link to "jump" on the revision log of that incoming
> branch for seeing more ancestors (and incoming branches for that branch).
>
> But I digress... ;-)
>
> > - Something similar happens for "svn blame/annotate". The -g param
> > shows the original author for each line, instead of the merge author.
>
> I suppose this would be a bit harder to get right, given we don't have
> that much space there.


Actually I think this is the simplest of the three, in terms of user
interface. It would be just substituting the comments, revisions and
authors of the merged lines for the original ones.


> Is there any other repository viewer that already
> does this (ViewVC, WebSVN, etc.) so we could get some ideas?
>

Take a look at how Subclipse approached these features:
http://desktop-eclipse.open.collab.net/servlets/ProjectProcess?pageID=MEuUjb&freeformpage=Additional%20Merge%20Features
(at the bottom).
There you can see their version of what we call Revision Log and Annotate.

> > - Support in the source browser for some kind of parsing of the
> > svn:mergeinfo property, which contains all the merge tracking
> > information. Something like links to the involved branches and
> > revisions.
>
> Already requested, but nobody has contributed a patch yet
> (http://trac.edgewall.org/ticket/7715).
>

Now someone has ;-).
To work on the other features I'll have to find more time, as their
require investigating the svn API bindings a bit and, man, they look
so ugly (non-pythonic).

> The svn:mergeinfo stuff is becoming hard to avoid those days, so I
> should better try to understand them better and think about supporting
> them if possible. I'm still not convinced it's working 100% reliably
> though (e.g.  http://trac.edgewall.org/changeset/8206#file1 why would
> that file get its svn:mergeinfo changed?).

Don't forget to use subversion >= 1.5.5, merge tracking is not really
production ready (i.e. buggy) in previous releases.

> Also it looks like manipulating this merge info is not matching
> svnmerge.py in simplicity (compare: `svn mergeinfo --show-revs eligible`
> to `svnmerge avail`) and there's apparently no equivalent to `svnmerge
> block`.
>
> Still, I'm going to have a try at enhancing merge tracking support in
> Trac - so watch #7715 ;-)
>
> -- Christian

Greetings,

Javier

Reply all
Reply to author
Forward
0 new messages