Enriching a file log by branches, tags and bookmarks

Marc Strapetz marc.strapetz at syntevo.com
Mon Feb 16 13:03:53 UTC 2015


I'm looking for a way to enrich a file log (or sub-tree log) by 
branches, tags and bookmarks: every such "tag" should be displayed at 
the "closest" commit of the file log, i.e. at that commit which contains 
the file in identical state (content). Example:

A* - B - C* - D [tag] - E*
       \
        F - G - H* [branch]

Let's consider the file has been changed in *-commits only, namely A, C, 
E and H, then "branch" should be assigned to H and "tag" should be 
assigned to C, resulting in following file log:

A - C [tag] - E
  \
   H [branch]

Note, that I'm not interesting in how the information is displayed, any 
output which is reasonably parseable is fine.

As far as I understand, there is currently no such command line 
functionality in Mercurial?

If so, is there any (high-level) API which could be used to write an 
extension which performs this task?

If not, any ideas/suggestions how to address this problem with 
reasonable performance? Running through the entire repository log and 
manually shifting "tags" to those commits which are present in the 
file/sub-tree log is my last option.

-Marc






More information about the Mercurial mailing list