It looks like the repr() of Exceptions is different from Python 2 to
Python 3.7 (but not 3.5?), but the str() is still stable. Sigh.
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
It looks like the repr() of Exceptions is different from Python 2 to
Python 3.7 (but not 3.5?), but the str() is still stable. Sigh.
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | tests/test-remotefilelog-cacheprocess.t (10 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
Augie Fackler | Jan 30 2019, 4:43 PM |
> else: | > else: | ||||
> # report a cache miss | > # report a cache miss | ||||
> sys.stdout.write(key + '\n') | > sys.stdout.write(key + '\n') | ||||
> sys.stdout.write('0\n') | > sys.stdout.write('0\n') | ||||
> for key in sorted(wants): | > for key in sorted(wants): | ||||
> log('requested %r\n' % key) | > log('requested %r\n' % key) | ||||
> sys.stdout.flush() | > sys.stdout.flush() | ||||
> elif cmd == 'set': | > elif cmd == 'set': | ||||
> assert False, 'todo writing' | > raise Exception('todo writing') | ||||
> else: | > else: | ||||
> assert False, 'unknown command! %r' % cmd | > raise Exception('unknown command! %r' % cmd) | ||||
> except Exception as e: | > except Exception as e: | ||||
> log('Exception! %r\n' % e) | > log('Exception! %s\n' % e) | ||||
> raise | > raise | ||||
> EOF | > EOF | ||||
$ cat >> $HGRCPATH <<EOF | $ cat >> $HGRCPATH <<EOF | ||||
> [remotefilelog] | > [remotefilelog] | ||||
> cacheprocess = python $TESTTMP/cacheprocess-logger.py | > cacheprocess = python $TESTTMP/cacheprocess-logger.py | ||||
> EOF | > EOF | ||||
Test cache keys and cache misses. | Test cache keys and cache misses. | ||||
$ hgcloneshallow ssh://user@dummy/repo clone -q | $ hgcloneshallow ssh://user@dummy/repo clone -q | ||||
3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob) | 3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob) | ||||
$ cat cachelog.log | $ cat cachelog.log | ||||
got command 'get' | got command 'get' | ||||
client wants 3 blobs | client wants 3 blobs | ||||
requested 'master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1406e74118627694268417491f018a4a883152f0' | requested 'master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1406e74118627694268417491f018a4a883152f0' | ||||
requested 'master/39/5df8f7c51f007019cb30201c49e884b46b92fa/69a1b67522704ec122181c0890bd16e9d3e7516a' | requested 'master/39/5df8f7c51f007019cb30201c49e884b46b92fa/69a1b67522704ec122181c0890bd16e9d3e7516a' | ||||
requested 'master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a/076f5e2225b3ff0400b98c92aa6cdf403ee24cca' | requested 'master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a/076f5e2225b3ff0400b98c92aa6cdf403ee24cca' | ||||
got command 'set' | got command 'set' | ||||
Exception! AssertionError('todo writing',) | Exception! todo writing | ||||
Test cache hits. | Test cache hits. | ||||
$ mv hgcache oldhgcache | $ mv hgcache oldhgcache | ||||
$ rm cachelog.log | $ rm cachelog.log | ||||
$ hgcloneshallow ssh://user@dummy/repo clone-cachehit -q | $ hgcloneshallow ssh://user@dummy/repo clone-cachehit -q | ||||
3 files fetched over 1 fetches - (0 misses, 100.00% hit ratio) over *s (glob) | 3 files fetched over 1 fetches - (0 misses, 100.00% hit ratio) over *s (glob) | ||||
$ cat cachelog.log | grep -v exit | $ cat cachelog.log | grep -v exit | ||||
got command 'get' | got command 'get' | ||||
3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob) | 3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob) | ||||
$ cat cachelog.log | $ cat cachelog.log | ||||
got command 'get' | got command 'get' | ||||
client wants 3 blobs | client wants 3 blobs | ||||
requested 'x\x00master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1406e74118627694268417491f018a4a883152f0' | requested 'x\x00master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1406e74118627694268417491f018a4a883152f0' | ||||
requested 'y\x00master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a/076f5e2225b3ff0400b98c92aa6cdf403ee24cca' | requested 'y\x00master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a/076f5e2225b3ff0400b98c92aa6cdf403ee24cca' | ||||
requested 'z\x00master/39/5df8f7c51f007019cb30201c49e884b46b92fa/69a1b67522704ec122181c0890bd16e9d3e7516a' | requested 'z\x00master/39/5df8f7c51f007019cb30201c49e884b46b92fa/69a1b67522704ec122181c0890bd16e9d3e7516a' | ||||
got command 'set' | got command 'set' | ||||
Exception! AssertionError('todo writing',) | Exception! todo writing | ||||
Test cache hits with includepath. | Test cache hits with includepath. | ||||
$ mv hgcache oldhgcache | $ mv hgcache oldhgcache | ||||
$ rm cachelog.log | $ rm cachelog.log | ||||
$ hgcloneshallow ssh://user@dummy/repo clone-withpath-cachehit -q | $ hgcloneshallow ssh://user@dummy/repo clone-withpath-cachehit -q | ||||
3 files fetched over 1 fetches - (0 misses, 100.00% hit ratio) over *s (glob) | 3 files fetched over 1 fetches - (0 misses, 100.00% hit ratio) over *s (glob) | ||||
$ cat cachelog.log | grep -v exit | $ cat cachelog.log | grep -v exit | ||||
got command 'get' | got command 'get' | ||||
client wants 3 blobs | client wants 3 blobs | ||||
requested 'x\x00master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1406e74118627694268417491f018a4a883152f0' | requested 'x\x00master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1406e74118627694268417491f018a4a883152f0' | ||||
requested 'y\x00master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a/076f5e2225b3ff0400b98c92aa6cdf403ee24cca' | requested 'y\x00master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a/076f5e2225b3ff0400b98c92aa6cdf403ee24cca' | ||||
requested 'z\x00master/39/5df8f7c51f007019cb30201c49e884b46b92fa/69a1b67522704ec122181c0890bd16e9d3e7516a' | requested 'z\x00master/39/5df8f7c51f007019cb30201c49e884b46b92fa/69a1b67522704ec122181c0890bd16e9d3e7516a' |