Show More
@@ -2254,7 +2254,7 b' def revert(ui, repo, *pats, **opts):' | |||||
2254 | directory, the reverted files will thus appear modified |
|
2254 | directory, the reverted files will thus appear modified | |
2255 | afterwards. |
|
2255 | afterwards. | |
2256 |
|
2256 | |||
2257 |
If a file has been deleted, it is re |
|
2257 | If a file has been deleted, it is restored. If the executable | |
2258 | mode of a file was changed, it is reset. |
|
2258 | mode of a file was changed, it is reset. | |
2259 |
|
2259 | |||
2260 | If names are given, all files matching the names are reverted. |
|
2260 | If names are given, all files matching the names are reverted. |
@@ -968,6 +968,12 b" if os.name == 'nt':" | |||||
968 | return p_name_ext |
|
968 | return p_name_ext | |
969 | return default |
|
969 | return default | |
970 |
|
970 | |||
|
971 | def set_signal_handler(): | |||
|
972 | try: | |||
|
973 | set_signal_handler_win32() | |||
|
974 | except NameError: | |||
|
975 | pass | |||
|
976 | ||||
971 | try: |
|
977 | try: | |
972 | # override functions with win32 versions if possible |
|
978 | # override functions with win32 versions if possible | |
973 | from util_win32 import * |
|
979 | from util_win32 import * |
@@ -300,7 +300,7 b' class posixfile_nt(object):' | |||||
300 |
|
300 | |||
301 | getuser_fallback = win32api.GetUserName |
|
301 | getuser_fallback = win32api.GetUserName | |
302 |
|
302 | |||
303 | def set_signal_handler(): |
|
303 | def set_signal_handler_win32(): | |
304 | """Register a termination handler for console events including |
|
304 | """Register a termination handler for console events including | |
305 | CTRL+C. python signal handlers do not work well with socket |
|
305 | CTRL+C. python signal handlers do not work well with socket | |
306 | operations. |
|
306 | operations. |
@@ -39,16 +39,22 b' bunzip2 -dc test.tar.bz2 | tar tf -' | |||||
39 | hg archive -t tgz -p %b-%h test-%h.tar.gz |
|
39 | hg archive -t tgz -p %b-%h test-%h.tar.gz | |
40 | gzip -dc test-$QTIP.tar.gz | tar tf - | sed "s/$QTIP/TIP/" |
|
40 | gzip -dc test-$QTIP.tar.gz | tar tf - | sed "s/$QTIP/TIP/" | |
41 |
|
41 | |||
42 |
cat > md5c |
|
42 | cat > md5comp.py <<EOF | |
43 | import md5, sys |
|
43 | import md5, sys | |
44 | print md5.md5(file(sys.argv[1], 'rb').read()).hexdigest() |
|
44 | f1, f2 = sys.argv[1:3] | |
|
45 | h1 = md5.md5(file(f1, 'rb').read()).hexdigest() | |||
|
46 | h2 = md5.md5(file(f2, 'rb').read()).hexdigest() | |||
|
47 | print h1 == h2 or "md5 differ: " + repr((h1, h2)) | |||
45 | EOF |
|
48 | EOF | |
46 |
|
49 | |||
|
50 | # archive name is stored in the archive, so create similar | |||
|
51 | # archives and rename them afterwards. | |||
47 | hg archive -t tgz tip.tar.gz |
|
52 | hg archive -t tgz tip.tar.gz | |
48 | python md5check.py tip.tar.gz |
|
53 | mv tip.tar.gz tip1.tar.gz | |
49 | sleep 1 |
|
54 | sleep 1 | |
50 | hg archive -t tgz tip.tar.gz |
|
55 | hg archive -t tgz tip.tar.gz | |
51 | python md5check.py tip.tar.gz |
|
56 | mv tip.tar.gz tip2.tar.gz | |
|
57 | python md5comp.py tip1.tar.gz tip2.tar.gz | |||
52 |
|
58 | |||
53 | hg archive -t zip -p /illegal test.zip |
|
59 | hg archive -t zip -p /illegal test.zip | |
54 | hg archive -t zip -p very/../bad test.zip |
|
60 | hg archive -t zip -p very/../bad test.zip |
@@ -26,8 +26,7 b' test-TIP/.hg_archival.txt' | |||||
26 | test-TIP/bar |
|
26 | test-TIP/bar | |
27 | test-TIP/baz/bletch |
|
27 | test-TIP/baz/bletch | |
28 | test-TIP/foo |
|
28 | test-TIP/foo | |
29 | 76ce33f5d5cf8151558e2d9a396c7504 |
|
29 | True | |
30 | 76ce33f5d5cf8151558e2d9a396c7504 |
|
|||
31 | abort: archive prefix contains illegal components |
|
30 | abort: archive prefix contains illegal components | |
32 | Archive: test.zip |
|
31 | Archive: test.zip | |
33 | testing: test/.hg_archival.txt OK |
|
32 | testing: test/.hg_archival.txt OK |
@@ -8,7 +8,7 b' import re' | |||||
8 | rsub = re.sub |
|
8 | rsub = re.sub | |
9 | def f(obj): |
|
9 | def f(obj): | |
10 | l = repr(obj) |
|
10 | l = repr(obj) | |
11 | l = rsub("0x[0-9a-f]+", "0x?", l) |
|
11 | l = rsub("0x[0-9a-fA-F]+", "0x?", l) | |
12 | l = rsub("from '.*'", "from '?'", l) |
|
12 | l = rsub("from '.*'", "from '?'", l) | |
13 | return l |
|
13 | return l | |
14 |
|
14 |
General Comments 0
You need to be logged in to leave comments.
Login now