Mercurial > hg
view tests/test-push-checkheads-pruned-B2.t @ 37187:03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
This patch moves the infinitepush extension from fb-hgext to core. The
extension is used to store incoming bundles during a push in bundlestore rather
than applying them to the revlog.
The extension was copied from the repository revision at
f27f094e91553d3cae5167c0b1c42ae940f888d5 and following changes were made:
* added `from __future__ import absolute_import` where missing
* fixed module imports to follow the core style
* minor fixes for test-check-code.t
* registered the configs
* adding the testedwith value to match core's convention
* removed double newlines to make test-check-commit.t happy
* added one line doc about extension and marked it as experimental
Only one test file test-infinitepush-bundlestore.t is moved to core and
following changes are made to file:
* remove dependency of library.sh
* split the tests into two tests i.e. test-infinitepush.t and
test-infinitepush-bundlestore.t
* removed testing related to other facebook's extensions pushrebase, inhibit,
fbamend
library-infinitepush.sh is also copied from fb-hgext from the same revision and
following changes are made:
* change the path to infinitepush extension as it's in core with this patch
* removed sql handling from the file as we are not testing that initially
Currently at this revision, test-check-module-imports.t does not pass as there
is import of a module from fb/hgext in one the of the file which will be removed
in the next patch.
This extension right now has a lot of things which we don't require in core like
`--to`, `--create` flags to `hg bookmark`, logic related to remotenames
extension and another facebook's extensions, custom bundle2parts which can be
prevented by using bookmarks bundle part and also logic related to sql store
which is probably we don't want initially.
The next patches in this series will remove all the unwanted and unrequired
things from the extension and will make this a nice one.
The end goal is to have a very lighweight extension with no or very less
wrapping on the client side.
Differential Revision: https://phab.mercurial-scm.org/D2096
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 09 Feb 2018 13:39:15 +0530 |
parents | 1a09dad8b85a |
children | 89630d0b3e23 |
line wrap: on
line source
==================================== Testing head checking code: Case B-2 ==================================== Mercurial checks for the introduction of new heads on push. Evolution comes into play to detect if existing branches on the server are being replaced by some of the new one we push. This case is part of a series of tests checking this behavior. Category B: simple case involving pruned changesets TestCase 2: multi-changeset branch, head is pruned, rest is superceeded .. old-state: .. .. * 2 changeset branch .. .. new-state: .. .. * old head is pruned .. * 1 new branch succeeding to the other changeset in the old branch .. .. expected-result: .. .. * push allowed .. .. graph-summary: .. .. B ⊗ .. | .. A ø⇠◔ A' .. |/ .. ● $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- $ mkdir B2 $ cd B2 $ setuprepos creating basic server and client repo updating to branch default 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd server $ mkcommit B0 $ cd ../client $ hg pull pulling from $TESTTMP/B2/server searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files new changesets d73caddc5533 (run 'hg update' to get a working copy) $ hg up 0 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ mkcommit A1 created new head $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` obsoleted 1 changesets 1 new orphan changesets $ hg debugobsolete --record-parents `getid "desc(B0)"` obsoleted 1 changesets $ hg log -G --hidden @ f6082bc4ffef (draft): A1 | | x d73caddc5533 (draft): B0 | | | x 8aaa48160adc (draft): A0 |/ o 1e4be0697311 (public): root Actual testing -------------- $ hg push pushing to $TESTTMP/B2/server searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files (+1 heads) 2 new obsolescence markers obsoleted 2 changesets $ cd ../..