comparison tests/test-tags.t @ 44376:56f089e40c5a

tests: replace truncate(1) with inline python MSYS doesn't have truncate(1) installed by default, and FreeBSD looked unhappy with the arguments provided. Differential Revision: https://phab.mercurial-scm.org/D8147
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 24 Feb 2020 17:43:34 -0500
parents f5a7cf0adb12
children 64de86fd0984
comparison
equal deleted inserted replaced
44375:35d2afc6966a 44376:56f089e40c5a
372 1970/01/01 00:00:00 bob @8dbfe60eff306a54259cfe007db9e330e7ecf866 (5000)> blackbox -l 6 372 1970/01/01 00:00:00 bob @8dbfe60eff306a54259cfe007db9e330e7ecf866 (5000)> blackbox -l 6
373 373
374 On junk data + missing cache entries, hg also overwrites the junk. 374 On junk data + missing cache entries, hg also overwrites the junk.
375 375
376 $ rm -f .hg/cache/tags2-visible 376 $ rm -f .hg/cache/tags2-visible
377 $ truncate .hg/cache/hgtagsfnodes1 -s -10 377 >>> import os
378 >>> with open(".hg/cache/hgtagsfnodes1", "ab+") as fp:
379 ... fp.seek(-10, os.SEEK_END) and None
380 ... fp.truncate() and None
381
378 $ hg debugtagscache | tail -2 382 $ hg debugtagscache | tail -2
379 4 0c192d7d5e6b78a714de54a2e9627952a877e25a 0c04f2a8af31de17fab7422878ee5a2dadbc943d 383 4 0c192d7d5e6b78a714de54a2e9627952a877e25a 0c04f2a8af31de17fab7422878ee5a2dadbc943d
380 5 8dbfe60eff306a54259cfe007db9e330e7ecf866 missing/invalid 384 5 8dbfe60eff306a54259cfe007db9e330e7ecf866 missing/invalid
381 $ hg tags 385 $ hg tags
382 tip 5:8dbfe60eff30 386 tip 5:8dbfe60eff30