Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 15404:c1eb8398fe82
localrepo: convert various repo.set() users to repo.revs()
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 02 Nov 2011 13:51:16 -0500 |
parents | c519cd8f0169 |
children | e4a17bb8472f |
comparison
equal
deleted
inserted
replaced
15403:e27561eb4a76 | 15404:c1eb8398fe82 |
---|---|
2532 if not revs: | 2532 if not revs: |
2533 raise util.Abort(_('no revisions specified')) | 2533 raise util.Abort(_('no revisions specified')) |
2534 revs = scmutil.revrange(repo, revs) | 2534 revs = scmutil.revrange(repo, revs) |
2535 | 2535 |
2536 # check for merges | 2536 # check for merges |
2537 for ctx in repo.set('%ld and merge()', revs): | 2537 for rev in repo.revs('%ld and merge()', revs): |
2538 ui.warn(_('skipping ungraftable merge revision %s\n') % ctx.rev()) | 2538 ui.warn(_('skipping ungraftable merge revision %s\n') % rev) |
2539 revs.remove(ctx.rev()) | 2539 revs.remove(rev) |
2540 if not revs: | 2540 if not revs: |
2541 return -1 | 2541 return -1 |
2542 | 2542 |
2543 # check for ancestors of dest branch | 2543 # check for ancestors of dest branch |
2544 for ctx in repo.set('::. and %ld', revs): | 2544 for rev in repo.revs('::. and %ld', revs): |
2545 ui.warn(_('skipping ancestor revision %s\n') % ctx.rev()) | 2545 ui.warn(_('skipping ancestor revision %s\n') % rev) |
2546 revs.remove(ctx.rev()) | 2546 revs.remove(rev) |
2547 if not revs: | 2547 if not revs: |
2548 return -1 | 2548 return -1 |
2549 | 2549 |
2550 # check ancestors for earlier grafts | 2550 # check ancestors for earlier grafts |
2551 ui.debug('scanning for duplicate grafts\n') | 2551 ui.debug('scanning for duplicate grafts\n') |