Bug 4061 - hg serve should reload phase definition when they are changed
Summary: hg serve should reload phase definition when they are changed
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: hgweb (show other bugs)
Version: unspecified
Hardware: PC Linux
: normal bug
Assignee: Anton Shestakov
URL:
Keywords: easy
Depends on:
Blocks:
 
Reported: 2013-10-15 10:53 UTC by Arthur Lutz
Modified: 2015-01-22 15:04 UTC (History)
6 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arthur Lutz 2013-10-15 10:53 UTC
For a hg repo with two changesets, first one draft and second one private. I would like to be able to start hg serve, first pull gets only one changeset, then in another terminal hg phase -d 2 changes the secret cs to a draft on, the hg pull does not get this changeset. I have kill and start again the hg serve.
Comment 1 Matt Mackall 2013-10-15 12:42 UTC
The relevant code is here:

http://www.selenic.com/hg/file/5b327880a660/mercurial/hgweb/hgweb_mod.py#l105
Comment 2 HG Bot 2014-09-29 18:30 UTC
Fixed by http://selenic.com/repo/hg/rev/a111e460318a
Anton Shestakov <engored@ya.ru>
hgweb: refresh hgweb.repo on phase change (issue4061)

Make hgweb.refresh() also look at phaseroots file (in addition to 00changelog.i
file) and reload the repo when os.stat returns different mtime or size than
cached, signifying the file was modified.

This way if user changes phase of a changeset (secret <-> draft), there's no
need to restart hg serve to see the change.

(please test the fix)
Comment 3 Matt Mackall 2015-01-22 15:04 UTC
Bulk testing -> fixed