--- a/tests/test-obsolete.t Sun Feb 08 00:56:40 2015 -0500
+++ b/tests/test-obsolete.t Thu Feb 19 19:32:06 2015 +0800
@@ -754,6 +754,45 @@
visible 0:193e9254ce7e
tip 0:193e9254ce7e
+#if serve
+
+Test issue 4506
+
+ $ cd ..
+ $ hg init repo-issue4506
+ $ cd repo-issue4506
+ $ echo "0" > foo
+ $ hg add foo
+ $ hg ci -m "content-0"
+
+ $ hg up null
+ 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+ $ echo "1" > bar
+ $ hg add bar
+ $ hg ci -m "content-1"
+ created new head
+ $ hg up 0
+ 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+ $ hg graft 1
+ grafting 1:1c9eddb02162 "content-1" (tip)
+
+ $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'`
+
+ $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
+ $ cat hg.pid >> $DAEMON_PIDS
+
+ $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/1'
+ 404 Not Found
+ [1]
+ $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'file/tip/bar'
+ 200 Script output follows
+ $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'annotate/tip/bar'
+ 200 Script output follows
+
+ $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
+
+#endif
+
$ hg init a
$ cd a
$ touch foo