Patchwork [1,of,5,relative-diff] keyword: rename kw_diff to kwdiff in keeping with Mercurial style rules

login
register
mail settings
Submitter Siddharth Agarwal
Date March 17, 2015, 10:57 p.m.
Message ID <ea13de719441936557d9.1426633046@devbig136.prn2.facebook.com>
Download mbox | patch
Permalink /patch/8130/
State Accepted
Commit 109a2acc19ed7dc59335991d8f5038bbdc13b7dd
Headers show

Comments

Siddharth Agarwal - March 17, 2015, 10:57 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1426632748 25200
#      Tue Mar 17 15:52:28 2015 -0700
# Node ID ea13de719441936557d9e81bca77fe3a8d8a9934
# Parent  567ae53657544744155897ada91f16f8af61ad8a
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.

Patch

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