Mercurial > public > mercurial-scm > hg-stable
diff mercurial/help/subrepos.txt @ 21041:a2cc3c08c3ac
cat: support cat with explicit paths in subrepos
The cat command with an explicit path into a subrepo is now handled by invoking
cat on the file, from that subrepo. The previous behavior was to complain that
the file didn't exist in the revision (of the top most repo). Now when the file
is actually missing, the revision of the subrepo is named instead (though it is
probably desirable to continue naming the top level repo).
The documented output formatters %d and %p reflect the path from the top level
repo, since the purpose of this is to give the illusion of a unified repository.
Support for the undocumented (for cat) formatters %H, %R, %h, %m and %r was
added long ago (I tested back as far as 0.5), but unfortunately these will
reflect the subrepo node instead of the parent context.
The previous implementation was a bit loose with the return value, i.e. it would
return 0 if _any_ file requested was cat'd successfully. This maintains that
behavior.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 14 Mar 2014 21:32:05 -0400 |
parents | f1a3ae7c15df |
children | 4165cfd67519 |
line wrap: on
line diff
--- a/mercurial/help/subrepos.txt Thu Mar 13 23:45:18 2014 -0400 +++ b/mercurial/help/subrepos.txt Fri Mar 14 21:32:05 2014 -0400 @@ -84,6 +84,9 @@ :archive: archive does not recurse in subrepositories unless -S/--subrepos is specified. +:cat: cat currently only handles exact file matches in subrepos. + Git and Subversion subrepositories are currently ignored. + :commit: commit creates a consistent snapshot of the state of the entire project and its subrepositories. If any subrepositories have been modified, Mercurial will abort. Mercurial can be made