[PATCH 1 of 2 V6] update: fix bare update to work on new branch (BC)
Piotr Listkiewicz
piotr.listkiewicz at gmail.com
Mon Apr 11 13:43:40 EDT 2016
>
> Any reason to skip null parent? If no, I'll drop "if repo['.']".
You are right, i changed it in V7 patch
2016-04-09 12:26 GMT+02:00 Yuya Nishihara <yuya at tcha.org>:
> On Tue, 05 Apr 2016 07:53:17 +0200, liscju wrote:
> > # HG changeset patch
> > # User liscju <piotr.listkiewicz at gmail.com>
> > # Date 1459832013 -7200
> > # Tue Apr 05 06:53:33 2016 +0200
> > # Node ID 7c72d229ded37ba1df4f737d738d1e6f0603e069
> > # Parent ff0d3b6b287f89594bd8d0308fe2810d2a18ea01
> > update: fix bare update to work on new branch (BC)
>
> This looks good to me, but I have one question.
>
> > --- a/mercurial/destutil.py Tue Mar 29 12:29:00 2016 -0500
> > +++ b/mercurial/destutil.py Tue Apr 05 06:53:33 2016 +0200
> > @@ -102,11 +102,8 @@ def _destupdatebranch(repo, clean, check
> > if bookmarks.isactivewdirparent(repo):
> > movemark = repo['.'].node()
> > else:
> > - if currentbranch == 'default': # no default branch!
> > - # update to the tipmost non-closed branch head
> > - node = repo.revs('max(head() and not closed())').first()
> > - else:
> > - raise error.Abort(_("branch %s not found") % currentbranch)
> > + if repo['.']:
> > + node = repo['.'].node()
>
> Any reason to skip null parent? If no, I'll drop "if repo['.']".
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20160411/9944b499/attachment.html>
More information about the Mercurial-devel
mailing list