##// END OF EJS Templates
persistent-nodemap: catch the right exception on python...
marmoute -
r47039:d32e7ed8 default
parent child Browse files
Show More
@@ -56,7 +56,7 b' def persisted_data(revlog):'
56 data = util.buffer(util.mmapread(fd, data_length))
56 data = util.buffer(util.mmapread(fd, data_length))
57 else:
57 else:
58 data = fd.read(data_length)
58 data = fd.read(data_length)
59 except OSError as e:
59 except (IOError, OSError) as e:
60 if e.errno == errno.ENOENT:
60 if e.errno == errno.ENOENT:
61 return None
61 return None
62 else:
62 else:
@@ -374,6 +374,38 b' the nodemap should detect the changelog '
374 $ hg log -r "$OTHERNODE" -T '{rev}\n'
374 $ hg log -r "$OTHERNODE" -T '{rev}\n'
375 5002
375 5002
376
376
377 missing data file
378 -----------------
379
380 $ UUID=`hg debugnodemap --metadata| grep 'uid:' | \
381 > sed 's/uid: //'`
382 $ FILE=.hg/store/00changelog-"${UUID}".nd
383 $ mv $FILE ../tmp-data-file
384 $ cp .hg/store/00changelog.n ../tmp-docket
385
386 mercurial don't crash
387
388 $ hg log -r .
389 changeset: 5002:b355ef8adce0
390 tag: tip
391 parent: 4998:d918ad6d18d3
392 user: test
393 date: Thu Jan 01 00:00:00 1970 +0000
394 summary: babar
395
396 $ hg debugnodemap --metadata
397
398 $ hg debugupdatecache
399 $ hg debugnodemap --metadata
400 uid: * (glob)
401 tip-rev: 5002
402 tip-node: b355ef8adce0949b8bdf6afc72ca853740d65944
403 data-length: 121088
404 data-unused: 0
405 data-unused: 0.000%
406 $ mv ../tmp-data-file $FILE
407 $ mv ../tmp-docket .hg/store/00changelog.n
408
377 Check transaction related property
409 Check transaction related property
378 ==================================
410 ==================================
379
411
General Comments 0
You need to be logged in to leave comments. Login now