[PATCH 1 of 2 V3] shelve: make bare shelve not preserving newly created branch

Piotr Listkiewicz piotr.listkiewicz at gmail.com
Tue Mar 8 06:26:18 EST 2016


>
> IMHO, --exclude/--include and --interactive options should be
> examined here like as pat, even though they might finally cause "bare
> shelve".


Good point, i will change it in next patch.


> BTW, "hg shelve" doesn't show any information about clearing newly
> created but not yet committed branch. It seems useful to show "marked
> working directory as branch BRANCH_OF_PARENT" (or "reset ....." is
> understandable ?) at the end of "hg shelve" (in another patch).


I don't know if user wouldn't be confused by this information, because
after commiting and writing bundle shelve updates to the first parent of
working directory, so the branch in working directory after shelve is the
same as it was for parent of working directory.
User doesn't notice any branch clearing and he can't observe it.


2016-03-08 10:35 GMT+01:00 FUJIWARA Katsunori <foozy at lares.dti.ne.jp>:

> At Mon, 07 Mar 2016 23:49:54 +0100,
> liscju wrote:
> >
> > # HG changeset patch
> > # User liscju <piotr.listkiewicz at gmail.com>
> > # Date 1457387891 -3600
> > #      Mon Mar 07 22:58:11 2016 +0100
> > # Node ID 2e4c8569d7fed28a7853417cd178ed374446ef9f
> > # Parent  a036e1ae1fbe88ab99cb861ebfc2e4da7a3912ca
> > shelve: make bare shelve not preserving newly created branch
> >
> > This patch makes bare shelve setting branch of working directory
> > to the first parent branch before commiting, making it not
> > remember newly created branch.
> >
> > This patch prepares for restoring branch name on newly created
> > branch on bare shelve, because newly created branch name will be
> > only saved on bare shelve.
> >
> > diff -r a036e1ae1fbe -r 2e4c8569d7fe hgext/shelve.py
> > --- a/hgext/shelve.py Sun Feb 07 00:49:31 2016 -0600
> > +++ b/hgext/shelve.py Mon Mar 07 22:58:11 2016 +0100
> > @@ -312,6 +312,10 @@ def _docreatecmd(ui, repo, pats, opts):
> >                  extra['shelve_unknown'] = '\0'.join(s.unknown)
> >                  repo[None].add(s.unknown)
> >
> > +        if pats:
> > +            # In non-bare shelve we don't store newly created branch
> > +            repo.dirstate.setbranch(repo['.'].branch())
> > +
>
> IMHO, --exclude/--include and --interactive options should be
> examined here like as pat, even though they might finally cause "bare
> shelve".
>
> BTW, "hg shelve" doesn't show any information about clearing newly
> created but not yet committed branch. It seems useful to show "marked
> working directory as branch BRANCH_OF_PARENT" (or "reset ....." is
> understandable ?) at the end of "hg shelve" (in another patch).
>
>
> >          def commitfunc(ui, repo, message, match, opts):
> >              hasmq = util.safehasattr(repo, 'mq')
> >              if hasmq:
> > _______________________________________________
> > Mercurial-devel mailing list
> > Mercurial-devel at mercurial-scm.org
> > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
> ----------------------------------------------------------------------
> [FUJIWARA Katsunori]                             foozy at lares.dti.ne.jp
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20160308/3c542f05/attachment.html>


More information about the Mercurial-devel mailing list