Show More
@@ -1477,6 +1477,13 b' def copy(ui, repo, pats, opts, rename=Fa' | |||||
1477 |
|
1477 | |||
1478 | return |
|
1478 | return | |
1479 |
|
1479 | |||
|
1480 | pats = scmutil.expandpats(pats) | |||
|
1481 | if not pats: | |||
|
1482 | raise error.Abort(_(b'no source or destination specified')) | |||
|
1483 | if len(pats) == 1: | |||
|
1484 | raise error.Abort(_(b'no destination specified')) | |||
|
1485 | dest = pats.pop() | |||
|
1486 | ||||
1480 | if opts.get(b'at_rev'): |
|
1487 | if opts.get(b'at_rev'): | |
1481 | raise error.Abort(_("--at-rev is only supported with --forget")) |
|
1488 | raise error.Abort(_("--at-rev is only supported with --forget")) | |
1482 |
|
1489 | |||
@@ -1715,12 +1722,6 b' def copy(ui, repo, pats, opts, rename=Fa' | |||||
1715 | res = lambda p: dest |
|
1722 | res = lambda p: dest | |
1716 | return res |
|
1723 | return res | |
1717 |
|
1724 | |||
1718 | pats = scmutil.expandpats(pats) |
|
|||
1719 | if not pats: |
|
|||
1720 | raise error.Abort(_(b'no source or destination specified')) |
|
|||
1721 | if len(pats) == 1: |
|
|||
1722 | raise error.Abort(_(b'no destination specified')) |
|
|||
1723 | dest = pats.pop() |
|
|||
1724 | destdirexists = os.path.isdir(dest) and not os.path.islink(dest) |
|
1725 | destdirexists = os.path.isdir(dest) and not os.path.islink(dest) | |
1725 | if not destdirexists: |
|
1726 | if not destdirexists: | |
1726 | if len(pats) > 1 or matchmod.patkind(pats[0]): |
|
1727 | if len(pats) > 1 or matchmod.patkind(pats[0]): |
General Comments 0
You need to be logged in to leave comments.
Login now