Mercurial > hg-stable
changeset 7317:98408cb74137
bookmarks: Test if rebase works with bookmarks
Add a test that tests if rebase works fine with bookmarks.
author | Alexander Solovyov <piranha@piranha.org.ua> |
---|---|
date | Thu, 06 Nov 2008 10:31:09 +0100 |
parents | 9737041646bc |
children | 95e1260b8134 |
files | tests/test-bookmarks-rebase tests/test-bookmarks-rebase.out |
diffstat | 2 files changed, 80 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-bookmarks-rebase Thu Nov 06 10:31:09 2008 +0100 @@ -0,0 +1,38 @@ +#!/bin/sh + +echo "[extensions]" >> $HGRCPATH +echo "rebase=" >> $HGRCPATH +echo "bookmarks=" >> $HGRCPATH + +cleanoutput () { + sed -e 's/\(Rebase status stored to\).*/\1/' \ + -e 's/\(Rebase status restored from\).*/\1/' \ + -e 's/\(saving bundle to \).*/\1/' +} + +echo % initialize repository +hg init + +echo 'a' > a +hg ci -A -d '0 0' -u test -m "0" + +echo 'b' > b +hg ci -A -d '0 0' -u test -m "1" + +hg up 0 +echo 'c' > c +hg ci -A -d '0 0' -u test -m "2" + +echo 'd' > d +hg ci -A -d '0 0' -u test -m "3" + +hg bookmark -r 1 one +hg bookmark -r 3 two + +echo % bookmark list +hg bookmark + +echo % rebase +hg rebase -s two -d one 2>&1 | cleanoutput + +hg log \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-bookmarks-rebase.out Thu Nov 06 10:31:09 2008 +0100 @@ -0,0 +1,42 @@ +% initialize repository +adding a +adding b +0 files updated, 0 files merged, 1 files removed, 0 files unresolved +adding c +created new head +adding d +% bookmark list + * two 3:2ae46b1d99a7 + one 1:925d80f479bb +% rebase +saving bundle to +adding branch +adding changesets +adding manifests +adding file changes +added 1 changesets with 1 changes to 1 files (-1 heads) +rebase completed +changeset: 3:9163974d1cb5 +tag: tip +parent: 1:925d80f479bb +parent: 2:db815d6d32e6 +user: test +date: Thu Jan 01 00:00:00 1970 +0000 +summary: 3 + +changeset: 2:db815d6d32e6 +parent: 0:f7b1eb17ad24 +user: test +date: Thu Jan 01 00:00:00 1970 +0000 +summary: 2 + +changeset: 1:925d80f479bb +user: test +date: Thu Jan 01 00:00:00 1970 +0000 +summary: 1 + +changeset: 0:f7b1eb17ad24 +user: test +date: Thu Jan 01 00:00:00 1970 +0000 +summary: 0 +