Mercurial > hg-stable
changeset 22379:38a393d59e77
test-acl: alter sed construct to avoid changes in .hg/hgrc formatting
A future patch is going to add some extra commented-out boilerplate to
the top of .hg/hgrc during clone. In order to make this test not
require regular updates, switch to searching for [hooks] or [acl] and
print file from the first match to that pattern.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Tue, 09 Sep 2014 16:51:21 -0400 |
parents | c828b61e0635 |
children | 82b2ba904e3e |
files | tests/test-acl.t |
diffstat | 1 files changed, 27 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-acl.t Tue Sep 09 13:47:50 2014 -0400 +++ b/tests/test-acl.t Tue Sep 09 16:51:21 2014 -0400 @@ -4,7 +4,7 @@ > shift > echo "Pushing as user $user" > echo 'hgrc = """' - > sed -e 1,2d b/.hg/hgrc | grep -v fakegroups.py + > sed -n '/\[[ha]/,$p' b/.hg/hgrc | grep -v fakegroups.py > echo '"""' > if test -f acl.config; then > echo 'acl.config = """' @@ -1122,6 +1122,8 @@ $ do_push fred Pushing as user fred hgrc = """ + [hooks] + pretxnchangegroup.acl = python:hgext.acl.hook [acl] sources = push [extensions] @@ -1197,6 +1199,8 @@ $ do_push fred Pushing as user fred hgrc = """ + [hooks] + pretxnchangegroup.acl = python:hgext.acl.hook [acl] sources = push [extensions] @@ -1278,6 +1282,8 @@ $ do_push fred Pushing as user fred hgrc = """ + [hooks] + pretxnchangegroup.acl = python:hgext.acl.hook [acl] sources = push [extensions] @@ -1354,6 +1360,8 @@ $ do_push fred Pushing as user fred hgrc = """ + [hooks] + pretxnchangegroup.acl = python:hgext.acl.hook [acl] sources = push [extensions] @@ -1476,6 +1484,8 @@ $ do_push astro Pushing as user astro hgrc = """ + [hooks] + pretxnchangegroup.acl = python:hgext.acl.hook [acl] sources = push [extensions] @@ -1558,6 +1568,8 @@ $ do_push astro Pushing as user astro hgrc = """ + [hooks] + pretxnchangegroup.acl = python:hgext.acl.hook [acl] sources = push [extensions] @@ -1641,6 +1653,8 @@ $ do_push astro Pushing as user astro hgrc = """ + [hooks] + pretxnchangegroup.acl = python:hgext.acl.hook [acl] sources = push [extensions] @@ -1718,6 +1732,8 @@ $ do_push astro Pushing as user astro hgrc = """ + [hooks] + pretxnchangegroup.acl = python:hgext.acl.hook [acl] sources = push [extensions] @@ -1790,6 +1806,8 @@ $ do_push george Pushing as user george hgrc = """ + [hooks] + pretxnchangegroup.acl = python:hgext.acl.hook [acl] sources = push [extensions] @@ -1878,6 +1896,8 @@ $ do_push george Pushing as user george hgrc = """ + [hooks] + pretxnchangegroup.acl = python:hgext.acl.hook [acl] sources = push [extensions] @@ -1965,6 +1985,8 @@ $ do_push george Pushing as user george hgrc = """ + [hooks] + pretxnchangegroup.acl = python:hgext.acl.hook [acl] sources = push [extensions] @@ -2044,6 +2066,8 @@ $ do_push astro Pushing as user astro hgrc = """ + [hooks] + pretxnchangegroup.acl = python:hgext.acl.hook [acl] sources = push [extensions] @@ -2126,6 +2150,8 @@ $ do_push george Pushing as user george hgrc = """ + [hooks] + pretxnchangegroup.acl = python:hgext.acl.hook [acl] sources = push [extensions]