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

Benoit Boissinot bboissin at gmail.com
Wed Apr 14 06:27:47 CDT 2010


On Wed, Apr 14, 2010 at 01:16:53PM +0200, Sune Foldager wrote:
> On 14-04-2010 12:31, Benoit Boissinot wrote:
> >On Wed, Apr 14, 2010 at 12:17 PM, Sune Foldager<cryo at cyanite.org>  wrote:
> >>This is also what it does. '.' is local for both push and pull (and out/in).
> >>The wish for -b foo to fallback to looking up foo and using its branch can't
> >>be carried out right now, which I also mentioned on the list some time ago;
> >>the protocol doesn't allow us to retrieve the branch of a remote revision.
> >>
> >>For now, -b foo where foo isn't a branch, _does_ lookup foo on the remote,
> >>but uses it as -r foo instead, essentially. It may make more sense to
> >>produce an error instead in that case.
> >
> >-b foo should only work if foo is a local rev, no?
> 
> No... I'd like to be able to pull -b foo for a branch I don't
> already have. For push, it's just local, true, so my above paragraph
> is a bit imprecise.

Could the algorithm be like:

pull:
-----

if b not in remoterepo.branchmap:
  b = localrepo[b].branch()
revs = remoterepo.branchmap[b]

push:
-----

if b not in localrepo.branchmap:
  b = localrepo[b].branch()
revs = localrepo.branchmap[b]

-- 
:wq


More information about the Mercurial-devel mailing list