martinvonz updated this revision to Diff 19694. REPOSITORY rHG Mercurial
CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8031?vs=19664&id=19694 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8031/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8031 AFFECTED FILES mercurial/cmdutil.py CHANGE DETAILS diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -1419,32 +1419,35 @@ after = opts.get(b"after") dryrun = opts.get(b"dry_run") wctx = repo[None] + pctx = wctx.p1() uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True) def walkpat(pat): srcs = [] - if after: - badstates = b'?' - else: - badstates = b'?r' m = scmutil.match(wctx, [pat], opts, globbed=True) for abs in wctx.walk(m): - state = repo.dirstate[abs] rel = uipathfn(abs) exact = m.exact(abs) - if state in badstates: - if exact and state == b'?': - ui.warn(_(b'%s: not copying - file is not managed\n') % rel) - if exact and state == b'r': - ui.warn( - _( - b'%s: not copying - file has been marked for' - b' remove\n' + if abs not in wctx: + if abs in pctx: + if not after: + if exact: + ui.warn( + _( + b'%s: not copying - file has been marked ' + b'for remove\n' + ) + % rel + ) + continue + else: + if exact: + ui.warn( + _(b'%s: not copying - file is not managed\n') % rel ) - % rel - ) - continue + continue + # abs: hgsep # rel: ossep srcs.append((abs, rel, exact)) To: martinvonz, #hg-reviewers Cc: mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel