tests/test-bookmarks-strip
author Giorgos Keramidas <keramida@ceid.upatras.gr>
Mon, 12 Jul 2010 09:19:28 +0300
branchstable
changeset 11536 92342fa9fbd8
parent 11208 2313dc4d9817
child 12392 741290486877
permissions -rwxr-xr-x
rebase: add a test for committed MQ patches (59bd20451ab6)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7316
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
     1
#!/bin/sh
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
     2
11208
2313dc4d9817 tests: fix bashism to load helpers.sh
Yuya Nishihara <yuya@tcha.org>
parents: 11200
diff changeset
     3
. $TESTDIR/helpers.sh
7316
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
     4
echo "[extensions]" >> $HGRCPATH
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
     5
echo "bookmarks=" >> $HGRCPATH
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
     6
echo "mq=" >> $HGRCPATH
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
     7
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
     8
hg init
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
     9
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    10
echo qqq>qqq.txt
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    11
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    12
echo % add file
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    13
hg add
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    14
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    15
echo % commit first revision
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    16
hg ci -m 1 -u user -d "1 0"
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    17
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    18
echo % set bookmark
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    19
hg book test
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    20
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    21
echo www>>qqq.txt
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    22
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    23
echo % commit second revision
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    24
hg ci -m 2 -u usr -d "1 0"
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    25
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    26
echo % set bookmark
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    27
hg book test2
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    28
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    29
echo % update to -2
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    30
hg update -r -2
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    31
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    32
echo eee>>qqq.txt
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    33
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    34
echo % commit new head
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    35
hg ci -m 3 -u user -d "1 0"
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    36
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    37
echo % bookmarks updated?
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    38
hg book
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    39
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    40
echo % strip to revision 1
11200
12e5149cafca strip: improve full backup message
Matt Mackall <mpm@selenic.com>
parents: 7316
diff changeset
    41
hg strip 1 | hidebackup
7316
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    42
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    43
echo % list bookmarks
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    44
hg book
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    45