view tests/test-journal-exists.t @ 19619:4694ccd5d994

progress: stop getting stuck in a nested topic during a long inner step Convert, for example, has loops like this: for revision in source_repo: progress(revisions) for file in revision: progresss(file) Prior to this change, we would start showing the file-level progress when we encountered a big revision, and then we'd get stuck in showing file-progress instead of revision progress, often producing many many instantly-completing progress bars rather than the actually-helpful top-level revisions bar.
author Augie Fackler <raf@durin42.com>
date Fri, 23 Aug 2013 13:28:18 -0400
parents acba1281e064
children e54a078153f7
line wrap: on
line source

  $ hg init
  $ echo a > a
  $ hg ci -Am0
  adding a

  $ hg -q clone . foo

  $ touch .hg/store/journal

  $ echo foo > a
  $ hg ci -Am0
  abort: abandoned transaction found - run hg recover!
  [255]

  $ hg recover
  rolling back interrupted transaction
  checking changesets
  checking manifests
  crosschecking files in changesets and manifests
  checking files
  1 files, 1 changesets, 1 total revisions

Check that zero-size journals are correctly aborted:

#if unix-permissions
  $ hg bundle -qa repo.hg
  $ chmod -w foo/.hg/store/00changelog.i

  $ hg -R foo unbundle repo.hg
  adding changesets
  abort: Permission denied: $TESTTMP/foo/.hg/store/.00changelog.i-* (glob)
  [255]

  $ if test -f foo/.hg/store/journal; then echo 'journal exists :-('; fi
#endif