comparison mercurial/commands.py @ 31589:7e3b145f8247

status: support commands.status.relative config When the config is set to true, status output becomes relative to the working directory. This has bugged me since I started using hg and it turns it is sillily simple to support it (unless I missed something, of course). We could also add a --relative flag, but I would personally always want that on, and I haven't heard any use for having it sometimes on, so this patch only lets you enable it via config.
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 21 Mar 2017 17:50:44 -0700
parents 37a0ad669051
children adace35f931d
comparison
equal deleted inserted replaced
31588:37a0ad669051 31589:7e3b145f8247
4732 node2 = scmutil.revsingle(repo, change, None).node() 4732 node2 = scmutil.revsingle(repo, change, None).node()
4733 node1 = repo[node2].p1().node() 4733 node1 = repo[node2].p1().node()
4734 else: 4734 else:
4735 node1, node2 = scmutil.revpair(repo, revs) 4735 node1, node2 = scmutil.revpair(repo, revs)
4736 4736
4737 if pats: 4737 if pats or ui.configbool('commands', 'status.relative'):
4738 cwd = repo.getcwd() 4738 cwd = repo.getcwd()
4739 else: 4739 else:
4740 cwd = '' 4740 cwd = ''
4741 4741
4742 if opts.get('print0'): 4742 if opts.get('print0'):