[PATCH] status: add option to show status of files in subrepos

Martin Geisler mg at aragost.com
Thu Jul 8 08:11:08 CDT 2010


Matt Mackall <mpm at selenic.com> writes:

> When you submit a change like this, please show us what it looks like
> so we can talk about it. One of the common complaints about subrepos
> is that it's not obvious when a subrepo is modified so commit's
> recursive behavior bites people. So it's not clear that:
>
> M foo
> M sub/bar
>
> really gives people enough notice that it's a subrepo that's changed.
> But then:
>
> M foo
> M subrepo/
>
> is just weird, so maybe your way is right after all. Opinions?

I don't think it's that weird -- it has the advantage that you can
distinguish between a file changed in a subdirectory and a changed
subrepository.

Subversion simply reports X for all svn:externals and then reports their
status afterwards. It looks like this:

  % svn status
  X       ext

  Performing status on external item at 'ext'
  M       ext/a.txt

> Is there a reason not to have a -S flag?

Should this only be enabled with a flag? I think that when 'hg commit'
will recurse by default, then 'hg status' should do the same. Or would
you rather that people add

  [defaults]
  status = --subrepos
  diff = --subrepos
  ...

to their hgrc files? If we require this, then my feeling is that
subrepositories will never become a first-class feature. However,
Telling people to not use subrepositories until their frontends have
caught up is also not nice.


Since we can have different types of subrepositories, I wonder how to
best combine the status output of each. Subversions output looks a
little different from ours -- like us, they have room to indicate a
change in the file but they also have room to indicate a change in a
property.



-- 
Martin Geisler

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


More information about the Mercurial-devel mailing list