HomePhabricator

context: name files relative to cwd in warning messages

Authored by mharbison72.

Description

context: name files relative to cwd in warning messages

I was several directories deep in the kernel tree, ran hg add, and got the
warning about the size of one of the files. I noticed that it suggested undoing
the add with a specific revert command. The problem is, it would have failed
since the path printed was relative to the repo root instead of cwd. While
here, I just fixed the other messages too. As an added benefit, these messages
now look the same as the verbose/inexact messages for the corresponding command.

I don't think most of these messages are reachable (typically the corresponding
cmdutil function does the check). I wasn't able to figure out why the keyword
tests were failing when using pathto()- I couldn't cause an absolute path to be
used by manipulating the --cwd flag on a regular add. (I did notice that
keyword is adding the file without holding wlock.)

Details

Committed
mharbison72Jul 11 2017, 12:40 AM
Parents
rHG9c6e64911de0: run-tests: disable color on Windows
Branches
Unknown
Tags
Unknown