# HG changeset patch # User Laurent Charignon # Date 1449271680 28800 # Node ID ebebff25b89105f46112dc3f911f2a83d6093fe5 # Parent 40e496bc7b54a28f0af7fe5f136f60c905d0d7e9 check-code: make directaccess.py comply with check-code diff -r 40e496bc7b54 -r ebebff25b891 hgext/directaccess.py --- a/hgext/directaccess.py Fri Dec 04 15:31:19 2015 -0800 +++ b/hgext/directaccess.py Fri Dec 04 15:28:00 2015 -0800 @@ -1,5 +1,5 @@ """ This extension provides direct access -It is the ability to refer and access hidden sha in commands provided that you +It is the ability to refer and access hidden sha in commands provided that you know their value. For example hg log -r xxx where xxx is a commit has should work whether xxx is hidden or not as we assume that the user knows what he is doing when referring @@ -72,7 +72,8 @@ def setupdirectaccess(): """ Add two new filtername that behave like visible to provide direct access - and direct access with warning. Wraps the commands to setup direct access """ + and direct access with warning. Wraps the commands to setup direct access + """ repoview.filtertable.update({'visible-directaccess-nowarn': _computehidden}) repoview.filtertable.update({'visible-directaccess-warn': _computehidden}) branchmap.subsettable['visible-directaccess-nowarn'] = 'visible' @@ -189,8 +190,8 @@ if prelength != len(repo._explicitaccess): if repo.filtername != 'visible-directaccess-nowarn': unhiddencommits = repo._explicitaccess - accessbefore - repo.ui.warn( _("Warning: accessing hidden changesets %s " - "for write operation\n") % - (",".join([str(repo.unfiltered()[l]) + repo.ui.warn(_("Warning: accessing hidden changesets %s " + "for write operation\n") % + (",".join([str(repo.unfiltered()[l]) for l in unhiddencommits]))) repo.invalidatevolatilesets()