Comments
Patch
@@ -1470,6 +1470,13 @@
return
+ 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()
+
if opts.get(b'rev'):
raise error.Abort(_("--rev is only supported with --forget"))
@@ -1708,12 +1715,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]):