changeset 387:cf3b1ba01e69

hg egrep: ensure we're in the repo root before running grep
author Augie Fackler <raf@durin42.com>
date Mon, 01 Feb 2016 17:28:25 -0500
parents 40c0bc5ff266
children c35759aceed4
files .hgrc
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/.hgrc
+++ b/.hgrc
@@ -20,7 +20,7 @@ hg_remotebranches=
 ll=log --graph --style compact --limit 6 -r 'sort((::. or bookmark() or heads(upstream())), "-rev")'
 upstream-bookmarks = log -r 'bookmark() and (upstream() or obsolete())' --template '{bookmarks}\n'
 utip = log -r 'limit(heads(upstream()), 1)'
-egrep = !$HG locate -0 '$2' $3 $4 $5 $6 $7 $8 $9 | xargs -0 egrep -H '$1'
+egrep = !$HG locate -0 '$2' $3 $4 $5 $6 $7 $8 $9 | (cd $(hg root) ; xargs -0 egrep -H '$1')
 crecord = !$HG commit --interactive --config experimental.crecord=yes $@
 
 wc-out = log -r 'ancestors(.) and not upstream()'