comparison mercurial/cmdutil.py @ 35007:058c725925e3 stable

diff: disable diff.noprefix option for diffstat (issue5759) We could use patch.diffhunks() instead of patch.diff() to get filenames without parsing patch content, but that isn't always possible because we sometimes feed raw patch data to patch.diffstat().
author Yuya Nishihara <yuya@tcha.org>
date Sun, 17 Dec 2017 18:43:05 +0900
parents 691524f0bbf6
children 786289423e97
comparison
equal deleted inserted replaced
35006:0279c2267d00 35007:058c725925e3
1512 if not matchroot.startswith(relroot): 1512 if not matchroot.startswith(relroot):
1513 ui.warn(_('warning: %s not inside relative root %s\n') % ( 1513 ui.warn(_('warning: %s not inside relative root %s\n') % (
1514 match.uipath(matchroot), uirelroot)) 1514 match.uipath(matchroot), uirelroot))
1515 1515
1516 if stat: 1516 if stat:
1517 diffopts = diffopts.copy(context=0) 1517 diffopts = diffopts.copy(context=0, noprefix=False)
1518 width = 80 1518 width = 80
1519 if not ui.plain(): 1519 if not ui.plain():
1520 width = ui.termwidth() 1520 width = ui.termwidth()
1521 chunks = patch.diff(repo, node1, node2, match, changes, diffopts, 1521 chunks = patch.diff(repo, node1, node2, match, changes, diffopts,
1522 prefix=prefix, relroot=relroot, 1522 prefix=prefix, relroot=relroot,