This is an archive of the discontinued Mercurial Phabricator instance.

status: if ui.relative-paths=no, don't use relative paths even with patterns
ClosedPublic

Authored by martinvonz on Feb 2 2019, 2:12 AM.

Details

Summary

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.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

martinvonz created this revision.Feb 2 2019, 2:12 AM
martinvonz updated this revision to Diff 13734.Feb 3 2019, 12:46 PM
martinvonz updated this revision to Diff 13813.Feb 5 2019, 12:48 PM
This revision was automatically updated to reflect the committed changes.