mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
cleanup: use backtick instead of parent to capture output of shell cmd
Summary: This diff is part of a series to cleanup fb-hgext and make it pass check-code. Test Plan: all tests pass Reviewers: #sourcecontrol, ttung, mitrandir, akushner Reviewed By: akushner Subscribers: mpm, akushner, mitrandir Differential Revision: https://phabricator.fb.com/D2811997 Signature: t1:2811997:1452200059:9e4fca501a22f95d2d9a22d234758f55e292ea9a
This commit is contained in:
parent
f35e1510b0
commit
0ca941a08a
@ -1,4 +1,4 @@
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/automv.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cat >> $HGRCPATH << EOF
|
||||
> [extensions]
|
||||
|
@ -1,4 +1,4 @@
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/commitextras.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cat >> $HGRCPATH << EOF
|
||||
> [extensions]
|
||||
|
@ -1,5 +1,5 @@
|
||||
$ . "$TESTDIR/copytrace.sh"
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cat >> $HGRCPATH << EOF
|
||||
> [ui]
|
||||
> ssh = python "$RUNTESTDIR/dummyssh"
|
||||
|
@ -1,5 +1,5 @@
|
||||
$ . "$TESTDIR/copytrace.sh"
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cat >> $HGRCPATH << EOF
|
||||
> [extensions]
|
||||
> copytrace=$extpath/copytrace
|
||||
|
@ -1,4 +1,4 @@
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/dirsync.py $TESTTMP
|
||||
$ cat >> $HGRCPATH << EOF
|
||||
> [extensions]
|
||||
|
@ -1,4 +1,4 @@
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/errorredirect.py $TESTTMP
|
||||
$ cat > $TESTTMP/crash.py << EOF
|
||||
> from mercurial import cmdutil
|
||||
|
@ -1,6 +1,6 @@
|
||||
Test functionality is present
|
||||
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/fbamend.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cp $extpath/fbhistedit.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cat >> $HGRCPATH << EOF
|
||||
|
@ -1,12 +1,13 @@
|
||||
$ . "$TESTDIR/histedit-helpers.sh"
|
||||
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/fbhistedit.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cat >> $HGRCPATH <<EOF
|
||||
> [extensions]
|
||||
> histedit=
|
||||
> fbhistedit=$TESTTMP/fbhistedit.py
|
||||
> EOF
|
||||
|
||||
$ echo "fbhistedit=$(echo $(dirname $TESTDIR))/fbhistedit.py" >> $HGRCPATH
|
||||
|
||||
Enable obsolete
|
||||
|
||||
$ cat > ${TESTTMP}/obs.py << EOF
|
||||
|
@ -1,12 +1,13 @@
|
||||
$ . "$TESTDIR/histedit-helpers.sh"
|
||||
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/fbhistedit.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cat >> $HGRCPATH <<EOF
|
||||
> [extensions]
|
||||
> histedit=
|
||||
> fbhistedit=$TESTTMP/fbhistedit.py
|
||||
> EOF
|
||||
|
||||
$ echo "fbhistedit=$(echo $(dirname $TESTDIR))/fbhistedit.py" >> $HGRCPATH
|
||||
|
||||
$ initrepo ()
|
||||
> {
|
||||
> hg init r
|
||||
|
@ -1,15 +1,16 @@
|
||||
$ . "$TESTDIR/histedit-helpers.sh"
|
||||
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/fbhistedit.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cat >> $HGRCPATH <<EOF
|
||||
> [experimental]
|
||||
> histeditng=True
|
||||
> [extensions]
|
||||
> rebase=
|
||||
> histedit=
|
||||
> fbhistedit=$TESTTMP/fbhistedit.py
|
||||
> EOF
|
||||
|
||||
$ echo "fbhistedit=$(echo $(dirname $TESTDIR))/fbhistedit.py" >> $HGRCPATH
|
||||
|
||||
$ initrepo ()
|
||||
> {
|
||||
> hg init r
|
||||
|
@ -1,12 +1,13 @@
|
||||
$ . "$TESTDIR/histedit-helpers.sh"
|
||||
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/fbhistedit.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cat >> $HGRCPATH <<EOF
|
||||
> [extensions]
|
||||
> histedit=
|
||||
> fbhistedit=$TESTTMP/fbhistedit.py
|
||||
> EOF
|
||||
|
||||
$ echo "fbhistedit=$(echo $(dirname $TESTDIR))/fbhistedit.py" >> $HGRCPATH
|
||||
|
||||
Enable obsolete
|
||||
|
||||
$ cat > ${TESTTMP}/obs.py << EOF
|
||||
|
@ -1,12 +1,13 @@
|
||||
$ . "$TESTDIR/histedit-helpers.sh"
|
||||
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/fbhistedit.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cat >> $HGRCPATH <<EOF
|
||||
> [extensions]
|
||||
> histedit=
|
||||
> fbhistedit=$TESTTMP/fbhistedit.py
|
||||
> EOF
|
||||
|
||||
$ echo "fbhistedit=$(echo $(dirname $TESTDIR))/fbhistedit.py" >> $HGRCPATH
|
||||
|
||||
$ initrepo ()
|
||||
> {
|
||||
> hg init r
|
||||
|
@ -1,5 +1,5 @@
|
||||
$ . "$TESTDIR/copytrace.sh"
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cat >> $HGRCPATH << EOF
|
||||
> [extensions]
|
||||
> fbamend=$extpath/fbamend.py
|
||||
|
@ -1,4 +1,4 @@
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/githelp.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cat >> $HGRCPATH << EOF
|
||||
> [extensions]
|
||||
|
@ -1,6 +1,6 @@
|
||||
Setup
|
||||
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/manifestdiskcache.py $TESTTMP # use $TESTTMP substitution in message
|
||||
|
||||
Test functionality is present
|
||||
|
@ -1,4 +1,4 @@
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/mergedriver.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cat >> $HGRCPATH << EOF
|
||||
> [extensions]
|
||||
|
@ -1,10 +1,15 @@
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/morestatus.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cp $extpath/fbhistedit.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cp $extpath/reset.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cat >> $HGRCPATH << EOF
|
||||
> [morestatus]
|
||||
> show=True
|
||||
> [extensions]
|
||||
> morestatus=$TESTTMP/morestatus.py
|
||||
> histedit=
|
||||
> reset=$TESTTMP/reset.py
|
||||
> fbhistedit=$TESTTMP/fbhistedit.py
|
||||
> EOF
|
||||
$ cat >> $TESTTMP/breakupdate.py << EOF
|
||||
> import sys
|
||||
@ -20,8 +25,6 @@ Test An empty repo should return no extra output
|
||||
$ hg status
|
||||
|
||||
Test status on histedit stop
|
||||
$ echo "histedit=" >> $HGRCPATH
|
||||
$ echo "fbhistedit=$(echo $(dirname $TESTDIR))/fbhistedit.py" >> $HGRCPATH
|
||||
$ echo 'a' > a
|
||||
$ hg commit -Am 'a' -q
|
||||
$ hg histedit -q --commands - . 2> /dev/null << EOF
|
||||
@ -88,7 +91,6 @@ Test hg status is normal after graft abort
|
||||
$ rm a.orig
|
||||
|
||||
Test unshelve state
|
||||
$ echo "reset=" >> $HGRCPATH
|
||||
$ echo "shelve=" >> $HGRCPATH
|
||||
$ hg reset ".^" -q
|
||||
resetting without an active bookmark
|
||||
|
@ -1,4 +1,4 @@
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/perftweaks.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cat >> $HGRCPATH << EOF
|
||||
> [extensions]
|
||||
|
@ -1,5 +1,5 @@
|
||||
$ $PYTHON -c 'import remotenames' || exit 80
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cat > $TESTTMP/pretxnchangegroup.sh << EOF
|
||||
> #!/bin/bash
|
||||
> env | grep -E "^HG_USERVAR"
|
||||
|
@ -1,4 +1,4 @@
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cat > $TESTTMP/pretxnchangegroup.sh << EOF
|
||||
> #!/bin/bash
|
||||
> env | grep -E "^HG_USERVAR_DEBUG"
|
||||
|
@ -1,5 +1,5 @@
|
||||
$ $PYTHON -c 'import remotenames' || exit 80
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/reflog.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cat >> $HGRCPATH << EOF
|
||||
> [extensions]
|
||||
|
@ -1,4 +1,4 @@
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/reflog.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cat >> $HGRCPATH << EOF
|
||||
> [extensions]
|
||||
|
@ -1,5 +1,5 @@
|
||||
$ $PYTHON -c 'import remotenames' || exit 80
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/reset.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cat >> $HGRCPATH << EOF
|
||||
> [extensions]
|
||||
|
@ -1,4 +1,4 @@
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/reset.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cat >> $HGRCPATH << EOF
|
||||
> [extensions]
|
||||
|
@ -1,6 +1,6 @@
|
||||
Setup the extension
|
||||
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/simplecache.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cat >> $HGRCPATH << EOF
|
||||
> [extensions]
|
||||
|
@ -1,5 +1,5 @@
|
||||
$ $PYTHON -c 'import remotenames' || exit 80
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/smartlog.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cat >> $HGRCPATH << EOF
|
||||
> [extensions]
|
||||
|
@ -1,4 +1,4 @@
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/tweakdefaults.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cat >> $HGRCPATH << EOF
|
||||
> [extensions]
|
||||
|
@ -2,7 +2,7 @@ Skip test if remotenames not present
|
||||
$ $PYTHON -c 'import remotenames' || exit 80
|
||||
|
||||
Set up extensions (order is important here, we must test tweakdefaults loading last)
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/tweakdefaults.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cat >> $HGRCPATH << EOF
|
||||
> [extensions]
|
||||
|
@ -2,7 +2,7 @@ Check for remotenames and skip if not present
|
||||
$ $PYTHON -c 'import remotenames' || exit 80
|
||||
|
||||
Set up
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/tweakdefaults.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cat >> $HGRCPATH << EOF
|
||||
> [extensions]
|
||||
|
@ -1,4 +1,4 @@
|
||||
$ extpath=$(dirname $TESTDIR)
|
||||
$ extpath=`dirname $TESTDIR`
|
||||
$ cp $extpath/tweakdefaults.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cp $extpath/fbamend.py $TESTTMP # use $TESTTMP substitution in message
|
||||
$ cat >> $HGRCPATH << EOF
|
||||
|
Loading…
Reference in New Issue
Block a user