Mercurial > hg
changeset 6040:1d0bfa4c75c0
commands.py, patch.py: add -U option to hg diff command
author | jorendorff@mozilla.com |
---|---|
date | Thu, 26 Jul 2007 07:56:04 -0400 |
parents | 81f8ff2a9bf2 |
children | dd714452c26e |
files | mercurial/commands.py mercurial/patch.py tests/test-help.out |
diffstat | 3 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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