[PATCH] bookmarks: add 'hg push -B .' for pushing the active bookmark (issue4917)

Augie Fackler raf at durin42.com
Mon Feb 22 15:27:47 EST 2016


On Fri, Feb 19, 2016 at 02:00:00PM -0800, Sean Farley wrote:
>
> liscju <piotr.listkiewicz at gmail.com> writes:
>
> > # HG changeset patch
> > # User liscju <piotr.listkiewicz at gmail.com>
> > # Date 1455917289 -3600
> > #      Fri Feb 19 22:28:09 2016 +0100
> > # Node ID 7f68decb8bceff4c6da47cb02cf8ca56c538cee5
> > # Parent  a036e1ae1fbe88ab99cb861ebfc2e4da7a3912ca
> > bookmarks: add 'hg push -B .' for pushing the active bookmark (issue4917)

queued with smf's fix applied in-flight. Thanks!

> >
> > diff -r a036e1ae1fbe -r 7f68decb8bce mercurial/bookmarks.py
> > --- a/mercurial/bookmarks.py	Sun Feb 07 00:49:31 2016 -0600
> > +++ b/mercurial/bookmarks.py	Fri Feb 19 22:28:09 2016 +0100
> > @@ -182,6 +182,12 @@
> >              fp.write("%s %s\n" % (hex(node), encoding.fromlocal(name)))
> >          self._clean = True
> >
> > +    def expandname(self, bname):
> > +        if bname == '.':
> > +            return self.active
> > +        else:
> > +            return bname
>
> Stylistic nit: we usually specify this as:
>
> if bname == '.':
>   return self.active
> return bname
>
> but I would just let someone fix that in-flight. Looks good otherwise.
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list