# HG changeset patch # User jorendorff@mozilla.com # Date 1185450964 14400 # Node ID 1d0bfa4c75c0b869cc3f360d2dddf4e584a7c101 # Parent 81f8ff2a9bf20606fc89bc787983f592183e25b5 commands.py, patch.py: add -U option to hg diff command diff -r 81f8ff2a9bf2 -r 1d0bfa4c75c0 mercurial/commands.py --- 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": diff -r 81f8ff2a9bf2 -r 1d0bfa4c75c0 mercurial/patch.py --- 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''' diff -r 81f8ff2a9bf2 -r 1d0bfa4c75c0 tests/test-help.out --- 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