grep: rename {line_number} to {lineno} as well (BC)
authorYuya Nishihara <yuya@tcha.org>
Sun, 30 Sep 2018 15:37:09 +0900
changeset 39930 66df1059b7c0
parent 39929 47cb6750dea3
child 39931 0d703063d0c8
grep: rename {line_number} to {lineno} as well (BC)
mercurial/commands.py
tests/test-grep.t
--- a/mercurial/commands.py	Sun Sep 30 15:35:17 2018 +0900
+++ b/mercurial/commands.py	Sun Sep 30 15:37:09 2018 +0900
@@ -2680,7 +2680,7 @@
             except error.WdirUnsupported:
                 return ctx[fn].isbinary()
 
-        fieldnamemap = {'filename': 'path', 'linenumber': 'line_number'}
+        fieldnamemap = {'filename': 'path', 'linenumber': 'lineno'}
         if diff:
             iter = difflinestates(pstates, states)
         else:
--- a/tests/test-grep.t	Sun Sep 30 15:35:17 2018 +0900
+++ b/tests/test-grep.t	Sun Sep 30 15:37:09 2018 +0900
@@ -64,7 +64,7 @@
   [
    {
     "date": [4, 0],
-    "line_number": 1,
+    "lineno": 1,
     "node": "914fa752cdea87777ac1a8d5c858b0c736218f6c",
     "path": "port",
     "rev": 4,
@@ -73,7 +73,7 @@
    },
    {
     "date": [4, 0],
-    "line_number": 2,
+    "lineno": 2,
     "node": "914fa752cdea87777ac1a8d5c858b0c736218f6c",
     "path": "port",
     "rev": 4,
@@ -82,7 +82,7 @@
    },
    {
     "date": [4, 0],
-    "line_number": 3,
+    "lineno": 3,
     "node": "914fa752cdea87777ac1a8d5c858b0c736218f6c",
     "path": "port",
     "rev": 4,
@@ -97,7 +97,7 @@
   [
    {
     "date": [4, 0],
-    "line_number": 1,
+    "lineno": 1,
     "node": "914fa752cdea87777ac1a8d5c858b0c736218f6c",
     "path": "port",
     "rev": 4,
@@ -125,7 +125,7 @@
    {
     "change": "-",
     "date": [4, 0],
-    "line_number": 4,
+    "lineno": 4,
     "node": "914fa752cdea87777ac1a8d5c858b0c736218f6c",
     "path": "port",
     "rev": 4,
@@ -135,7 +135,7 @@
    {
     "change": "+",
     "date": [3, 0],
-    "line_number": 4,
+    "lineno": 4,
     "node": "95040cfd017d658c536071c6290230a613c4c2a6",
     "path": "port",
     "rev": 3,
@@ -145,7 +145,7 @@
    {
     "change": "-",
     "date": [2, 0],
-    "line_number": 1,
+    "lineno": 1,
     "node": "3b325e3481a1f07435d81dfdbfa434d9a0245b47",
     "path": "port",
     "rev": 2,
@@ -155,7 +155,7 @@
    {
     "change": "-",
     "date": [2, 0],
-    "line_number": 2,
+    "lineno": 2,
     "node": "3b325e3481a1f07435d81dfdbfa434d9a0245b47",
     "path": "port",
     "rev": 2,
@@ -165,7 +165,7 @@
    {
     "change": "+",
     "date": [2, 0],
-    "line_number": 1,
+    "lineno": 1,
     "node": "3b325e3481a1f07435d81dfdbfa434d9a0245b47",
     "path": "port",
     "rev": 2,
@@ -175,7 +175,7 @@
    {
     "change": "+",
     "date": [2, 0],
-    "line_number": 2,
+    "lineno": 2,
     "node": "3b325e3481a1f07435d81dfdbfa434d9a0245b47",
     "path": "port",
     "rev": 2,
@@ -185,7 +185,7 @@
    {
     "change": "+",
     "date": [2, 0],
-    "line_number": 3,
+    "lineno": 3,
     "node": "3b325e3481a1f07435d81dfdbfa434d9a0245b47",
     "path": "port",
     "rev": 2,
@@ -195,7 +195,7 @@
    {
     "change": "+",
     "date": [1, 0],
-    "line_number": 2,
+    "lineno": 2,
     "node": "8b20f75c158513ff5ac80bd0e5219bfb6f0eb587",
     "path": "port",
     "rev": 1,
@@ -205,7 +205,7 @@
    {
     "change": "+",
     "date": [0, 0],
-    "line_number": 1,
+    "lineno": 1,
     "node": "f31323c9217050ba245ee8b537c713ec2e8ab226",
     "path": "port",
     "rev": 0,
@@ -481,7 +481,7 @@
   [
    {
     "date": [0, 0],
-    "line_number": 1,
+    "lineno": 1,
     "node": "ffffffffffffffffffffffffffffffffffffffff",
     "path": "file2",
     "rev": 2147483647,