mercurial/commands.py
changeset 9725 3f522d2fa633
parent 9718 fe1b19bfe75b
child 9734 36c388a1aa51
equal deleted inserted replaced
9724:40ef3bf3e04a 9725:3f522d2fa633
  1100     """
  1100     """
  1101 
  1101 
  1102     revs = opts.get('rev')
  1102     revs = opts.get('rev')
  1103     change = opts.get('change')
  1103     change = opts.get('change')
  1104     stat = opts.get('stat')
  1104     stat = opts.get('stat')
       
  1105     inv = opts.get('inverse')
  1105 
  1106 
  1106     if revs and change:
  1107     if revs and change:
  1107         msg = _('cannot specify --rev and --change at the same time')
  1108         msg = _('cannot specify --rev and --change at the same time')
  1108         raise util.Abort(msg)
  1109         raise util.Abort(msg)
  1109     elif change:
  1110     elif change:
  1110         node2 = repo.lookup(change)
  1111         node2 = repo.lookup(change)
  1111         node1 = repo[node2].parents()[0].node()
  1112         node1 = repo[node2].parents()[0].node()
  1112     else:
  1113     else:
  1113         node1, node2 = cmdutil.revpair(repo, revs)
  1114         node1, node2 = cmdutil.revpair(repo, revs)
       
  1115 
       
  1116     if inv:
       
  1117         node1, node2 = node2, node1
  1114 
  1118 
  1115     if stat:
  1119     if stat:
  1116         opts['unified'] = '0'
  1120         opts['unified'] = '0'
  1117     diffopts = patch.diffopts(ui, opts)
  1121     diffopts = patch.diffopts(ui, opts)
  1118 
  1122 
  3278     ('', 'nodates', None, _("don't include dates in diff headers"))
  3282     ('', 'nodates', None, _("don't include dates in diff headers"))
  3279 ]
  3283 ]
  3280 
  3284 
  3281 diffopts2 = [
  3285 diffopts2 = [
  3282     ('p', 'show-function', None, _('show which function each change is in')),
  3286     ('p', 'show-function', None, _('show which function each change is in')),
       
  3287     ('', 'inverse', None, _('produce a diff that undoes the changes')),
  3283     ('w', 'ignore-all-space', None,
  3288     ('w', 'ignore-all-space', None,
  3284      _('ignore white space when comparing lines')),
  3289      _('ignore white space when comparing lines')),
  3285     ('b', 'ignore-space-change', None,
  3290     ('b', 'ignore-space-change', None,
  3286      _('ignore changes in the amount of white space')),
  3291      _('ignore changes in the amount of white space')),
  3287     ('B', 'ignore-blank-lines', None,
  3292     ('B', 'ignore-blank-lines', None,