sapling/tests/test-perftweaks-remotenames.t
Durham Goode 6b981a083a perftweaks: fix noderev cache for non existent nodes
Summary:
In certain situations, like infinitepush, the noderev cache builders would try
to save a node that didn't exist in the repo. This caused an exception. Now we
check each node before we attempt to resolve it to a rev.

Test Plan: Added a test. It failed before, and passes now.

Reviewers: #mercurial, andrasbelo

Reviewed By: andrasbelo

Subscribers: andrasbelo, mjpieters

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

Signature: t1:4494848:1485964835:986d4fe3e29404cac22e4acf7d88c3715fcb51b9
2017-02-01 08:03:49 -08:00

40 lines
1.0 KiB
Perl

$ . $TESTDIR/require-ext.sh remotenames
$ extpath=`dirname $TESTDIR`
$ cp $extpath/hgext3rd/perftweaks.py $TESTTMP # use $TESTTMP substitution in message
$ cat >> $HGRCPATH << EOF
> [ui]
> ssh=python "$TESTDIR/dummyssh"
> [extensions]
> perftweaks=$TESTTMP/perftweaks.py
> remotenames=
> EOF
$ hg init master
$ cd master
$ echo a >> a && hg ci -Aqm a
$ hg book master
$ hg book -i
$ echo b >> b && hg ci -Aqm b
$ hg book foo
$ cd ..
$ hg clone ssh://user@dummy/master client -r 0
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
Verify pulling only some commits does not cause errors from the unpulled
remotenames
$ cd client
$ hg pull -r 0
pulling from ssh://user@dummy/master
no changes found
$ hg book --remote
default/master 0:cb9a9f314b8b
$ cat .hg/remotenames
cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b bookmarks default/master