tests/test-rollback.t
branchstable
changeset 13958 71f51cc71652
parent 13957 044e1356327d
child 13959 141f88ae5276
--- a/tests/test-rollback.t	Tue Apr 19 13:25:19 2011 +0200
+++ b/tests/test-rollback.t	Tue Apr 19 15:15:56 2011 +0200
@@ -92,3 +92,29 @@
   $ cat .hg/last-message.txt
   another precious commit message
 
+test rollback on served repository
+
+  $ hg commit -m "precious commit message"
+  $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
+  $ cat hg.pid >> $DAEMON_PIDS
+  $ cd ..
+  $ hg clone http://localhost:$HGPORT u
+  requesting all changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+  updating to branch test
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd u
+  $ hg id default
+  1df294f7b1a2
+
+now rollback and observe that 'hg serve' reloads the repository and
+presents the correct tip changeset:
+
+  $ hg -R ../t rollback
+  repository tip rolled back to revision -1 (undo commit)
+  working directory now based on revision -1
+  $ hg id default
+  000000000000