durin42 added inline comments.

INLINE COMMENTS

> martinvonz wrote in 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?

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?

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3628

To: durin42, #hg-reviewers, pulkit
Cc: spectral, martinvonz, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to