Show More
@@ -195,6 +195,7 b" The '-t' should override autodetection" | |||||
195 | > done |
|
195 | > done | |
196 |
|
196 | |||
197 | $ cat > md5comp.py <<EOF |
|
197 | $ cat > md5comp.py <<EOF | |
|
198 | > from __future__ import print_function | |||
198 | > try: |
|
199 | > try: | |
199 | > from hashlib import md5 |
|
200 | > from hashlib import md5 | |
200 | > except ImportError: |
|
201 | > except ImportError: | |
@@ -203,7 +204,7 b" The '-t' should override autodetection" | |||||
203 | > f1, f2 = sys.argv[1:3] |
|
204 | > f1, f2 = sys.argv[1:3] | |
204 | > h1 = md5(file(f1, 'rb').read()).hexdigest() |
|
205 | > h1 = md5(file(f1, 'rb').read()).hexdigest() | |
205 | > h2 = md5(file(f2, 'rb').read()).hexdigest() |
|
206 | > h2 = md5(file(f2, 'rb').read()).hexdigest() | |
206 |
> print |
|
207 | > print(h1 == h2 or "md5 differ: " + repr((h1, h2))) | |
207 | > EOF |
|
208 | > EOF | |
208 |
|
209 | |||
209 | archive name is stored in the archive, so create similar archives and |
|
210 | archive name is stored in the archive, so create similar archives and | |
@@ -343,8 +344,9 b' configured as GMT.' | |||||
343 | $ hg -R repo add repo/a |
|
344 | $ hg -R repo add repo/a | |
344 | $ hg -R repo commit -m '#0' -d '456789012 21600' |
|
345 | $ hg -R repo commit -m '#0' -d '456789012 21600' | |
345 | $ cat > show_mtime.py <<EOF |
|
346 | $ cat > show_mtime.py <<EOF | |
|
347 | > from __future__ import print_function | |||
346 | > import sys, os |
|
348 | > import sys, os | |
347 |
> print |
|
349 | > print(int(os.stat(sys.argv[1]).st_mtime)) | |
348 | > EOF |
|
350 | > EOF | |
349 |
|
351 | |||
350 | $ hg -R repo archive --prefix tar-extracted archive.tar |
|
352 | $ hg -R repo archive --prefix tar-extracted archive.tar |
General Comments 0
You need to be logged in to leave comments.
Login now