On Mon, Nov 14, 2016 at 5:03 AM, Uwe Brauer <[email protected]> wrote:

> Hi
>
> I recently found out that git, which does only have bookmarks, has a
> feature (name-rev) which allows to display the log and its bookmarks «as
> if they
> were named branches»
>
> The following
>
> git log --graph --decorate --pretty=short | git name-rev --stdin | more
>
> Does the trick
>
> Resulting for example for the auctex repository in
>
> * commit eb2d64bede8587c864c3031f233a0ae87c3f3a03 (master) (HEAD,
> origin/master, origin/HEAD, master)
> | Author: Mosè Giordano <[email protected]>
> |
> |     Fix to my previous commit
> |
> *   commit 17d1a5d71f9fb6adbb90e17dbf223f3bf1e2f92a (master~153)
> |\  Merge: f9efa73 1950012
> | | Author: Mosè Giordano <[email protected]>
> | |
> | |     ; Merge branch 'simplify-TeX-parse-error'
> | |
> | *   commit 1950012155d539f05c393dae3d6e93548bbc57b2
> (remotes/origin/simplify-TeX-parse-error~136)
> | |\  Merge: b4ff376 4b21d3f
> | | | Author: Tassilo Horn <[email protected]>
> | | |
> | | |     Merge branch 'master' into simplify-TeX-parse-error
>
>
> So the () after the HASH indicate to which branch a commit belongs.
>
> (I admit that I find the corresponding graph using mercurial+named
> branches cleaner and leaner.)
>
> Could a similar feature be implemented in mercurial? Most likely it
> would make named branches obsolete.
>

There are multiple feature requests here.

One sounds like a template that exposes "labels" defined on descendant
changesets (like bookmarks, tags, etc). There is already a {latesttag}
which is similar, but in the opposite direction (ancestors not
descendants). This could be implemented somewhat easily as a template
keyword. There are some tricky bits around performance and choosing which
labels qualify to show when. e.g. should a public changeset show a bookmark
name for a draft descendant changeset? Does behavior of rendered labels
change depending on how many DAG heads are descendants?

The other feature is for something that does naming differently/better. For
that, I would suggest you look into
https://www.mercurial-scm.org/wiki/TopicPlan. One of the planned features
of topics is that names are forever associated with a changeset. However,
the topic name will fade away from the UI once a changeset moves from draft
to public. You can use the topic extension today. But it is experimental
and behavior may change in the future.
_______________________________________________
Mercurial mailing list
[email protected]
https://www.mercurial-scm.org/mailman/listinfo/mercurial

Reply via email to