Mercurial > hg
comparison tests/test-add.t @ 33501:7008f6819002
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.)
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 11 Jul 2017 00:40:29 -0400 |
parents | 2dac9d6a0af9 |
children | 2cd5aba5e1d2 |
comparison
equal
deleted
inserted
replaced
33500:9c6e64911de0 | 33501:7008f6819002 |
---|---|
12 $ hg forget a | 12 $ hg forget a |
13 $ hg add | 13 $ hg add |
14 adding a | 14 adding a |
15 $ hg st | 15 $ hg st |
16 A a | 16 A a |
17 $ mkdir dir | |
18 $ cd dir | |
19 $ hg add ../a | |
20 ../a already tracked! | |
21 $ cd .. | |
17 | 22 |
18 $ echo b > b | 23 $ echo b > b |
19 $ hg add -n b | 24 $ hg add -n b |
20 $ hg st | 25 $ hg st |
21 A a | 26 A a |