D5940: uncommit: don't allow dirty working copy with PATH (issue5977)

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Wed Mar 6 08:27:24 EST 2019


pulkit added a comment.


  Amended the following in flight and resolved conflicts while rebasing the next one.
  
    diff --git a/hgext/uncommit.py b/hgext/uncommit.py
    --- a/hgext/uncommit.py
    +++ b/hgext/uncommit.py
    @@ -160,8 +160,8 @@ def uncommit(ui, repo, *pats, **opts):
     
             m, a, r, d = repo.status()[:4]
             isdirtypath = any(set(m + a + r + d) & set(pats))
    -        if not repo.ui.configbool('experimental', 'uncommitondirtywdir') and \
    -            (not pats or isdirtypath):
    +        if (not repo.ui.configbool('experimental', 'uncommitondirtywdir') and
    +            (not pats or isdirtypath)):
                 cmdutil.bailifchanged(repo, hint=_('requires '
                                     'experimental.uncommitondirtywdir to uncommit'))
             old = repo['.']
    diff --git a/tests/test-uncommit.t b/tests/test-uncommit.t
    --- a/tests/test-uncommit.t
    +++ b/tests/test-uncommit.t
    @@ -480,6 +480,7 @@ experimental.uncommitondirtywdir should 
       $ hg status
       A b
       $ hg unc a
    +  note: keeping empty commit
       $ hg unc b
       abort: uncommitted changes
       (requires experimental.uncommitondirtywdir to uncommit)
  
  Next time please run all the tests.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5940

To: navaneeth.suresh, #hg-reviewers, pulkit
Cc: martinvonz, pulkit, mercurial-devel


More information about the Mercurial-devel mailing list