##// END OF EJS Templates
plan9: mkfile and 9diff fixes...
Steven Stallion -
r16556:f9262456 stable
parent child Browse files
Show More
@@ -1,42 +1,42 b''
1 1 #!/bin/rc
2 2 # 9diff - Mercurial extdiff wrapper for diff(1)
3 3
4 4 rfork e
5 5
6 6 fn getfiles{
7 cd $1 && \
7 cd $1 &&
8 8 for(f in `{du -as | awk '{print $2}'})
9 9 test -f $f && echo `{cleanname $f}
10 10 }
11 11
12 12 fn usage{
13 13 echo >[1=2] usage: 9diff [diff options] parent child root
14 14 exit usage
15 15 }
16 16
17 17 opts=()
18 18 while(~ $1 -*){
19 19 opts=($opts $1)
20 20 shift
21 21 }
22 22 if(! ~ $#* 3)
23 23 usage
24 24
25 25 # extdiff will set the parent and child to a single file if there is
26 26 # only one change. If there are multiple changes, directories will be
27 27 # set. diff(1) does not cope particularly with directories; instead we
28 28 # do the recursion ourselves and diff each file individually.
29 29 if(test -f $1)
30 30 diff $opts $1 $2
31 31 if not{
32 32 # extdiff will create a snapshot of the working copy to prevent
33 33 # conflicts during the diff. We circumvent this behavior by
34 34 # diffing against the repository root to produce plumbable
35 35 # output. This is antisocial.
36 36 for(f in `{sort -u <{getfiles $1} <{getfiles $2}}){
37 37 file1=$1/$f; test -f $file1 || file1=/dev/null
38 38 file2=$3/$f; test -f $file2 || file2=/dev/null
39 39 diff $opts $file1 $file2
40 40 }
41 41 }
42 42 exit ''
@@ -1,37 +1,37 b''
1 1 APE=/sys/src/ape
2 2 <$APE/config
3 3
4 4 PYTHON=python
5 5 PYTHONBIN=/rc/bin
6 6 SH=ape/psh
7 7
8 8 PURE=--pure
9 9 ROOT=../..
10 10
11 11 # This is slightly underhanded; Plan 9 does not support GNU gettext nor
12 12 # does it support dynamically loaded extension modules. We work around
13 13 # this by calling build_py and build_scripts directly; this avoids
14 14 # additional platform hacks in setup.py.
15 15 build:VQ:
16 16 @{
17 17 cd $ROOT
18 18 $SH -c '$PYTHON setup.py $PURE build_py build_scripts'
19 19 }
20 20
21 21 clean:VQ:
22 22 @{
23 23 cd $ROOT
24 24 $SH -c '$PYTHON setup.py $PURE clean --all'
25 25 }
26 26
27 27 install:VQ: build
28 28 @{
29 29 cd $ROOT
30 30 $SH -c '$PYTHON setup.py $PURE install \
31 31 --install-scripts $PYTHONBIN \
32 --skip-build' \
33 --force
32 --skip-build \
33 --force'
34 34 }
35 35 mkdir -p /lib/mercurial/hgrc.d
36 dircp hgrc.d /lib/mercurial/hgrc.d
37 cp 9diff /rc/bin
36 dircp hgrc.d /lib/mercurial/hgrc.d/
37 cp 9diff /rc/bin/
General Comments 0
You need to be logged in to leave comments. Login now