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

login
register
mail settings
Submitter phabricator
Date Sept. 2, 2017, 5:39 p.m.
Message ID <537ffe5932c0e8f748b39c132748bc4b@localhost.localdomain>
Download mbox | patch
Permalink /patch/23628/
State Not Applicable
Headers show

Comments

phabricator - Sept. 2, 2017, 5:39 p.m.
pulkit updated this revision to Diff 1580.
pulkit edited the summary of this revision.
pulkit retitled this revision from "directaccess: add a accesslevel argument to registrar.command" to "directaccess: add a hiddenlevel argument to registrar.command".

REPOSITORY
  rHG Mercurial

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

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

AFFECTED FILES
  mercurial/registrar.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/registrar.py b/mercurial/registrar.py
--- a/mercurial/registrar.py
+++ b/mercurial/registrar.py
@@ -132,10 +132,19 @@ 
     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: 0,1 and 2
+    where
+        0: Can't access the hidden commits (unrecoverable write command)
+        1: Can acces the hidden commits but should print warnings
+            (recoverable write command)
+        2: Can access the hidden commits without any warnings (read command)
     """
 
     def _doregister(self, func, name, options=(), synopsis=None,
-                    norepo=False, optionalrepo=False, inferrepo=False):
+                    norepo=False, optionalrepo=False, inferrepo=False,
+                    hiddenlevel=0):
         func.norepo = norepo
         func.optionalrepo = optionalrepo
         func.inferrepo = inferrepo