Mercurial > hg
view tests/mockmakedate.py @ 41577:5f827e9ce870
status: if ui.relative-paths=no, don't use relative paths even with patterns
Without ui.relative-paths or command.status.relative set, you get this
behavior:
hgext$ hg st
M hgext/narrow/narrowrepo.py
hgext$ hg st .
M narrow/narrowrepo.py
hgext$ hg st narrow
M narrow/narrowrepo.py
I think it's surprising that some of those produce relative paths. I
suspect it works that way because "hg st ." was an easy way of getting
relative paths. Perhaps not much thought was given to how it should
behave when the pattern was not ".". It also feels wrong to conflate
the request for relative patterns with matching of of patterns.
Since we can now start fresh and define the behavior of
ui.relative-paths as we want, I suggest we make ui.relative-paths=no
consistently not give relative paths. So that's what this paths starts
doing for `hg status`.
Differential Revision: https://phab.mercurial-scm.org/D5802
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 01 Feb 2019 22:52:09 -0800 |
parents | 704a3aa3dc0a |
children | 2372284d9457 |
line wrap: on
line source
# mock out util.makedate() to supply testable values from __future__ import absolute_import import os from mercurial import pycompat from mercurial.utils import dateutil def mockmakedate(): filename = os.path.join(os.environ['TESTTMP'], 'testtime') try: with open(filename, 'rb') as timef: time = float(timef.read()) + 1 except IOError: time = 0.0 with open(filename, 'wb') as timef: timef.write(pycompat.bytestr(time)) return (time, 0) dateutil.makedate = mockmakedate