##// END OF EJS Templates
merge with crew.
Vadim Gelfer -
r2069:15ec724b merge default
parent child Browse files
Show More
@@ -0,0 +1,19 b''
1 #!/bin/sh
2
3 hg init a
4 cd a
5 hg init b
6 echo x > b/x
7 echo '# should print nothing'
8 hg st
9 echo '# should print ? b/x'
10 hg st b/x
11
12 hg add b/x
13
14 echo '# should print A b/x'
15 hg st
16 echo '# should forget b/x'
17 hg forget
18 echo '# should print nothing'
19 hg st b
@@ -0,0 +1,8 b''
1 # should print nothing
2 # should print ? b/x
3 ? b/x
4 # should print A b/x
5 A b/x
6 # should forget b/x
7 forgetting b/x
8 # should print nothing
@@ -342,7 +342,16 b' class dirstate(object):'
342 names.sort()
342 names.sort()
343 # nd is the top of the repository dir tree
343 # nd is the top of the repository dir tree
344 nd = util.normpath(top[len(self.root) + 1:])
344 nd = util.normpath(top[len(self.root) + 1:])
345 if nd == '.': nd = ''
345 if nd == '.':
346 nd = ''
347 else:
348 # do not recurse into a repo contained in this
349 # one. use bisect to find .hg directory so speed
350 # is good on big directory.
351 hg = bisect.bisect_left(names, '.hg')
352 if hg < len(names) and names[hg] == '.hg':
353 if os.path.isdir(os.path.join(top, '.hg')):
354 continue
346 for f in names:
355 for f in names:
347 np = util.pconvert(os.path.join(nd, f))
356 np = util.pconvert(os.path.join(nd, f))
348 if seen(np):
357 if seen(np):
@@ -373,8 +373,10 b' def unlink(f):'
373 """unlink and remove the directory if it is empty"""
373 """unlink and remove the directory if it is empty"""
374 os.unlink(f)
374 os.unlink(f)
375 # try removing directories that might now be empty
375 # try removing directories that might now be empty
376 try: os.removedirs(os.path.dirname(f))
376 try:
377 except: pass
377 os.removedirs(os.path.dirname(f))
378 except OSError:
379 pass
378
380
379 def copyfiles(src, dst, hardlink=None):
381 def copyfiles(src, dst, hardlink=None):
380 """Copy a directory tree using hardlinks if possible"""
382 """Copy a directory tree using hardlinks if possible"""
@@ -24,6 +24,16 b' HGEDITOR=true; export HGEDITOR'
24 HGMERGE=true; export HGMERGE
24 HGMERGE=true; export HGMERGE
25 HGUSER="test"; export HGUSER
25 HGUSER="test"; export HGUSER
26 HGRCPATH=""; export HGRCPATH
26 HGRCPATH=""; export HGRCPATH
27 OS=`uname`
28
29 case "$OS" in
30 HP-UX|SunOS)
31 DIFFOPTS=
32 ;;
33 *)
34 DIFFOPTS=-u
35 ;;
36 esac
27
37
28 if [ `echo -n HG` = "-n HG" ]
38 if [ `echo -n HG` = "-n HG" ]
29 then
39 then
@@ -118,13 +128,13 b' run_one() {'
118 cat "$ERR"
128 cat "$ERR"
119 fail=1
129 fail=1
120 elif [ -r "$OUTOK" ]; then
130 elif [ -r "$OUTOK" ]; then
121 if diff -u "$OUTOK" "$OUT" > /dev/null; then
131 if diff $DIFFOPTS "$OUTOK" "$OUT" > /dev/null; then
122 : no differences
132 : no differences
123 else
133 else
124 cp "$OUT" "$ERR"
134 cp "$OUT" "$ERR"
125 echo
135 echo
126 echo "$1 output changed:"
136 echo "$1 output changed:"
127 diff -u "$OUTOK" "$ERR" || true
137 diff $DIFFOPTS "$OUTOK" "$ERR" || true
128 fail=1
138 fail=1
129 fi
139 fi
130 fi
140 fi
General Comments 0
You need to be logged in to leave comments. Login now