Patchwork D612: directaccess: add a hiddenlevel argument to registrar.command

login
register
mail settings
Submitter phabricator
Date Sept. 11, 2017, 9:56 p.m.
Message ID <644735c062538aa7989977177a925994@localhost.localdomain>
Download mbox | patch
Permalink /patch/23794/
State Not Applicable
Headers show

Comments

phabricator - Sept. 11, 2017, 9:56 p.m.
pulkit updated this revision to Diff 1730.
pulkit edited the summary of this revision.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D612?vs=1580&id=1730

REVISION DETAIL
  https://phab.mercurial-scm.org/D612

AFFECTED FILES
  mercurial/registrar.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: yuja, durham, mercurial-devel

Patch

diff --git a/mercurial/registrar.py b/mercurial/registrar.py
--- a/mercurial/registrar.py
+++ b/mercurial/registrar.py
@@ -132,10 +132,21 @@ 
     command line arguments. If True, arguments will be examined for potential
     repository locations. See ``findrepo()``. If a repository is found, it
     will be used.
+
+    The hiddenlevel argument defines what level of access on hidden commits
+    the command has. The argument can have three possible values as mentioned
+    below:
+        'UNRECOVERABLE_WRITE':
+                Can't access the hidden commits
+        'RECOVERABLE_WRITE':
+                Can access the hidden commits but should print warnings
+        'READ_ONLY':
+                Can access the hidden commits without any warnings
     """
 
     def _doregister(self, func, name, options=(), synopsis=None,
-                    norepo=False, optionalrepo=False, inferrepo=False):
+                    norepo=False, optionalrepo=False, inferrepo=False,
+                    hiddenlevel='UNRECOVERABLE_WRITE'):
         func.norepo = norepo
         func.optionalrepo = optionalrepo
         func.inferrepo = inferrepo