keyword: rename kw_diff to kwdiff in keeping with Mercurial style rules
authorSiddharth Agarwal <sid0@fb.com>
Tue, 17 Mar 2015 15:52:28 -0700
changeset 24369 109a2acc19ed
parent 24368 55fd99a23fdc
child 24370 3e8b06097d00
keyword: rename kw_diff to kwdiff in keeping with Mercurial style rules In an upcoming patch we'll change this function's signature. If the name is kept the same, test-check-commit-hg.t complains.
hgext/keyword.py
--- a/hgext/keyword.py	Tue Mar 17 20:36:33 2015 +0900
+++ b/hgext/keyword.py	Tue Mar 17 15:52:28 2015 -0700
@@ -643,7 +643,7 @@
         # shrink keywords read from working dir
         self.lines = kwt.shrinklines(self.fname, self.lines)
 
-    def kw_diff(orig, repo, node1=None, node2=None, match=None, changes=None,
+    def kwdiff(orig, repo, node1=None, node2=None, match=None, changes=None,
                 opts=None, prefix=''):
         '''Monkeypatch patch.diff to avoid expansion.'''
         kwt.restrict = True
@@ -737,7 +737,7 @@
 
     extensions.wrapfunction(context.filectx, 'cmp', kwfilectx_cmp)
     extensions.wrapfunction(patch.patchfile, '__init__', kwpatchfile_init)
-    extensions.wrapfunction(patch, 'diff', kw_diff)
+    extensions.wrapfunction(patch, 'diff', kwdiff)
     extensions.wrapfunction(cmdutil, 'amend', kw_amend)
     extensions.wrapfunction(cmdutil, 'copy', kw_copy)
     extensions.wrapfunction(cmdutil, 'dorecord', kw_dorecord)