Enriching a file log by branches, tags and bookmarks
Dave S
snidely.too at gmail.com
Mon Feb 23 18:40:04 UTC 2015
Are you trying to track the history of individual files, rather than the
default of repository history?
You want to use templates, but I don't see a template option that gives
just the name of the file you asked about on the command line.
hg log -f --template "{rev} {tags} {branch} {files}\n"
controllers/default.py
is close, but gives you all the files changed in the applicable revisions.
If you drop the {files}, you don't get a file name at all (but you already
know the filename, since you put it on the command line).
An alternative would be to use the XML style:
hg log -f --style xml controllers/default.py
This doesn't seem to show the filename, either, but again you specified the
file so you know the file.
Take a look at templates in the hg help system.
/dps
On Mon, Feb 16, 2015 at 5:03 AM, Marc Strapetz <marc.strapetz at syntevo.com>
wrote:
> 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
>
>
>
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
>
--
test signature -- please apply at front gate on Tuesdays only.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20150223/e38ff7b1/attachment-0002.html>
More information about the Mercurial
mailing list