tests/test-exchange-A1.t
changeset 831 a6af6919888d
parent 829 0943f327e2fb
child 942 010c7e4aa820
--- a/tests/test-exchange-A1.t	Mon Mar 03 13:27:53 2014 -0800
+++ b/tests/test-exchange-A1.t	Mon Mar 03 14:03:41 2014 -0800
@@ -29,16 +29,13 @@
 
 initial
 
-  $ mkdir A.1.1
-  $ cd A.1.1
-  $ hg init source
-  $ hg init dest
-  $ hg init other
-  $ cd source
-  $ mkcommit O
-  $ hg phase --public .
-  $ hg push -q ../dest
-  $ hg push -q ../other
+  $ setuprepos A.1.1
+  creating test repo for test case A.1.1
+  - pulldest
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
   $ mkcommit A
   $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'`
   $ hg log -G
@@ -60,16 +57,16 @@
 Variante a: push -r A
 ---------------------
 
-  $ cd A.1.1.a
-  $ hg -R source id -r 'desc(A)'
-  f5bc6836db60 tip
-  $ hg -R source debugobsolete
+  $ dotest A.1.1.a A
+  ## Running testcase A.1.1.a
+  # testing echange of "A" (f5bc6836db60)
+  ## initial state
+  # obstore: main
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
-  $ hg -R dest   debugobsolete
-  $ hg -R other  debugobsolete
-
-  $ hg -R source push -r 'desc(A)' dest
-  pushing to dest
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pushing "A" from main to pushdest
+  pushing to pushdest
   searching for changes
   adding changesets
   adding manifests
@@ -80,14 +77,14 @@
   OBSEXC: encoding 1 markers
   OBSEXC: sending 1 pushkey payload (78 bytes)
   OBSEXC: DONE
-  $ hg -R source debugobsolete
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
-  $ hg -R dest   debugobsolete
+  ## post push state
+  # obstore: main
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
-  $ hg -R other  debugobsolete
-
-  $ hg -R other pull -r 'f5bc6836db60' dest
-  pulling from dest
+  # obstore: pushdest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
+  # obstore: pulldest
+  ## pulling "f5bc6836db60" from main into pulldest
+  pulling from main
   searching for changes
   adding changesets
   adding manifests
@@ -98,28 +95,29 @@
   OBSEXC: 1 markers added
   OBSEXC: DONE
   (run 'hg update' to get a working copy)
-  $ hg -R source debugobsolete
+  ## post pull state
+  # obstore: main
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
-  $ hg -R dest   debugobsolete
+  # obstore: pushdest
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
-  $ hg -R other  debugobsolete
+  # obstore: pulldest
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
 
-  $ cd ..
+
+
 
 Variante b: push
 ---------------------
 
-  $ cd A.1.1.b
-  $ hg -R source id -r 'desc(A)'
-  f5bc6836db60 tip
-  $ hg -R source debugobsolete
+  $ dotest A.1.1.b
+  ## Running testcase A.1.1.b
+  ## initial state
+  # obstore: main
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
-  $ hg -R dest   debugobsolete
-  $ hg -R other  debugobsolete
-
-  $ hg -R source push dest
-  pushing to dest
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pushing from main to pushdest
+  pushing to pushdest
   searching for changes
   adding changesets
   adding manifests
@@ -130,14 +128,14 @@
   OBSEXC: encoding 1 markers
   OBSEXC: sending 1 pushkey payload (78 bytes)
   OBSEXC: DONE
-  $ hg -R source debugobsolete
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
-  $ hg -R dest   debugobsolete
+  ## post push state
+  # obstore: main
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
-  $ hg -R other  debugobsolete
-
-  $ hg -R other pull dest
-  pulling from dest
+  # obstore: pushdest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
+  # obstore: pulldest
+  ## pulling from main into pulldest
+  pulling from main
   searching for changes
   adding changesets
   adding manifests
@@ -148,14 +146,16 @@
   OBSEXC: 1 markers added
   OBSEXC: DONE
   (run 'hg update' to get a working copy)
-  $ hg -R source debugobsolete
+  ## post pull state
+  # obstore: main
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
-  $ hg -R dest   debugobsolete
+  # obstore: pushdest
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
-  $ hg -R other  debugobsolete
+  # obstore: pulldest
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
 
