[PATCH 21 of 22 V2-Series-D] test: test that hgweb does not explode on filtered changeset

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Jan 14 14:35:53 CST 2013


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1358195266 -3600
# Node ID cb0e659e3a904ae17a95bb662f2b1a9b36156b1e
# Parent  cd73d1a61f4243c73b702ca266ef0fc8a0dca467
test: test that hgweb does not explode on filtered changeset

We do not check the output because hgweb dos not currently exclude unserved
changeset from its view. We just want to make sure hgweb does not traceback.

diff --git a/tests/test-obsolete.t b/tests/test-obsolete.t
--- a/tests/test-obsolete.t
+++ b/tests/test-obsolete.t
@@ -641,18 +641,52 @@ Do not warn about new head when the new 
   adding changesets
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files (+1 heads)
 
+check hgweb is does not explode
+====================================
+
+  $ mkcommit babar
+  $ for i in {1..60};
+  > do
+  >    hg up 7 -q
+  >    echo $i >> babar;
+  >    hg commit -m babar_$i;
+  >    hg debugobsolete `hg id --debug --id`
+  > done
+  $ hg up 7 -q
+  $ mkcommit celestine
+
+  $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
+  $ cat hg.pid >> $DAEMON_PIDS
+
+check changelog view
+
+  $ ("$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'shortlog/')
+  200 Script output follows
+
+check graph view
+
+  $ ("$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'graph')
+  200 Script output follows
+
+check filelog view
+
+  $ ("$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'log/'`hg id --debug --id`/'babar')
+  200 Script output follows
+
+  $ kill `cat hg.pid`
+
 Checking _enable=False warning if obsolete marker exists
 
   $ echo '[extensions]' >> $HGRCPATH
   $ echo "obs=!" >> $HGRCPATH
   $ hg log -r tip
-  obsolete feature not enabled but 8 markers found!
-  changeset:   6:3de5eca88c00
+  obsolete feature not enabled but 68 markers found!
+  changeset:   68:98f9254239f2
   tag:         tip
-  parent:      3:6f9641995072
+  parent:      7:50c51b361e60
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
-  summary:     add obsolete_e
+  summary:     add celestine
   


More information about the Mercurial-devel mailing list