Mercurial > hg > mercurial-source
comparison tests/test-abort-checkin.t @ 23172:e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Here document should be readable than repeating echo commands.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 04 Nov 2014 23:41:46 +0900 |
parents | f2719b387380 |
children | 56b2bcea2529 |
comparison
equal
deleted
inserted
replaced
23171:8afae1d5d108 | 23172:e955549cd045 |
---|---|
5 > def reposetup(ui, repo): | 5 > def reposetup(ui, repo): |
6 > repo.ui.setconfig("hooks", "pretxncommit.nocommits", hook) | 6 > repo.ui.setconfig("hooks", "pretxncommit.nocommits", hook) |
7 > EOF | 7 > EOF |
8 $ abspath=`pwd`/abortcommit.py | 8 $ abspath=`pwd`/abortcommit.py |
9 | 9 |
10 $ echo "[extensions]" >> $HGRCPATH | 10 $ cat <<EOF >> $HGRCPATH |
11 $ echo "mq=" >> $HGRCPATH | 11 > [extensions] |
12 $ echo "abortcommit = $abspath" >> $HGRCPATH | 12 > mq = |
13 > abortcommit = $abspath | |
14 > EOF | |
13 | 15 |
14 $ hg init foo | 16 $ hg init foo |
15 $ cd foo | 17 $ cd foo |
16 $ echo foo > foo | 18 $ echo foo > foo |
17 $ hg add foo | 19 $ hg add foo |