Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 4055:e37786b29bed
docopy: deal with globs on windows in a better way
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Tue, 30 Jan 2007 18:32:20 -0200 |
parents | 994fec0ee900 |
children | f1622b4f467d |
comparison
equal
deleted
inserted
replaced
4054:e6d54283c090 | 4055:e37786b29bed |
---|---|
603 else: | 603 else: |
604 res = lambda p: dest | 604 res = lambda p: dest |
605 return res | 605 return res |
606 | 606 |
607 | 607 |
608 pats = list(pats) | 608 pats = util.expand_glob(pats) |
609 if not pats: | 609 if not pats: |
610 raise util.Abort(_('no source or destination specified')) | 610 raise util.Abort(_('no source or destination specified')) |
611 if len(pats) == 1: | 611 if len(pats) == 1: |
612 raise util.Abort(_('no destination specified')) | 612 raise util.Abort(_('no destination specified')) |
613 dest = pats.pop() | 613 dest = pats.pop() |
620 else: | 620 else: |
621 tfn = targetpathfn | 621 tfn = targetpathfn |
622 copylist = [] | 622 copylist = [] |
623 for pat in pats: | 623 for pat in pats: |
624 srcs = [] | 624 srcs = [] |
625 for tag, abssrc, relsrc, exact in cmdutil.walk(repo, [pat], opts): | 625 for tag, abssrc, relsrc, exact in cmdutil.walk(repo, [pat], opts, |
626 globbed=True): | |
626 origsrc = okaytocopy(abssrc, relsrc, exact) | 627 origsrc = okaytocopy(abssrc, relsrc, exact) |
627 if origsrc: | 628 if origsrc: |
628 srcs.append((origsrc, abssrc, relsrc, exact)) | 629 srcs.append((origsrc, abssrc, relsrc, exact)) |
629 if not srcs: | 630 if not srcs: |
630 continue | 631 continue |