Patchwork [6,of,7,evolve-ext] check-code: make directaccess.py comply with check-code

login
register
mail settings
Submitter Laurent Charignon
Date Dec. 4, 2015, 11:37 p.m.
Message ID <7ef230ac965d86cdcbff.1449272236@lcharignon-mbp>
Download mbox | patch
Permalink /patch/11836/
State Accepted
Headers show

Comments

Laurent Charignon - Dec. 4, 2015, 11:37 p.m.
# HG changeset patch
# User Laurent Charignon <lcharignon@fb.com>
# Date 1449271680 28800
#      Fri Dec 04 15:28:00 2015 -0800
# Node ID 7ef230ac965d86cdcbffecdb3623fcfbfaf1d953
# Parent  f21cdd7a333a6afe85fdda30b7cabc9ac145e5f3
check-code: make directaccess.py comply with check-code

Patch

diff --git a/hgext/directaccess.py b/hgext/directaccess.py
--- a/hgext/directaccess.py
+++ b/hgext/directaccess.py
@@ -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()