Show More
@@ -502,7 +502,7 b' class queue:' | |||||
502 | if opts.get('rev'): |
|
502 | if opts.get('rev'): | |
503 | if not self.applied: |
|
503 | if not self.applied: | |
504 | raise util.Abort(_('no patches applied')) |
|
504 | raise util.Abort(_('no patches applied')) | |
505 |
revs = |
|
505 | revs = cmdutil.revrange(ui, repo, opts['rev']) | |
506 | if len(revs) > 1 and revs[0] > revs[1]: |
|
506 | if len(revs) > 1 and revs[0] > revs[1]: | |
507 | revs.reverse() |
|
507 | revs.reverse() | |
508 | for rev in revs: |
|
508 | for rev in revs: | |
@@ -1276,7 +1276,7 b' class queue:' | |||||
1276 | if files: |
|
1276 | if files: | |
1277 | raise util.Abort(_('option "-r" not valid when importing ' |
|
1277 | raise util.Abort(_('option "-r" not valid when importing ' | |
1278 | 'files')) |
|
1278 | 'files')) | |
1279 |
rev = |
|
1279 | rev = cmdutil.revrange(self.ui, repo, rev) | |
1280 | rev.sort(lambda x, y: cmp(y, x)) |
|
1280 | rev.sort(lambda x, y: cmp(y, x)) | |
1281 | if (len(files) > 1 or len(rev) > 1) and patchname: |
|
1281 | if (len(files) > 1 or len(rev) > 1) and patchname: | |
1282 | raise util.Abort(_('option "-n" not valid when importing multiple ' |
|
1282 | raise util.Abort(_('option "-n" not valid when importing multiple ' |
@@ -49,7 +49,7 b' def revrange(ui, repo, revs):' | |||||
49 | return defval |
|
49 | return defval | |
50 | return repo.changelog.rev(repo.lookup(val)) |
|
50 | return repo.changelog.rev(repo.lookup(val)) | |
51 |
|
51 | |||
52 | seen = {} |
|
52 | seen, l = {}, [] | |
53 | for spec in revs: |
|
53 | for spec in revs: | |
54 | if revrangesep in spec: |
|
54 | if revrangesep in spec: | |
55 | start, end = spec.split(revrangesep, 1) |
|
55 | start, end = spec.split(revrangesep, 1) | |
@@ -60,13 +60,15 b' def revrange(ui, repo, revs):' | |||||
60 | if rev in seen: |
|
60 | if rev in seen: | |
61 | continue |
|
61 | continue | |
62 | seen[rev] = 1 |
|
62 | seen[rev] = 1 | |
63 |
|
|
63 | l.append(rev) | |
64 | else: |
|
64 | else: | |
65 | rev = revfix(repo, spec, None) |
|
65 | rev = revfix(repo, spec, None) | |
66 | if rev in seen: |
|
66 | if rev in seen: | |
67 | continue |
|
67 | continue | |
68 | seen[rev] = 1 |
|
68 | seen[rev] = 1 | |
69 |
|
|
69 | l.append(rev) | |
|
70 | ||||
|
71 | return l | |||
70 |
|
72 | |||
71 | def make_filename(repo, pat, node, |
|
73 | def make_filename(repo, pat, node, | |
72 | total=None, seqno=None, revwidth=None, pathname=None): |
|
74 | total=None, seqno=None, revwidth=None, pathname=None): |
@@ -102,7 +102,7 b' def walkchangerevs(ui, repo, pats, opts)' | |||||
102 | defrange = '%s:0' % repo.changectx().rev() |
|
102 | defrange = '%s:0' % repo.changectx().rev() | |
103 | else: |
|
103 | else: | |
104 | defrange = 'tip:0' |
|
104 | defrange = 'tip:0' | |
105 |
revs = |
|
105 | revs = cmdutil.revrange(ui, repo, opts['rev'] or [defrange]) | |
106 | wanted = {} |
|
106 | wanted = {} | |
107 | slowpath = anypats |
|
107 | slowpath = anypats | |
108 | fncache = {} |
|
108 | fncache = {} | |
@@ -1375,7 +1375,7 b' def export(ui, repo, *changesets, **opts' | |||||
1375 | """ |
|
1375 | """ | |
1376 | if not changesets: |
|
1376 | if not changesets: | |
1377 | raise util.Abort(_("export requires at least one changeset")) |
|
1377 | raise util.Abort(_("export requires at least one changeset")) | |
1378 |
revs = |
|
1378 | revs = cmdutil.revrange(ui, repo, changesets) | |
1379 | if len(revs) > 1: |
|
1379 | if len(revs) > 1: | |
1380 | ui.note(_('exporting patches:\n')) |
|
1380 | ui.note(_('exporting patches:\n')) | |
1381 | else: |
|
1381 | else: | |
@@ -1841,8 +1841,7 b' def log(ui, repo, *pats, **opts):' | |||||
1841 | count = 0 |
|
1841 | count = 0 | |
1842 |
|
1842 | |||
1843 | if opts['copies'] and opts['rev']: |
|
1843 | if opts['copies'] and opts['rev']: | |
1844 | endrev = max([int(i) |
|
1844 | endrev = max(cmdutil.revrange(ui, repo, opts['rev'])) + 1 | |
1845 | for i in cmdutil.revrange(ui, repo, opts['rev'])]) + 1 |
|
|||
1846 | else: |
|
1845 | else: | |
1847 | endrev = repo.changelog.count() |
|
1846 | endrev = repo.changelog.count() | |
1848 | rcache = {} |
|
1847 | rcache = {} |
General Comments 0
You need to be logged in to leave comments.
Login now