Git-like log
Tuncer Ayaz
tuncer.ayaz at gmail.com
Mon Dec 28 10:15:17 CST 2009
On Sun, Dec 27, 2009 at 9:41 PM, Martin Geisler <mg at lazybytes.net> wrote:
>
> Hi Tuncer,
>
> We talked on IRC about how to get make
>
> hg update foo
> hg log
>
> print only changesets on the branch 'foo' you've just updated to.
>
> It turns out that the -f/--follow option helps here. Normally 'hg log'
> will print out changesets starting with the latest changeset and going
> backwards.
>
> With the -f option, it will instead print changesets starting with the
> working copy parent revision (see 'hg parents') and follow the parent
> revisions backwards. That means that 'hg log -f' will print out
> changesets on the 'foo' branch first and eventually print changesets on
> the parent branch and so on. With -l, this seems to be quite close to
> what you asked for.
>
> Please let us know how that works out for you!
Thanks for the hint.
I will use both 'log -f' and 'log -b' to view history.
The confusion arose from the fact that 'hg up default && hg log'
included commits from the topic (named) branch.
It might still be useful to have 'hg log --current-branch/-c' and
set that as a default in hgrc.
More information about the Mercurial
mailing list