Show More
@@ -635,15 +635,12 b' def getdiffmeta(diff):' | |||
|
635 | 635 | meta[r'parent'] = commit[r'parents'][0] |
|
636 | 636 | return meta or {} |
|
637 | 637 | |
|
638 |
def readpatch(repo, |
|
|
638 | def readpatch(repo, drevs, write): | |
|
639 | 639 | """generate plain-text patch readable by 'hg import' |
|
640 | 640 | |
|
641 |
write is usually ui.write. |
|
|
642 | stack is True, also write dependent patches. | |
|
641 | write is usually ui.write. drevs is what "querydrev" returns, results of | |
|
642 | "differential.query". | |
|
643 | 643 | """ |
|
644 | # Differential Revisions | |
|
645 | drevs = querydrev(repo, params, stack) | |
|
646 | ||
|
647 | 644 | # Prefetch hg:meta property for all diffs |
|
648 | 645 | diffids = sorted(set(max(int(v) for v in drev[r'diffs']) for drev in drevs)) |
|
649 | 646 | diffs = callconduit(repo, 'differential.querydiffs', {'ids': diffids}) |
@@ -683,4 +680,5 b' def phabread(ui, repo, revid, **opts):' | |||
|
683 | 680 | revid = int(revid.split('/')[-1].replace('D', '')) |
|
684 | 681 | except ValueError: |
|
685 | 682 | raise error.Abort(_('invalid Revision ID: %s') % revid) |
|
686 |
|
|
|
683 | drevs = querydrev(repo, {'ids': [revid]}, opts.get('stack')) | |
|
684 | readpatch(repo, drevs, ui.write) |
General Comments 0
You need to be logged in to leave comments.
Login now