sapling/tests/test-fastpartialmatch-bundlerepo.t
Stanislau Hlebik f008b056b4 fastpartialmatch: do not use fastpartialmatch in bundlerepos
Summary:
bundlerepo adds new commits that are not present in fastpartialmatch index.
Without this diff any access to the commit from bundle fails if
fastpartialmatch.raiseifinconsistent config option is set.

Let's not use fastpartialmatch in bundlerepos

Test Plan: arc unit

Reviewers: #mercurial, mjpieters

Reviewed By: mjpieters

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4635368

Tasks: 16394593

Signature: t1:4635368:1488393506:15b8f6a9fddabe681de7fd1296bbfafb9512f558
2017-03-02 00:53:09 -08:00

34 lines
906 B
Perl

$ mkcommit() {
> echo "$1" > "$1"
> hg add "$1"
> hg ci -m "$1"
> }
$ extpath=`dirname $TESTDIR`
$ cat >> $HGRCPATH << EOF
> [extensions]
> fastpartialmatch=$extpath/hgext3rd/fastpartialmatch.py
> strip=
> EOF
$ hg init repo
$ cd repo
$ hg debugbuilddag +2
$ hg log -r 1 -T '{node}\n'
66f7d451a68b85ed82ff5fcc254daf50c74144bd
$ hg strip -r 66f7d451a68b85ed8
saved backup bundle to $TESTTMP/repo/.hg/strip-backup/66f7d451a68b-f4da9ecf-backup.hg (glob)
$ hg debugrebuildpartialindex
$ hg debugcheckpartialindex
$ hg log -r 66f7d451a68b85ed8
abort: unknown revision '66f7d451a68b85ed8'!
[255]
$ hg log --config fastpartialmatch.raiseifinconsistent=True -R $TESTTMP/repo/.hg/strip-backup/* -r 66f7d451a68b85ed8
changeset: 1:66f7d451a68b
tag: tip
user: debugbuilddag
date: Thu Jan 01 00:00:01 1970 +0000
summary: r1