##// END OF EJS Templates
Make hg debugancestor accept -R by making it an optionalrepo command.
Thomas Arendsen Hein -
r6189:81cbb5df default
parent child Browse files
Show More
@@ -568,14 +568,16 b' def copy(ui, repo, *pats, **opts):'
568 finally:
568 finally:
569 del wlock
569 del wlock
570
570
571 def debugancestor(ui, *args):
571 def debugancestor(ui, repo, *args):
572 """find the ancestor revision of two revisions in a given index"""
572 """find the ancestor revision of two revisions in a given index"""
573 if len(args) == 3:
573 if len(args) == 3:
574 index, rev1, rev2 = args
574 index, rev1, rev2 = args
575 r = revlog.revlog(util.opener(os.getcwd(), audit=False), index)
575 r = revlog.revlog(util.opener(os.getcwd(), audit=False), index)
576 elif len(args) == 2:
576 elif len(args) == 2:
577 if not repo:
578 raise util.Abort(_("There is no Mercurial repository here "
579 "(.hg not found)"))
577 rev1, rev2 = args
580 rev1, rev2 = args
578 repo = hg.repository(ui)
579 r = repo.changelog
581 r = repo.changelog
580 else:
582 else:
581 raise util.Abort(_('either two or three arguments required'))
583 raise util.Abort(_('either two or three arguments required'))
@@ -3162,6 +3164,6 b' table = {'
3162 "version": (version_, [], _('hg version')),
3164 "version": (version_, [], _('hg version')),
3163 }
3165 }
3164
3166
3165 norepo = ("clone init version help debugancestor debugcomplete debugdata"
3167 norepo = ("clone init version help debugcomplete debugdata"
3166 " debugindex debugindexdot debugdate debuginstall debugfsinfo")
3168 " debugindex debugindexdot debugdate debuginstall debugfsinfo")
3167 optionalrepo = ("identify paths serve showconfig")
3169 optionalrepo = ("identify paths serve showconfig debugancestor")
General Comments 0
You need to be logged in to leave comments. Login now