[PATCH] commands: add support for 'hg log -b .' (issue2078)

Steve Losh steve at stevelosh.com
Mon Apr 12 18:59:29 CDT 2010


On Apr 12, 2010, at 7:56 PM, Matt Mackall wrote:

> On Mon, 2010-04-12 at 19:35 -0400, Steve Losh wrote:
>> # HG changeset patch
>> # User Steve Losh <steve at stevelosh.com>
>> # Date 1271115205 14400
>> # Node ID 1af118b5a168a1284eada2e993f1177d9f144bd6
>> # Parent  3a1a1077f1777396ffbaba9c0cfc307af17ccc36
>> commands: add support for 'hg log -b .' (issue2078)
>> 
>> Fixes issue2078 and adds tests to cover various 'hg log -b' uses.
>> 
>> The long line just barely passes check-code, but there might be a better way
>> to do it.
> 
> I think this should be more generic. '-b .' should read as 'the branch
> that the working directory is on' so '-b <rev>' should similarly read as
> 'the branch <rev>' is on. In other words:
> 
> branch = repo[rev].branch()

What about:

hg branch 123
... commit ...
hg update default
hg log -b 123

Would that list changesets in revision 123's branch or changesets in branch 123?

> 
> And this should eventually work wherever we take a <branch> argument:
> 
> -r <branch> -> revision at tip of <branch> (we do this now)
> -b <rev> -> branch containing <rev>
> 
> Special-casing it for '.' is ugly.
> 
> -- 
> http://selenic.com : development and support for Mercurial and Linux
> 
> 



More information about the Mercurial-devel mailing list