Mercurial > hg
view tests/test-rebase-partial.t @ 36611:6906547c8476
wireproto: don't expose legacy commands to version 2 of wire protocol
Now that we have the ability to control which transports a wire
protocol command is exposed on, let's put it to use.
We flag the "branches," "changegroup," and "changegroupsubset"
commands as only available on version 1. "branches" was used by the
legacy discovery mechanism and was replaced by the "known" and
"heads" commands. "changegroup" and "changegroupsubset" were
replaced by "getbundle."
"between" is also legacy. However, since it is used by the SSH
handshake protocol, marking it as legacy is a bit more complicated
and will be done in a later commit.
Another nuanced issue with this change is that the server-advertised
capabilities still list "changegroupsubset" despite the command not
being available. This will be addressed in a subsequent commit.
Differential Revision: https://phab.mercurial-scm.org/D2485
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 27 Feb 2018 15:06:10 -0800 |
parents | 469b06b4c3ca |
children | b9a6ee2066f9 |
line wrap: on
line source
Tests rebasing with part of the rebase set already in the destination (issue5422) $ cat >> $HGRCPATH <<EOF > [extensions] > rebase= > drawdag=$TESTDIR/drawdag.py > > [experimental] > evolution.createmarkers=True > evolution.allowunstable=True > > [alias] > tglog = log -G --template "{rev}: {node|short} {desc}" > EOF $ rebasewithdag() { > N=`$PYTHON -c "print($N+1)"` > hg init repo$N && cd repo$N > hg debugdrawdag > hg rebase "$@" > _rebasetmp > r=$? > grep -v 'saved backup bundle' _rebasetmp > [ $r -eq 0 ] && hg tglog > cd .. > return $r > } Rebase two commits, of which one is already in the right place $ rebasewithdag -r C+D -d B <<EOF > C > | > B D > |/ > A > EOF rebasing 2:b18e25de2cf5 "D" (D) already rebased 3:26805aba1e60 "C" (C tip) o 4: fe3b4c6498fa D | | o 3: 26805aba1e60 C |/ | x 2: b18e25de2cf5 D | | o | 1: 112478962961 B |/ o 0: 426bada5c675 A Can collapse commits even if one is already in the right place $ rebasewithdag --collapse -r C+D -d B <<EOF > C > | > B D > |/ > A > EOF rebasing 2:b18e25de2cf5 "D" (D) rebasing 3:26805aba1e60 "C" (C tip) o 4: a2493f4ace65 Collapsed revision | * D | * C | x 3: 26805aba1e60 C |/ | x 2: b18e25de2cf5 D | | o | 1: 112478962961 B |/ o 0: 426bada5c675 A Rebase with "holes". The commits after the hole should end up on the parent of the hole (B below), not on top of the destination (A). $ rebasewithdag -r B+D -d A <<EOF > D > | > C > | > B > | > A > EOF already rebased 1:112478962961 "B" (B) rebasing 3:f585351a92f8 "D" (D tip) o 4: 1e6da8103bc7 D | | x 3: f585351a92f8 D | | | o 2: 26805aba1e60 C |/ o 1: 112478962961 B | o 0: 426bada5c675 A