diff tests/test-obsolete.t @ 35089:69ea10d5b00c

hgweb: show obsolescence status of a commit As with phases, spartan theme shows a simple "obsolete: yes" on its own line (this allows replacing "yes" with something more useful in future, like output of obsfate* template functions). Everywhere else a new "tag" is added to the same line that has phase, branch, etc of a changeset; in gitweb and monoblue the element has gray background, in paper and coal the element is gray with a dashed underline.
author Anton Shestakov <av6@dwimlabs.net>
date Sat, 18 Nov 2017 12:04:08 +0800
parents a7e49a5b3e6f
children 38fe3fe4bbb6
line wrap: on
line diff
--- a/tests/test-obsolete.t	Sat Nov 18 11:58:57 2017 +0800
+++ b/tests/test-obsolete.t	Sat Nov 18 12:04:08 2017 +0800
@@ -1015,6 +1015,30 @@
   orphan: 2 changesets
   phase-divergent: 1 changesets
 
+#if serve
+
+  $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
+  $ cat hg.pid >> $DAEMON_PIDS
+
+check obsolete changeset
+
+  $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=paper' | grep '<span class="obsolete">'
+     <span class="phase">draft</span> <span class="obsolete">obsolete</span> 
+  $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=coal' | grep '<span class="obsolete">'
+     <span class="phase">draft</span> <span class="obsolete">obsolete</span> 
+  $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=gitweb' | grep '<span class="logtags">'
+    <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="obsoletetag" title="obsolete">obsolete</span> </span>
+  $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=monoblue' | grep '<span class="logtags">'
+          <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="obsoletetag" title="obsolete">obsolete</span> </span>
+  $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=spartan' | grep 'class="obsolete"'
+    <th class="obsolete">obsolete:</th>
+    <td class="obsolete">yes</td>
+
+  $ killdaemons.py
+
+  $ rm hg.pid access.log errors.log
+#endif
+
 Test incoming/outcoming with changesets obsoleted remotely, known locally
 ===============================================================================