Show More
@@ -223,9 +223,11 b' diff [-a] [-r revision] [-r revision] [f' | |||
|
223 | 223 | probably with undesirable results. |
|
224 | 224 | |
|
225 | 225 | options: |
|
226 | -a, --text treat all files as text | |
|
227 | -I, --include <pat> include names matching the given patterns | |
|
228 | -X, --exclude <pat> exclude names matching the given patterns | |
|
226 | -a, --text treat all files as text | |
|
227 | -I, --include <pat> include names matching the given patterns | |
|
228 | -p, --show-function show which function each change is in | |
|
229 | -X, --exclude <pat> exclude names matching the given patterns | |
|
230 | -w, --ignore-all-space ignore white space when comparing lines | |
|
229 | 231 | |
|
230 | 232 | export [-o filespec] [revision] ...:: |
|
231 | 233 | Print the changeset header and diffs for one or more revisions. |
@@ -261,7 +261,7 b' def make_file(repo, r, pat, node=None,' | |||
|
261 | 261 | mode) |
|
262 | 262 | |
|
263 | 263 | def dodiff(fp, ui, repo, node1, node2, files=None, match=util.always, |
|
264 | changes=None, text=False): | |
|
264 | changes=None, text=False, opts={}): | |
|
265 | 265 | if not changes: |
|
266 | 266 | changes = repo.changes(node1, node2, files, match=match) |
|
267 | 267 | modified, added, removed, deleted, unknown = changes |
@@ -296,8 +296,8 b' def dodiff(fp, ui, repo, node1, node2, f' | |||
|
296 | 296 | date1 = util.datestr(change[2]) |
|
297 | 297 | |
|
298 | 298 | diffopts = ui.diffopts() |
|
299 | showfunc = diffopts['showfunc'] | |
|
300 | ignorews = diffopts['ignorews'] | |
|
299 | showfunc = opts.get('show_function') or diffopts['showfunc'] | |
|
300 | ignorews = opts.get('ignore_all_space') or diffopts['ignorews'] | |
|
301 | 301 | for f in modified: |
|
302 | 302 | to = None |
|
303 | 303 | if f in mmap: |
@@ -1140,7 +1140,7 b' def diff(ui, repo, *pats, **opts):' | |||
|
1140 | 1140 | fns, matchfn, anypats = matchpats(repo, pats, opts) |
|
1141 | 1141 | |
|
1142 | 1142 | dodiff(sys.stdout, ui, repo, node1, node2, fns, match=matchfn, |
|
1143 | text=opts['text']) | |
|
1143 | text=opts['text'], opts=opts) | |
|
1144 | 1144 | |
|
1145 | 1145 | def doexport(ui, repo, changeset, seqno, total, revwidth, opts): |
|
1146 | 1146 | node = repo.lookup(changeset) |
@@ -2337,7 +2337,12 b' table = {' | |||
|
2337 | 2337 | [('r', 'rev', [], _('revision')), |
|
2338 | 2338 | ('a', 'text', None, _('treat all files as text')), |
|
2339 | 2339 | ('I', 'include', [], _('include names matching the given patterns')), |
|
2340 | ('X', 'exclude', [], _('exclude names matching the given patterns'))], | |
|
2340 | ('p', 'show-function', None, | |
|
2341 | _('show which function each change is in')), | |
|
2342 | ('w', 'ignore-all-space', None, | |
|
2343 | _('ignore white space when comparing lines')), | |
|
2344 | ('X', 'exclude', [], | |
|
2345 | _('exclude names matching the given patterns'))], | |
|
2341 | 2346 | _('hg diff [-a] [-I] [-X] [-r REV1 [-r REV2]] [FILE]...')), |
|
2342 | 2347 | "^export": |
|
2343 | 2348 | (export, |
General Comments 0
You need to be logged in to leave comments.
Login now