Suppress the abort when no .hg is found

Issue #16 new
Chris
created an issue

If I navigate out of a mercurial repository, I get this error: {{{ abort: There is no Mercurial repository here (.hg not found)! }}}

This is a bit nasty, since most of my filesystem isn't a mercurial repository. I could get out of it by creating a dummy .hg with a universal ignore at the root, but that's... gross.

Comments (1)

  1. Joel Fant

    When you grab the result from running hg prompt, redirect std error to null, just like it shows in the documentation:

    nix:
    hg prompt "{ on {branch}}{ at {bookmark}}{status}" 2> /dev/null

    Powershell:
    hg prompt "{ on {branch}}{ at {bookmark}}{status}" 2> $null

  2. Log in to comment