Mercurial > evolve
view tests/test-obsolete-rebase.t @ 280:fd43e3908f09
test-obsolete-rebase.t: move --keep test from test-obsolete.t
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Tue, 19 Jun 2012 14:02:12 +0200 |
parents | 0d87b1fbf32b |
children | 05ab164c6593 |
line wrap: on
line source
$ cat >> $HGRCPATH <<EOF > [defaults] > amend=-d "0 0" > [extensions] > hgext.rebase= > hgext.graphlog= > EOF $ echo "obsolete=$(echo $(dirname $TESTDIR))/hgext/obsolete.py" >> $HGRCPATH $ glog() { > hg glog --template '{rev}:{node|short}@{branch}({phase}) {desc|firstline}\n'\ > "$@" > } $ hg init repo $ cd repo $ echo a > a $ hg ci -Am adda adding a $ echo a >> a $ hg ci -m changea Test regular rebase $ hg up 0 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ echo b > b $ hg ci -Am addb adding b created new head $ hg rebase -d 1 --keep abort: rebase --keep option is unsupported with obsolete extension (see 'hg help obsolete') [255] $ hg rebase -d 1 $ glog --hidden @ 3:03f017c74faa@default(draft) addb | | o 2:102a90ea7b4a@default(secret) addb | | o | 1:540395c44225@default(draft) changea |/ o 0:07f494440405@default(draft) adda $ hg debugsuccessors 102a90ea7b4a 03f017c74faa Test rebase with deleted empty revision $ hg up 0 1 files updated, 0 files merged, 1 files removed, 0 files unresolved $ hg branch foo marked working directory as branch foo (branches are permanent and global, did you want a bookmark?) $ echo a >> a $ hg ci -m changea $ hg rebase -d 1 $ glog --hidden o 4:4e322f7ce8e3@foo(secret) changea | | o 3:03f017c74faa@default(draft) addb | | +---o 2:102a90ea7b4a@default(secret) addb | | | @ 1:540395c44225@default(draft) changea |/ o 0:07f494440405@default(draft) adda $ hg debugsuccessors 102a90ea7b4a 03f017c74faa 4e322f7ce8e3 000000000000