This is in line with both Git and Subversion, and strikes me as a more
humane behavior.
Test output changes are expected once you read test-status.t, and I
feel like we've still got adequate coverage on things.
pulkit |
hg-reviewers |
This is in line with both Git and Subversion, and strikes me as a more
humane behavior.
Test output changes are expected once you read test-status.t, and I
feel like we've still got adequate coverage on things.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
tests/test-status.t | ||
---|---|---|
112 | We had a more extreme case of "entire working directory is untracked" in our internal tests. It was something like this $ dir=foo/bar/baz/qux $ mkdir -p $dir $ cd $dir $ echo stuff > file $ hg st ? file After this patch (we have tweakdefaults turned on internally), the output is instead this: $ hg st ../../../../ It's correct, but it's much less readable than the old output. Git does the same thing (it also shows ../../../../), btw. Maybe we shouldn't terse-ify the files in the current working directory? I understand how treating the working directory differently is not very appealing. Note that with both hg and git, if you add a file in the root directory of an empty repo, then the filename will still be printed (it doesn't just say .). Consider an empty repo with these paths: dir/subdir/subdir/a dir/subdir/b c If you're in the root directory, I think we all expect to get this: ? dir/ ? c How about when you're in dir/subdir? We currently get this: ? ../ ? ../../c Perhaps it's better to display this? ? subdir/ ? b ? ../../c That seems consistent with not abbreviating the root directory's entries to just '.'. It still gets weird when you're in dir/subdir/subdir/. Should we show this? ? a ? ../b ? ../../../c Thoughts? |
tests/test-status.t | ||
---|---|---|
112 | Yeah, that sounds reasonable. I think in general the tersed behavior is better, but this is an annoying edge case. Could you at least send a patch that introduces a "we'd rather we saw this output?" kind of test? |
tests/test-status.t | ||
---|---|---|
112 | The proposed change sounds good to me. I haven't looked yet how this can be plugged into current implementation but I feel this won't be hard. |
We had a more extreme case of "entire working directory is untracked" in our internal tests. It was something like this
After this patch (we have tweakdefaults turned on internally), the output is instead this:
It's correct, but it's much less readable than the old output. Git does the same thing (it also shows ../../../../), btw.
Maybe we shouldn't terse-ify the files in the current working directory? I understand how treating the working directory differently is not very appealing. Note that with both hg and git, if you add a file in the root directory of an empty repo, then the filename will still be printed (it doesn't just say .).
Consider an empty repo with these paths:
If you're in the root directory, I think we all expect to get this:
How about when you're in dir/subdir? We currently get this:
Perhaps it's better to display this?
That seems consistent with not abbreviating the root directory's entries to just '.'.
It still gets weird when you're in dir/subdir/subdir/. Should we show this?
Thoughts?