Mercurial > evolve
changeset 1552:ebebff25b891
check-code: make directaccess.py comply with check-code
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Fri, 04 Dec 2015 15:28:00 -0800 |
parents | 40e496bc7b54 |
children | ed63bf62ff02 |
files | hgext/directaccess.py |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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()