`hg svn version` should work outside repositories

Create issue
Issue #131 resolved
Alexander Dahl created an issue

If I try {{{hg svn version}}} outside of a hg working copy tree, I get the following error:

{{{ Abbruch: Es gibt hier kein Mercurial-Archiv (.hg nicht vorhanden)! }}}

(my translation: //abort: there's no mercurial archive here (no directory .hg//)

If I do this inside a working copy I get:

{{{ hg: 1.3.1 svn bindings: 1.6.3 hgsubversion: 5ddc212dbc56 }}}

I see no reason why this should depend on being inside a hg tree if this is the only output.

Comments (3)

  1. Augie Fackler repo owner

    This is (at present) a limitation of hg's command infrastructure - the 'svn' subcommand is flagged as needing a repository (essentially true, since most of its operations do require a repository).

    Maybe it'd be better to wrap hg version and have this command be 'hg version --svn' instead?

  2. Alexander Dahl reporter

    I must admit I'm not familiar with hg internals. *blush*

    What about an upstream feature request for showing the version numbers of installed extensions with `hg version` alone?

  3. Dan Villiom Podlaski Christiansen

    This issue was resolved some time ago: 1) Instead of 'hg svn version' we now have 'hg --version --svn' which doesn't require a repository. 2) The 'svn' metacommand has been updated to optionally require a repository.

  4. Log in to comment