Mercurial > hg
view tests/test-journal-exists.t @ 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 | b6673e9bdcf6 |
children | 013de80bf90e |
line wrap: on
line source
$ hg init $ echo a > a $ hg ci -Am0 adding a $ hg -q clone . foo $ touch .hg/store/journal $ echo foo > a $ hg ci -Am0 abort: abandoned transaction found! (run 'hg recover' to clean up transaction) [255] $ hg recover rolling back interrupted transaction checking changesets checking manifests crosschecking files in changesets and manifests checking files checked 1 changesets with 1 changes to 1 files Check that zero-size journals are correctly aborted: #if unix-permissions no-root $ hg bundle -qa repo.hg $ chmod -w foo/.hg/store/00changelog.i $ hg -R foo unbundle repo.hg adding changesets abort: Permission denied: '$TESTTMP/foo/.hg/store/.00changelog.i-*' (glob) [255] $ if test -f foo/.hg/store/journal; then echo 'journal exists :-('; fi #endif