diff tests/test-obsolete.t @ 343:6b92f8d5ae58

adapt for new mercurial
author Pierre-Yves.David@ens-lyon.org
date Tue, 03 Jul 2012 11:35:31 +0200
parents 63f267bd2176
children f4302a2079f4
line wrap: on
line diff
--- a/tests/test-obsolete.t	Tue Jul 03 14:18:33 2012 +0200
+++ b/tests/test-obsolete.t	Tue Jul 03 11:35:31 2012 +0200
@@ -15,6 +15,9 @@
   >    hg add "$1"
   >    hg ci -m "add $1"
   > }
+  $ getid() {
+  >    hg id --debug -ir "$1"
+  > }
 
   $ alias qlog="hg log --template='{rev}\n- {node|short}\n'"
   $ hg init local
@@ -27,7 +30,14 @@
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ mkcommit obsol_c # 3
   created new head
-  $ hg debugobsolete 3 2
+  $ getid 2
+  4538525df7e2b9f09423636c61ef63a4cb872a2d
+  $ getid 3
+  0d3f46688ccc6e756c7e96cf64c391c411309597
+  $ hg debugobsolete 4538525df7e2b9f09423636c61ef63a4cb872a2d 0d3f46688ccc6e756c7e96cf64c391c411309597
+  $ hg debugobsolete
+  4538525df7e2b9f09423636c61ef63a4cb872a2d 0d3f46688ccc6e756c7e96cf64c391c411309597 0 {'date': '', 'user': 'test'}
+
 
 
 Test that obsolete changeset are hidden
@@ -82,7 +92,7 @@
   $ hg up 1 -q
   $ mkcommit "obsol_c'" # 4 (on 1)
   created new head
-  $ hg debugobsolete 4 3
+  $ hg debugobsolete `getid 3` `getid 4`
   $ qlog
   4
   - 725c380fe99b
@@ -180,7 +190,7 @@
   Working directory parent is obsolete
   $ mkcommit obsol_d # 6
   created new head
-  $ hg debugobsolete 6 5
+  $ hg debugobsolete `getid 5` `getid 6`
   $ qlog
   6
   - 95de7fc6918d
@@ -235,7 +245,7 @@
   Working directory parent is obsolete
   $ mkcommit "obsol_d'" # 7
   created new head
-  $ hg debugobsolete 7 6
+  $ hg debugobsolete `getid 6` `getid 7`
   $ hg pull -R ../other-new .
   pulling from .
   searching for changes
@@ -318,7 +328,7 @@
   Working directory parent is obsolete
   $ mkcommit "obsol_d''"
   created new head
-  $ hg debugobsolete 8 7
+  $ hg debugobsolete `getid 7` `getid 8`
   $ cd ../other-new
   $ hg up -q 3
   $ hg pull ../local/
@@ -375,8 +385,10 @@
   created new head
   $ hg id -n
   9
-  $ hg debugobsolete 9 0
-  83b5778897ad try to obsolete immutable changeset 1f0dee641bb7
+  $ hg debugobsolete `getid 0` `getid 9`
+83b5778897ad try to obsolete immutable changeset 1f0dee641bb7
+# at core level the warning is not issued
+# this is now a big issue now that we have latecomer warning
   $ qlog -r 'obsolete()'
   3
   - 0d3f46688ccc
@@ -396,7 +408,7 @@
   0
   - 1f0dee641bb7
 
-  $ hg debugobsolete null 9 #kill
+  $ hg debugobsolete `getid 9` #kill
   $ hg up null -q # to be not based on 9 anymore
   $ qlog
   8
@@ -473,7 +485,7 @@
   $ hg up -q 10
   $ mkcommit "obsol_d'''"
   created new head
-  $ hg debugobsolete 12 11
+  $ hg debugobsolete `getid 11` `getid 12`
   $ hg push ../other-new --traceback
   pushing to ../other-new
   searching for changes
@@ -573,7 +585,7 @@
   159dfc9fa5d3 9468a5f5d8b2
   1f0dee641bb7 83b5778897ad
   4538525df7e2 0d3f46688ccc
-  83b5778897ad 000000000000
+  83b5778897ad
   909a0fb57e5d 159dfc9fa5d3
   9468a5f5d8b2 6db5e282cb91
   95de7fc6918d 909a0fb57e5d