mercurial/commands.py
changeset 10014 54cd28258ea7
parent 9983 46c6bac41dc6
child 10015 b5f352f33520
equal deleted inserted replaced
10013:b2e87fde6806 10014:54cd28258ea7
  2840     report permission changes and diff only reports changes relative
  2840     report permission changes and diff only reports changes relative
  2841     to one merge parent.
  2841     to one merge parent.
  2842 
  2842 
  2843     If one revision is given, it is used as the base revision.
  2843     If one revision is given, it is used as the base revision.
  2844     If two revisions are given, the differences between them are
  2844     If two revisions are given, the differences between them are
  2845     shown.
  2845     shown. The --change option can also be used as a shortcut to list
       
  2846     the changed files of a revision from its first parent.
  2846 
  2847 
  2847     The codes used to show the status of files are::
  2848     The codes used to show the status of files are::
  2848 
  2849 
  2849       M = modified
  2850       M = modified
  2850       A = added
  2851       A = added
  2854       ? = not tracked
  2855       ? = not tracked
  2855       I = ignored
  2856       I = ignored
  2856         = origin of the previous file listed as A (added)
  2857         = origin of the previous file listed as A (added)
  2857     """
  2858     """
  2858 
  2859 
  2859     node1, node2 = cmdutil.revpair(repo, opts.get('rev'))
  2860     revs = opts.get('rev')
       
  2861     change = opts.get('change')
       
  2862 
       
  2863     if revs and change:
       
  2864         msg = _('cannot specify --rev and --change at the same time')
       
  2865         raise util.Abort(msg)
       
  2866     elif change:
       
  2867         node2 = repo.lookup(change)
       
  2868         node1 = repo[node2].parents()[0].node()
       
  2869     else:
       
  2870         node1, node2 = cmdutil.revpair(repo, revs)
       
  2871 
  2860     cwd = (pats and repo.getcwd()) or ''
  2872     cwd = (pats and repo.getcwd()) or ''
  2861     end = opts.get('print0') and '\0' or '\n'
  2873     end = opts.get('print0') and '\0' or '\n'
  2862     copy = {}
  2874     copy = {}
  2863     states = 'modified added removed deleted unknown ignored clean'.split()
  2875     states = 'modified added removed deleted unknown ignored clean'.split()
  2864     show = [k for k in states if opts.get(k)]
  2876     show = [k for k in states if opts.get(k)]
  3658           ('n', 'no-status', None, _('hide status prefix')),
  3670           ('n', 'no-status', None, _('hide status prefix')),
  3659           ('C', 'copies', None, _('show source of copied files')),
  3671           ('C', 'copies', None, _('show source of copied files')),
  3660           ('0', 'print0', None,
  3672           ('0', 'print0', None,
  3661            _('end filenames with NUL, for use with xargs')),
  3673            _('end filenames with NUL, for use with xargs')),
  3662           ('', 'rev', [], _('show difference from revision')),
  3674           ('', 'rev', [], _('show difference from revision')),
       
  3675           ('', 'change', '', _('list the changed files of a revision')),
  3663          ] + walkopts,
  3676          ] + walkopts,
  3664          _('[OPTION]... [FILE]...')),
  3677          _('[OPTION]... [FILE]...')),
  3665     "tag":
  3678     "tag":
  3666         (tag,
  3679         (tag,
  3667          [('f', 'force', None, _('replace existing tag')),
  3680          [('f', 'force', None, _('replace existing tag')),