tests/test-lock-badness.t
author Pierre-Yves David <pierre-yves.david@logilab.fr>
Thu, 20 Sep 2012 19:02:47 +0200
changeset 17677 5c89e7fa5bc2
parent 15443 a1914d214579
child 20008 e54a078153f7
permissions -rw-r--r--
clfilter: introduce `filteredrevs` attribute on changelog This changeset allows changelog object to be "filtered". You can assign a set of revision numbers to the `changelog.filteredrevs` attributes. The changelog will then pretends these revision does not exists in this repo. A few methods need to be altered to achieve this behavior: - tip - __iter_ - irevs - hasnode - headrevs For consistency and to help debugging, the following methods are altered too. Tests tend to show it's not necessary to alter them but have them raise proper exception helps to detect bad acces to filtered revisions. - rev - node - linkrev - parentrevs - flags The following methods would also need alteration for consistency purpose but this is non-trivial and not done yet. - nodemap - strip The C version of headrevs is not run if there is any revision to filter. It'll need a proper rewrite later to restore performance.

  $ "$TESTDIR/hghave" unix-permissions || exit 80

  $ hg init a
  $ echo a > a/a
  $ hg -R a ci -A -m a
  adding a

  $ hg clone a b
  updating to branch default
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved

  $ echo b > b/b
  $ hg -R b ci -A -m b
  adding b

  $ chmod 100 a/.hg/store

  $ hg -R b push a
  pushing to a
  abort: could not lock repository a: Permission denied
  [255]

  $ chmod 700 a/.hg/store