##// END OF EJS Templates
exchange: turn on option that makes concurrent pushes work better...
exchange: turn on option that makes concurrent pushes work better The motivation is simply to make hg work better out of the box. This is a slight backwards compatibility break, because client extensions could have assumed that the list of heads the client sees during discovery will be the list of heads during the entirety of the push. It seems unlikely to matter, and not worth mentioning. There's a fair amount of diff in tests, but this is just due to sending a few more bytes on the wire, except for test-acl.t. The extra "invalid branch cache" lines in test-acl.t don't seem to indicate a problem: the branchcache now get computed during the bundle application (because of the check:updated-heads bundle part), but doesn't get rolled back when transactions rollback, thus causing a message in the next operation computing the branch cache. Before this change, I assume the branchcache was only computed on transaction commit, so not computed at all when the transactions roll back, thus no messages. Differential Revision: https://phab.mercurial-scm.org/D8202

File last commit:

r40758:0800d9e6 default
r44896:edc8504b default
Show More
test-remotefilelog-pull-noshallow.t
79 lines | 2.2 KiB | text/troff | Tads3Lexer
/ tests / test-remotefilelog-pull-noshallow.t
Matt Harbison
tests: disable remotefilelog on Windows...
r40758 #require no-windows
Augie Fackler
remotefilelog: import pruned-down remotefilelog extension from hg-experimental...
r40530 $ . "$TESTDIR/remotefilelog-library.sh"
Set up an extension to make sure remotefilelog clientsetup() runs
unconditionally even if we have never used a local shallow repo.
This mimics behavior when using remotefilelog with chg. clientsetup() can be
triggered due to a shallow repo, and then the code can later interact with
non-shallow repositories.
$ cat > setupremotefilelog.py << EOF
> from mercurial import extensions
> def extsetup(ui):
Pulkit Goyal
py3: add a b'' prefix in tests/test-remotefilelog-pull-noshallow.t...
r40986 > remotefilelog = extensions.find(b'remotefilelog')
Augie Fackler
remotefilelog: import pruned-down remotefilelog extension from hg-experimental...
r40530 > remotefilelog.onetimeclientsetup(ui)
> EOF
Set up the master repository to pull from.
Martin von Zweigbergk
tests: drop obsolete "hginit" alias in remotefilelog tests...
r40605 $ hg init master
Augie Fackler
remotefilelog: import pruned-down remotefilelog extension from hg-experimental...
r40530 $ cd master
$ cat >> .hg/hgrc <<EOF
> [remotefilelog]
> server=True
> EOF
$ echo x > x
$ hg commit -qAm x
$ cd ..
$ hg clone ssh://user@dummy/master child -q
We should see the remotefilelog capability here, which advertises that
the server supports our custom getfiles method.
$ cd master
$ echo 'hello' | hg -R . serve --stdio | grep capa | identifyrflcaps
Augie Fackler
remotefilelog: rename capability for legacy ssh file fetching method...
r40543 exp-remotefilelog-ssh-getfiles-1
Augie Fackler
remotefilelog: rename wireproto methods and remaining capabilities...
r40546 x_rfl_getfile
x_rfl_getflogheads
Augie Fackler
remotefilelog: import pruned-down remotefilelog extension from hg-experimental...
r40530 $ echo 'capabilities' | hg -R . serve --stdio | identifyrflcaps ; echo
Augie Fackler
remotefilelog: rename capability for legacy ssh file fetching method...
r40543 exp-remotefilelog-ssh-getfiles-1
Augie Fackler
remotefilelog: rename wireproto methods and remaining capabilities...
r40546 x_rfl_getfile
x_rfl_getflogheads
Augie Fackler
remotefilelog: import pruned-down remotefilelog extension from hg-experimental...
r40530
Pull to the child repository. Use our custom setupremotefilelog extension
to ensure that remotefilelog.onetimeclientsetup() gets triggered. (Without
using chg it normally would not be run in this case since the local repository
is not shallow.)
$ echo y > y
$ hg commit -qAm y
$ cd ../child
$ hg pull --config extensions.setuprfl=$TESTTMP/setupremotefilelog.py
pulling from ssh://user@dummy/master
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
new changesets d34c38483be9
(run 'hg update' to get a working copy)
$ hg up
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cat y
y
Test that bundle works in a non-remotefilelog repo w/ remotefilelog loaded
$ echo y >> y
$ hg commit -qAm "modify y"
$ hg bundle --base ".^" --rev . mybundle.hg --config extensions.setuprfl=$TESTTMP/setupremotefilelog.py
1 changesets found
$ cd ..