##// END OF EJS Templates
diff: make --stat respect ui.relative-paths...
Martin von Zweigbergk -
r41819:db69a763 default
parent child Browse files
Show More
@@ -99,6 +99,9 b' def diffordiffstat(ui, repo, diffopts, n'
99 99 width = 80
100 100 if not ui.plain():
101 101 width = ui.termwidth() - graphwidth
102 # If an explicit --root was given, don't respect ui.relative-paths
103 if not relroot:
104 pathfn = compose(scmutil.getuipathfn(repo), pathfn)
102 105
103 106 chunks = ctx2.diff(ctx1, match, changes, opts=diffopts, pathfn=pathfn,
104 107 copysourcematch=copysourcematch,
@@ -146,10 +146,21 b' diffstat within directories:'
146 146 $ hg diff --stat .
147 147 dir1/new | 1 +
148 148 1 files changed, 1 insertions(+), 0 deletions(-)
149 $ hg diff --stat . --config ui.relative-paths=yes
150 new | 1 +
151 1 files changed, 1 insertions(+), 0 deletions(-)
149 152 $ hg diff --stat --root .
150 153 new | 1 +
151 154 1 files changed, 1 insertions(+), 0 deletions(-)
152 155
156 $ hg diff --stat --root . --config ui.relative-paths=yes
157 new | 1 +
158 1 files changed, 1 insertions(+), 0 deletions(-)
159 --root trumps ui.relative-paths
160 $ hg diff --stat --root .. --config ui.relative-paths=yes
161 new | 1 +
162 ../dir2/new | 1 +
163 2 files changed, 2 insertions(+), 0 deletions(-)
153 164 $ hg diff --stat --root ../dir1 ../dir2
154 165 warning: ../dir2 not inside relative root .
155 166
General Comments 0
You need to be logged in to leave comments. Login now