diff 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
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Wed Mar 25 15:58:31 2015 -0400
+++ b/mercurial/cmdutil.py	Wed Mar 25 11:55:15 2015 -0700
@@ -1008,7 +1008,7 @@
 
 def diffordiffstat(ui, repo, diffopts, node1, node2, match,
                    changes=None, stat=False, fp=None, prefix='',
-                   relative='', listsubrepos=False):
+                   root='', listsubrepos=False):
     '''show diff or diffstat.'''
     if fp is None:
         write = ui.write
@@ -1016,8 +1016,8 @@
         def write(s, **kw):
             fp.write(s)
 
-    if relative:
-        relroot = pathutil.canonpath(repo.root, repo.getcwd(), relative)
+    if root:
+        relroot = pathutil.canonpath(repo.root, repo.getcwd(), root)
     else:
         relroot = ''
     if relroot != '':