sapling/tests/test-pushrebase-fastmanifest.t
Saurabh Singh 5a62bbf298 fastmanifest: move fastmanifest tests from fb-hgext/tests to tests/
Summary: Now that D6685044 moved fastmanifest, we can also move the tests. Note
that test-fb-hgext-fastmanifest.t was moved seprately by Durham.

Test Plan: Ran all the tests.

Reviewers: quark, #mercurial, #sourcecontrol

Reviewed By: quark

Subscribers: durham, quark

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

Signature: 6686584:1515531785:3a9fa022f443faed6f3110eeef22d8ea72fcee3f
2018-01-09 14:21:39 -08:00

78 lines
1.5 KiB
Perl

Setup
$ PYTHONPATH=$TESTDIR/..:$PYTHONPATH
$ export PYTHONPATH
$ cat >> $HGRCPATH << EOF
> [ui]
> ssh = python "$RUNTESTDIR/dummyssh"
> EOF
Set up server repository
$ hg init server
$ cd server
$ cat >> .hg/hgrc << EOF
> [extensions]
> pushrebase=
> EOF
$ echo foo > a
$ echo foo > b
$ hg commit -Am 'initial'
adding a
adding b
$ hg book master
$ cd ..
Set up client repository 1 with pushrebase enabled
$ hg clone -q ssh://user@dummy/server client1
$ cd client1
$ cat >> .hg/hgrc << EOF
> [extensions]
> pushrebase=
> EOF
$ cd ..
Set up client repository 2 with pushrebase enabled / fastmanifest enabled
$ hg clone -q ssh://user@dummy/server client2
$ cd client2
$ cat >> .hg/hgrc << EOF
> [extensions]
> pushrebase=
> fastmanifest=
> EOF
$ cd ..
Create the dummy commit on client 1
$ cd client1
$ hg book mybook
$ echo "text" >> newfile
$ hg add newfile
$ hg commit -m 'dummy commit'
Test that pushing to a remotename gets rebased (client1 -> client2) works
$ hg push --to mybook ssh://user@dummy/client2
pushing to ssh://user@dummy/client2
searching for changes
remote: pushing 1 changeset:
remote: eb7a4df38d10 dummy commit
$ cd ../client2
$ hg log -G
o changeset: 1:eb7a4df38d10
| tag: tip
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: dummy commit
|
@ changeset: 0:2bb9d20e471c
bookmark: master
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: initial