comparison tests/test-hgweb-bundle.t @ 22223:c39d404f0eb0

hgweb: refresh repository using URL not path (issue4323) hgweb detects out-of-date repository instances (using a highly suspect mechanism that should probably be fixed) and obtains a new repository object if needed. This patch changes the repository object copy to use the repo URL (instead of path). This preserves more information about the source repository and allows bundles to be served through hgweb. A test verifying that bundles can now be served properly via `hg serve` has been added.
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 18 Aug 2014 12:12:57 -0700
parents
children aa4a1672583e
comparison
equal deleted inserted replaced
22222:883e8b6bd461 22223:c39d404f0eb0
1 #require serve
2
3 $ hg init server
4 $ cd server
5 $ cat >> .hg/hgrc << EOF
6 > [extensions]
7 > strip=
8 > EOF
9
10 $ echo 1 > foo
11 $ hg commit -A -m 'first'
12 adding foo
13 $ echo 2 > bar
14 $ hg commit -A -m 'second'
15 adding bar
16
17 Produce a bundle to use
18
19 $ hg strip -r 1
20 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
21 saved backup bundle to $TESTTMP/server/.hg/strip-backup/ed602e697e0f-backup.hg (glob)
22
23 Serve from a bundle file
24
25 $ hg serve -R .hg/strip-backup/ed602e697e0f-backup.hg -d -p $HGPORT --pid-file=hg.pid
26 $ cat hg.pid >> $DAEMON_PIDS
27
28 Ensure we're serving from the bundle
29
30 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/?style=raw')
31 200 Script output follows
32
33
34 -rw-r--r-- 2 bar
35 -rw-r--r-- 2 foo
36
37