Marking subrepos in 'hg status'

Martin Geisler mg at aragost.com
Mon Sep 27 11:26:16 CDT 2010


Consider a situaion like this:

  $ hg status -S
  M dir/x.txt
  M sub/a.txt
  A dir/y.txt
  A sub/b.txt

where sub/ is a subrepository and dir/ is just a folder.

In some older discussions, people asked for an indicator of when a file
is inside a subrepository and when it is inside a directory -- I felt
the most natural choice was to write sub/ for the subrepositories.

But in the case above, it is hard to see what to write for the line with
'A sub/b.txt' -- should it look like this:

  $ hg status -S
  M dir/x.txt
  M sub/
  M sub/a.txt
  A dir/y.txt
  A sub/
  A sub/b.txt

That is strange since the subrepo has not been added. An alternative
would be to move the recusion up, so that all status lines are kept
together for each subrepo:

  $ hg status -S
  M dir/x.txt
  A dir/y.txt
  M sub/
  M sub/a.txt
  A sub/b.txt

which I think works better, though it results in scrambled order of
added and modified files. What do you guys think?

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://aragost.com/mercurial/


More information about the Mercurial-devel mailing list