-  $ cd ..
+
+
 
 
 
@@ -187,16 +187,13 @@
 
 initial
 
-  $ mkdir A.1.2
-  $ cd A.1.2
-  $ hg init source
-  $ hg init dest
-  $ hg init other
-  $ cd source
-  $ mkcommit O
-  $ hg phase --public .
-  $ hg push -q ../dest
-  $ hg push -q ../other
+  $ setuprepos A.1.2
+  creating test repo for test case A.1.2
+  - pulldest
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
   $ mkcommit A
   $ mkcommit B
   $ hg log -G
@@ -221,16 +218,16 @@
 Variante a: push -r A
 ---------------------
 
-  $ cd A.1.2.a
-  $ hg -R source id -r 'desc(B)'
-  f6fbb35d8ac9 tip
-  $ hg -R source debugobsolete
+  $ dotest A.1.2.a B
+  ## Running testcase A.1.2.a
+  # testing echange of "B" (f6fbb35d8ac9)
+  ## initial state
+  # obstore: main
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
-  $ hg -R dest   debugobsolete
-  $ hg -R other  debugobsolete
-
-  $ hg -R source push -r 'desc(B)' dest
-  pushing to dest
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pushing "B" from main to pushdest
+  pushing to pushdest
   searching for changes
   adding changesets
   adding manifests
@@ -241,14 +238,14 @@
   OBSEXC: encoding 1 markers
   OBSEXC: sending 1 pushkey payload (78 bytes)
   OBSEXC: DONE
-  $ hg -R source debugobsolete
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
-  $ hg -R dest   debugobsolete
+  ## post push state
+  # obstore: main
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
-  $ hg -R other  debugobsolete
-
-  $ hg -R other pull -r 'f6fbb35d8ac9' dest
-  pulling from dest
+  # obstore: pushdest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
+  # obstore: pulldest
+  ## pulling "f6fbb35d8ac9" from main into pulldest
+  pulling from main
   searching for changes
   adding changesets
   adding manifests
@@ -259,28 +256,26 @@
   OBSEXC: 1 markers added
   OBSEXC: DONE
   (run 'hg update' to get a working copy)
-  $ hg -R source debugobsolete
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
-  $ hg -R dest   debugobsolete
+  ## post pull state
+  # obstore: main
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
-  $ hg -R other  debugobsolete
+  # obstore: pushdest
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
-
-  $ cd ..
+  # obstore: pulldest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
 
 Variante b: push
 ---------------------
 
-  $ cd A.1.2.b
-  $ hg -R source id -r 'desc(B)'
-  f6fbb35d8ac9 tip
-  $ hg -R source debugobsolete
+  $ dotest A.1.2.b
+  ## Running testcase A.1.2.b
+  ## initial state
+  # obstore: main
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
-  $ hg -R dest   debugobsolete
-  $ hg -R other  debugobsolete
-
-  $ hg -R source push dest
-  pushing to dest
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pushing from main to pushdest
+  pushing to pushdest
   searching for changes
   adding changesets
   adding manifests
@@ -291,14 +286,14 @@
   OBSEXC: encoding 1 markers
   OBSEXC: sending 1 pushkey payload (78 bytes)
   OBSEXC: DONE
-  $ hg -R source debugobsolete
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
-  $ hg -R dest   debugobsolete
+  ## post push state
+  # obstore: main
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
-  $ hg -R other  debugobsolete
-
-  $ hg -R other pull dest
-  pulling from dest
+  # obstore: pushdest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
+  # obstore: pulldest
+  ## pulling from main into pulldest
+  pulling from main
   searching for changes
   adding changesets
   adding manifests
@@ -309,11 +304,10 @@
   OBSEXC: 1 markers added
   OBSEXC: DONE
   (run 'hg update' to get a working copy)
-  $ hg -R source debugobsolete
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
-  $ hg -R dest   debugobsolete
+  ## post pull state
+  # obstore: main
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
-  $ hg -R other  debugobsolete
+  # obstore: pushdest
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
-
-  $ cd ..
+  # obstore: pulldest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}