tests/test-rhg-no-generaldelta.t
author Sandu Turcan <idlsoft@gmail.com>
Tue, 03 May 2022 21:44:30 -0400
branchstable
changeset 49241 6b10151b9621
parent 48458 96ea4db4741b
permissions -rw-r--r--
narrow_widen_acl: enforce narrowacl in narrow_widen (SEC) Reviewer note: this was sent by the author as a simple bugfix, but can be considered a security patch, since it allows users to access things outside of the ACL, hence the (SEC) prefix. However, this affects the `narrow` extention which is still marked as experimental and has relatively few users aside from large companies with their own security layers on top from what we can gather. We feel (Alphare: or at least, I feel) like pinging the packaging list is enough in this case.

  $ NO_FALLBACK="env RHG_ON_UNSUPPORTED=abort"

  $ cat << EOF >> $HGRCPATH
  > [format]
  > sparse-revlog = no
  > EOF

  $ hg init repo --config format.generaldelta=no --config format.usegeneraldelta=no
  $ cd repo
  $ (echo header; seq.py 20) > f
  $ hg commit -q -Am initial
  $ (echo header; seq.py 20; echo footer) > f
  $ hg commit -q -Am x
  $ hg update ".^"
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ (seq.py 20; echo footer) > f
  $ hg commit -q -Am y
  $ hg debugdeltachain f --template '{rev} {prevrev} {deltatype}\n'
  0 -1 base
  1 0 prev
  2 1 prev

rhg works on non-generaldelta revlogs:

  $ $NO_FALLBACK hg cat f -r .
  1
  2
  3
  4
  5
  6
  7
  8
  9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  footer