Submitter | phabricator |
---|---|
Date | Jan. 28, 2020, 11:53 p.m. |
Message ID | <differential-rev-PHID-DREV-swkvxyjm2ublcrfi5oqq-req@mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/44719/ |
State | Superseded |
Headers | show |
Comments
marmoute added a comment. marmoute accepted this revision. This looks like a cleanup we can take anyway. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8033/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8033 To: martinvonz, #hg-reviewers, marmoute Cc: marmoute, mercurial-devel
This revision is now accepted and ready to land. durin42 added a comment. durin42 accepted this revision. Oddly, this had some rejects (I didn't look why) but i"d be happy to see this earlier in the series. REPOSITORY rHG Mercurial BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8033/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8033 To: martinvonz, #hg-reviewers, marmoute, durin42 Cc: durin42, marmoute, mercurial-devel
martinvonz added a comment.
In D8033#120581 <https://phab.mercurial-scm.org/D8033#120581>, @durin42 wrote:
> Oddly, this had some rejects (I didn't look why) but i"d be happy to see this earlier in the series.
I moved some revisions around, but it wasn't trivial to move this one. I don't mind waiting until the parents are accepted anyway.
REPOSITORY
rHG Mercurial
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8033/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8033
To: martinvonz, #hg-reviewers, marmoute, durin42
Cc: durin42, marmoute, mercurial-devel
Patch
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -1421,6 +1421,13 @@ ctx = repo[None] pctx = ctx.p1() + pats = scmutil.expandpats(pats) + if not pats: + raise error.Abort(_(b'no source or destination specified')) + if len(pats) == 1: + raise error.Abort(_(b'no destination specified')) + dest = pats.pop() + uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True) def walkpat(pat): @@ -1658,12 +1665,6 @@ res = lambda p: dest return res - pats = scmutil.expandpats(pats) - if not pats: - raise error.Abort(_(b'no source or destination specified')) - if len(pats) == 1: - raise error.Abort(_(b'no destination specified')) - dest = pats.pop() destdirexists = os.path.isdir(dest) and not os.path.islink(dest) if not destdirexists: if len(pats) > 1 or matchmod.patkind(pats[0]):