equal
deleted
inserted
replaced
74 @command('debugancestor', [], _('[INDEX] REV1 REV2'), optionalrepo=True) |
74 @command('debugancestor', [], _('[INDEX] REV1 REV2'), optionalrepo=True) |
75 def debugancestor(ui, repo, *args): |
75 def debugancestor(ui, repo, *args): |
76 """find the ancestor revision of two revisions in a given index""" |
76 """find the ancestor revision of two revisions in a given index""" |
77 if len(args) == 3: |
77 if len(args) == 3: |
78 index, rev1, rev2 = args |
78 index, rev1, rev2 = args |
79 r = revlog.revlog(scmutil.opener(pycompat.getcwd(), audit=False), index) |
79 r = revlog.revlog(scmutil.vfs(pycompat.getcwd(), audit=False), index) |
80 lookup = r.lookup |
80 lookup = r.lookup |
81 elif len(args) == 2: |
81 elif len(args) == 2: |
82 if not repo: |
82 if not repo: |
83 raise error.Abort(_('there is no Mercurial repository here ' |
83 raise error.Abort(_('there is no Mercurial repository here ' |
84 '(.hg not found)')) |
84 '(.hg not found)')) |
450 Otherwise, the changelog DAG of the current repo is emitted. |
450 Otherwise, the changelog DAG of the current repo is emitted. |
451 """ |
451 """ |
452 spaces = opts.get('spaces') |
452 spaces = opts.get('spaces') |
453 dots = opts.get('dots') |
453 dots = opts.get('dots') |
454 if file_: |
454 if file_: |
455 rlog = revlog.revlog(scmutil.opener(pycompat.getcwd(), audit=False), |
455 rlog = revlog.revlog(scmutil.vfs(pycompat.getcwd(), audit=False), |
456 file_) |
456 file_) |
457 revs = set((int(r) for r in revs)) |
457 revs = set((int(r) for r in revs)) |
458 def events(): |
458 def events(): |
459 for r in rlog: |
459 for r in rlog: |
460 yield 'n', (r, list(p for p in rlog.parentrevs(r) |
460 yield 'n', (r, list(p for p in rlog.parentrevs(r) |