Submitter | phabricator |
---|---|
Date | Oct. 11, 2017, 7:11 p.m. |
Message ID | <differential-rev-PHID-DREV-7wzpihjg2t44ez6myjdn-req@phab.mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/24754/ |
State | Superseded |
Headers | show |
Comments
durin42 requested changes to this revision. durin42 added a comment. This revision now requires changes to proceed. Needs tests. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1013 To: pulkit, #hg-reviewers, durin42 Cc: durin42, mercurial-devel
pulkit abandoned this revision. pulkit added a comment. Resend the series as https://phab.mercurial-scm.org/D1140 - https://phab.mercurial-scm.org/D1144. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1013 To: pulkit, #hg-reviewers, durin42 Cc: durin42, mercurial-devel
Patch
diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -42,6 +42,8 @@ ) unrecoverablewrite = registrar.command.unrecoverablewrite +recoverablewrite = registrar.command.recoverablewrite +readonly = registrar.command.readonly class request(object): def __init__(self, args, ui=None, repo=None, fin=None, fout=None, @@ -926,6 +928,14 @@ ui = repo.ui if options['hidden']: repo = repo.unfiltered() + + # Accessing hidden commits based on func.cmdtype + if lui.configbool('experimental', 'directaccess'): + if func.cmdtype == readonly: + repo = repo.filtered('visible-hidden') + elif func.cmdtype == recoverablewrite: + repo = repo.filtered('visible-warnhidden') + args.insert(0, repo) elif rpath: ui.warn(_("warning: --repository ignored\n")) diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -278,6 +278,9 @@ coreconfigitem('experimental', 'crecordtest', default=None, ) +coreconfigitem('experimental', 'directaccess', + default=False, +) coreconfigitem('experimental', 'editortmpinhg', default=False, )