diff tests/test-oldconvert.t @ 224:f60555898df4

new obsolete store The new formats allows multiple "new" changeset and various meta-data. Forcing extinct to secret phase happen now on an irregular basis A command exist to migrate to the new format
author Pierre-Yves.David@ens-lyon.org
date Tue, 08 May 2012 20:50:43 +0200
parents
children fb83210bce32
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-oldconvert.t	Tue May 08 20:50:43 2012 +0200
@@ -0,0 +1,58 @@
+  $ cat >> $HGRCPATH <<EOF
+  > [web]
+  > push_ssl = false
+  > allow_push = *
+  > [phases]
+  > publish=False
+  > [alias]
+  > odiff=diff --rev 'limit(obsparents(.),1)' --rev .
+  > [extensions]
+  > hgext.graphlog=
+  > EOF
+  $ mkcommit() {
+  >    echo "$1" > "$1"
+  >    hg add "$1"
+  >    hg ci -m "add $1"
+  > }
+
+create commit
+
+  $ hg init repo
+  $ cd repo
+  $ mkcommit a
+  $ mkcommit b
+  $ hg up -q 0
+  $ mkcommit c
+  created new head
+
+forge old style relation files
+
+  $ hg log -r 2 --template='{node} ' > .hg/obsolete-relations
+  $ hg log -r 1 --template='{node}' >> .hg/obsolete-relations
+
+enable the extensions
+
+  $ echo "obsolete=$(echo $(dirname $TESTDIR))/hgext/obsolete.py" >> $HGRCPATH
+
+  $ hg glog
+  abort: old format of obsolete marker detected!
+  run `hg debugconvertobsolete` once.
+  [255]
+  $ hg debugconvertobsolete --traceback
+  1 obsolete marker converted
+  $ hg glog
+  @  changeset:   2:d67cd0334eee
+  |  tag:         tip
+  |  parent:      0:1f0dee641bb7
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     add c
+  |
+  o  changeset:   0:1f0dee641bb7
+     user:        test
+     date:        Thu Jan 01 00:00:00 1970 +0000
+     summary:     add a
+  
+  $ hg debugconvertobsolete
+  nothing to do
+  0 obsolete marker converted