Mercurial > hg
comparison mercurial/cmdutil.py @ 24455:16961d43dc89
diff: rename --relative option to --root
The diff output format is unable to express files outside the directory so it
makes sense to name this option --root instead of --relative.
author | Sean Farley <sean@farley.io> |
---|---|
date | Wed, 25 Mar 2015 11:55:15 -0700 |
parents | c3bbafef25d6 |
children | 06d199e66bbc |
comparison
equal
deleted
inserted
replaced
24454:59904edf0a5e | 24455:16961d43dc89 |
---|---|
1006 for seqno, rev in enumerate(revs): | 1006 for seqno, rev in enumerate(revs): |
1007 single(rev, seqno + 1, fp) | 1007 single(rev, seqno + 1, fp) |
1008 | 1008 |
1009 def diffordiffstat(ui, repo, diffopts, node1, node2, match, | 1009 def diffordiffstat(ui, repo, diffopts, node1, node2, match, |
1010 changes=None, stat=False, fp=None, prefix='', | 1010 changes=None, stat=False, fp=None, prefix='', |
1011 relative='', listsubrepos=False): | 1011 root='', listsubrepos=False): |
1012 '''show diff or diffstat.''' | 1012 '''show diff or diffstat.''' |
1013 if fp is None: | 1013 if fp is None: |
1014 write = ui.write | 1014 write = ui.write |
1015 else: | 1015 else: |
1016 def write(s, **kw): | 1016 def write(s, **kw): |
1017 fp.write(s) | 1017 fp.write(s) |
1018 | 1018 |
1019 if relative: | 1019 if root: |
1020 relroot = pathutil.canonpath(repo.root, repo.getcwd(), relative) | 1020 relroot = pathutil.canonpath(repo.root, repo.getcwd(), root) |
1021 else: | 1021 else: |
1022 relroot = '' | 1022 relroot = '' |
1023 if relroot != '': | 1023 if relroot != '': |
1024 # XXX relative roots currently don't work if the root is within a | 1024 # XXX relative roots currently don't work if the root is within a |
1025 # subrepo | 1025 # subrepo |