<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-size:12.8px">IMHO, --exclude/--include and --interactive options should be<br></span><span style="font-size:12.8px">examined here like as pat, even though they might finally cause "bare<br></span><span style="font-size:12.8px">shelve".</span></blockquote><div><br></div><div>Good point, i will change it in next patch.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br><span style="font-size:12.8px">BTW, "hg shelve" doesn't show any information about clearing newly<br></span><span style="font-size:12.8px">created but not yet committed branch. It seems useful to show "marked<br></span><span style="font-size:12.8px">working directory as branch BRANCH_OF_PARENT" (or "reset ....." is<br></span><span style="font-size:12.8px">understandable ?) at the end of "hg shelve" (in another patch).</span></blockquote><div><br></div><div>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. </div><div>User doesn't notice any branch clearing and he can't observe it.</div><div> </div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-03-08 10:35 GMT+01:00 FUJIWARA Katsunori <span dir="ltr"><<a href="mailto:foozy@lares.dti.ne.jp" target="_blank">foozy@lares.dti.ne.jp</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">At Mon, 07 Mar 2016 23:49:54 +0100,<br>
<span class="">liscju wrote:<br>
><br>
> # HG changeset patch<br>
> # User liscju <<a href="mailto:piotr.listkiewicz@gmail.com">piotr.listkiewicz@gmail.com</a>><br>
> # Date 1457387891 -3600<br>
> #      Mon Mar 07 22:58:11 2016 +0100<br>
> # Node ID 2e4c8569d7fed28a7853417cd178ed374446ef9f<br>
> # Parent  a036e1ae1fbe88ab99cb861ebfc2e4da7a3912ca<br>
> shelve: make bare shelve not preserving newly created branch<br>
><br>
> This patch makes bare shelve setting branch of working directory<br>
> to the first parent branch before commiting, making it not<br>
> remember newly created branch.<br>
><br>
> This patch prepares for restoring branch name on newly created<br>
> branch on bare shelve, because newly created branch name will be<br>
> only saved on bare shelve.<br>
><br>
> diff -r a036e1ae1fbe -r 2e4c8569d7fe hgext/shelve.py<br>
> --- a/hgext/shelve.py Sun Feb 07 00:49:31 2016 -0600<br>
> +++ b/hgext/shelve.py Mon Mar 07 22:58:11 2016 +0100<br>
> @@ -312,6 +312,10 @@ def _docreatecmd(ui, repo, pats, opts):<br>
>                  extra['shelve_unknown'] = '\0'.join(s.unknown)<br>
>                  repo[None].add(s.unknown)<br>
><br>
> +        if pats:<br>
> +            # In non-bare shelve we don't store newly created branch<br>
> +            repo.dirstate.setbranch(repo['.'].branch())<br>
> +<br>
<br>
</span>IMHO, --exclude/--include and --interactive options should be<br>
examined here like as pat, even though they might finally cause "bare<br>
shelve".<br>
<br>
BTW, "hg shelve" doesn't show any information about clearing newly<br>
created but not yet committed branch. It seems useful to show "marked<br>
working directory as branch BRANCH_OF_PARENT" (or "reset ....." is<br>
understandable ?) at the end of "hg shelve" (in another patch).<br>
<span class=""><br>
<br>
>          def commitfunc(ui, repo, message, match, opts):<br>
>              hasmq = util.safehasattr(repo, 'mq')<br>
>              if hasmq:<br>
</span>> _______________________________________________<br>
> Mercurial-devel mailing list<br>
> <a href="mailto:Mercurial-devel@mercurial-scm.org">Mercurial-devel@mercurial-scm.org</a><br>
> <a href="https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel" rel="noreferrer" target="_blank">https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel</a><br>
<br>
----------------------------------------------------------------------<br>
[FUJIWARA Katsunori]                             <a href="mailto:foozy@lares.dti.ne.jp">foozy@lares.dti.ne.jp</a><br>
</blockquote></div><br></div>