commands.py, patch.py: add -U option to hg diff command
authorjorendorff@mozilla.com
Thu, 26 Jul 2007 07:56:04 -0400
changeset 6040 1d0bfa4c75c0
parent 4998 81f8ff2a9bf2
child 6041 dd714452c26e
commands.py, patch.py: add -U option to hg diff command
mercurial/commands.py
mercurial/patch.py
tests/test-help.out
--- a/mercurial/commands.py	Wed Jul 25 15:58:10 2007 +0900
+++ b/mercurial/commands.py	Thu Jul 26 07:56:04 2007 -0400
@@ -2916,6 +2916,8 @@
            _('ignore changes in the amount of white space')),
           ('B', 'ignore-blank-lines', None,
            _('ignore changes whose lines are all blank')),
+          ('U', 'unified', 3,
+           _('number of lines of context to show'))
          ] + walkopts,
          _('hg diff [OPTION]... [-r REV1 [-r REV2]] [FILE]...')),
     "^export":
--- a/mercurial/patch.py	Wed Jul 25 15:58:10 2007 +0900
+++ b/mercurial/patch.py	Thu Jul 26 07:56:04 2007 -0400
@@ -1011,7 +1011,8 @@
         showfunc=get('show_function', 'showfunc'),
         ignorews=get('ignore_all_space', 'ignorews'),
         ignorewsamount=get('ignore_space_change', 'ignorewsamount'),
-        ignoreblanklines=get('ignore_blank_lines', 'ignoreblanklines'))
+        ignoreblanklines=get('ignore_blank_lines', 'ignoreblanklines'),
+        context=get('unified'))
 
 def updatedir(ui, repo, patches):
     '''Update dirstate after patch application according to metadata'''
--- a/tests/test-help.out	Wed Jul 25 15:58:10 2007 +0900
+++ b/tests/test-help.out	Thu Jul 26 07:56:04 2007 -0400
@@ -205,6 +205,7 @@
  -w --ignore-all-space     ignore white space when comparing lines
  -b --ignore-space-change  ignore changes in the amount of white space
  -B --ignore-blank-lines   ignore changes whose lines are all blank
+ -U --unified              number of lines of context to show (default: 3)
  -I --include              include names matching the given patterns
  -X --exclude              exclude names matching the given patterns