Details
Details
- Reviewers
indygreg - Group Reviewers
hg-reviewers - Commits
- rHG2a8939e25d07: transplant: avoid repo.lookup() for converting revnum to nodeid
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
| indygreg |
| hg-reviewers |
| Lint Skipped |
| Unit Tests Skipped |
| Path | Packages | |||
|---|---|---|---|---|
| M | hgext/transplant.py (4 lines) |
| Status | Author | Revision | |
|---|---|---|---|
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz |
| try: | try: | ||||
| if opts.get('continue'): | if opts.get('continue'): | ||||
| tp.resume(repo, source, opts) | tp.resume(repo, source, opts) | ||||
| return | return | ||||
| tf = tp.transplantfilter(repo, source, p1) | tf = tp.transplantfilter(repo, source, p1) | ||||
| if opts.get('prune'): | if opts.get('prune'): | ||||
| prune = set(source.lookup(r) | prune = set(source[r].node() | ||||
| for r in scmutil.revrange(source, opts.get('prune'))) | for r in scmutil.revrange(source, opts.get('prune'))) | ||||
| matchfn = lambda x: tf(x) and x not in prune | matchfn = lambda x: tf(x) and x not in prune | ||||
| else: | else: | ||||
| matchfn = tf | matchfn = tf | ||||
| merges = map(source.lookup, opts.get('merge', ())) | merges = map(source.lookup, opts.get('merge', ())) | ||||
| revmap = {} | revmap = {} | ||||
| if revs: | if revs: | ||||
| for r in scmutil.revrange(source, revs): | for r in scmutil.revrange(source, revs): | ||||
| revmap[int(r)] = source.lookup(r) | revmap[int(r)] = source[r].node() | ||||
| elif opts.get('all') or not merges: | elif opts.get('all') or not merges: | ||||
| if source != repo: | if source != repo: | ||||
| alltransplants = incwalk(source, csets, match=matchfn) | alltransplants = incwalk(source, csets, match=matchfn) | ||||
| else: | else: | ||||
| alltransplants = transplantwalk(source, p1, heads, | alltransplants = transplantwalk(source, p1, heads, | ||||
| match=matchfn) | match=matchfn) | ||||
| if opts.get('all'): | if opts.get('all'): | ||||
| revs = alltransplants | revs = alltransplants | ||||