tests/test-bookmarks-strip
author Matt Mackall <mpm@selenic.com>
Thu, 20 May 2010 12:15:44 -0500
changeset 11200 12e5149cafca
parent 7316 9737041646bc
child 11208 2313dc4d9817
permissions -rwxr-xr-x
strip: improve full backup message
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
11200
12e5149cafca strip: improve full backup message
Matt Mackall <mpm@selenic.com>
parents: 7316
diff changeset
     3
source $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