On 11/19/16, 10:02 AM, "Yuya Nishihara" <you...@gmail.com on behalf of 
y...@tcha.org> wrote:

    On Sun, 13 Nov 2016 03:39:34 -0800, Kostia Balytskyi wrote:
    > # HG changeset patch
    > # User Kostia Balytskyi <ikos...@fb.com>
    > # Date 1479036952 28800
    > #      Sun Nov 13 03:35:52 2016 -0800
    > # Node ID 45dbc9a803375958310bced301227b02802372b0
    > # Parent  2188194ca1ee86953855e0d2fb9396ec18636ed9
    > shelve: move temporary commit creation to a separate function
    
    Looks all good. Queued them, thanks.
    
    > +def _commitworkingcopychanges(ui, repo, opts, tmpwctx):
    > +    """Temporarily commit working copy changes before moving unshelve 
commit"""
    > +    # Store pending changes in a commit and remember added in case a 
shelve
    > +    # contains unknown files that are part of the pending change
    > +    s = repo.status()
    > +    addedbefore = frozenset(s.added)
    > +    if not (s.modified or s.added or s.removed or s.deleted):
    > +        return tmpwctx, addedbefore
    > +    ui.status(_("temporarily committing pending changes "
    > +                "(restore with 'hg unshelve --abort')\n"))
    > +    commitfunc = getcommitfunc(extra=None, interactive=False,
    > +                               editor=False)
    > +    tempopts = {}
    > +    tempopts['message'] = "pending changes temporary commit"
    > +    tempopts['date'] = opts.get('date')
    > +    ui.quiet = True
    > +    node = cmdutil.commit(ui, repo, commitfunc, [], tempopts)
    > +    tmpwctx = repo[node]
    > +    return tmpwctx, addedbefore
    
    This and the next unbalanced ui.quiet hack can be a source of future bugs.
    I hope they'll be fixed by a follow-up patch.
Can you explain please? I was trying to keep the ui.quiet behavior unchanged in 
this refactoring series.
    

_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to