Hglist
hglist - an ls
command for Mercurial
hglist
is an extension that adds an hg list
/hg ls
command to Mercurial.
Why would one want such a thing, I hear you ask? Well, currently you can list
the files under Mercurial’s control with hg manifest
, but its output is very
limited, and worse, while the documentation mentions that you can get revision
hashes using --debug
, what it doesn’t mention is that those are filelog
revision hashes, not changelog revision hashes—that is, they are not
change IDs.
To give you a flavour for what this extension can do:
1 2 3 4 5 6 |
|
hg ls
supports a -l
switch that gives similar (but not identical) output
to ls -l
:
1 2 3 4 5 6 7 |
|
It also supports recursive output, though you can’t use -R
for that because
Mercurial already uses that switch to select a repository:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
Additionally, hg ls
can do its own globbing (that’s shell wildcard
expansion, for those who don’t speak UNIX):
1 2 3 4 5 |
|
and you can specify an arbitrary sort order, e.g.
1 2 3 4 5 6 7 8 9 10 11 12 |
|
There are loads more options, including support for template-based output
(--template
, like hg log
); see hg help ls
for the full details.
The source code can be obtained from the mercurial repository, or alternatively from the source archive (see the changelog, below).
To report a bug, drop me an e-mail.
Changelog
Version 0.3 - 2012-12-13
-
Fixed a problem that could occur if you used globbing patterns and the subrepository switch
-
Improved output for the multiple pattern case
Version 0.2 - 2012-12-13
- Fixed a silly bug that triggered if you specify globbing patterns
Version 0.1 - 2012-12-13
- Initial version