##// END OF EJS Templates
tests: write and use a custom helper script to avoid find's -printf...
Augie Fackler -
r35250:aa905f9c stable
parent child Browse files
Show More
@@ -0,0 +1,27 b''
1 from __future__ import (
2 absolute_import,
3 print_function,
4 )
5
6 import argparse
7 import os
8
9 ap = argparse.ArgumentParser()
10 ap.add_argument('path', nargs='+')
11 opts = ap.parse_args()
12
13 def gather():
14 for p in opts.path:
15 if not os.path.exists(p):
16 return
17 if os.path.isdir(p):
18 yield p + os.path.sep
19 for dirpath, dirs, files in os.walk(p):
20 for d in dirs:
21 yield os.path.join(dirpath, d) + os.path.sep
22 for f in files:
23 yield os.path.join(dirpath, f)
24 else:
25 yield p
26
27 print('\n'.join(sorted(gather())))
@@ -1095,8 +1095,7 b' largefiles (issue4547)'
1095 Move (and then undo) a directory move with only largefiles.
1095 Move (and then undo) a directory move with only largefiles.
1096
1096
1097 $ listtree() {
1097 $ listtree() {
1098 > find $@ \( -type d -printf "%p/\n" -o -type f -printf "%p\n" \) \
1098 > $PYTHON $TESTDIR/list-tree.py $@
1099 > -a -name .hg -prune | sort
1100 > }
1099 > }
1101
1100
1102 $ cd subrepo-root
1101 $ cd subrepo-root
General Comments 0
You need to be logged in to leave comments. Login now