Last Comment Bug 623505 - Update to recent Mercurial (2.0.2)
: Update to recent Mercurial (2.0.2)
[downtime 1/13 9am-12pm PST]
Product: Graveyard
Classification: Graveyard
Component: Server Operations (show other bugs)
: other
: All All
-- normal (vote)
: ---
Assigned To: Corey Shields [:cshields]
: Corey Shields [:cshields]
Depends on: 666870 718155 718172 718186 718221 718241 718251 718354 718492 718562
Blocks: 653625
  Show dependency treegraph
Reported: 2011-01-06 05:33 PST by timeless
Modified: 2015-03-12 08:17 PDT (History)
32 users (show)
lukasblakk+bugs: needs‑treeclosure+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---

Patch against (4.50 KB, patch)
2011-08-24 11:29 PDT, Noah Meyerhans [:noahm]
no flags Details | Diff | Splinter Review

Description User image timeless 2011-01-06 05:33:28 PST
Currently we're on hg 1.5.4 (something 6 months old). Hg 1.7.3 was just released, we should at least get to 1.7.something so we're not on an old version.

To do this, someone needs to test our hooks+extensions+templates ala bug 511305 and ensure everything works fine (and passes all the unit tests).

Upgrading to 1.7+ gives support for pushable bookmarks

please? thanks :)
Comment 1 User image Dirkjan Ochtman (:djc) 2011-01-06 05:44:16 PST
Just to be sure, don't deploy 1.7 (1.7.1 is an unscheduled bugfix release). But 1.7.3 probably makes the most sense anyway.
Comment 2 User image Ted Mielczarek [:ted.mielczarek] 2011-01-06 06:07:33 PST
I had to update the hgpoller test harness to work with hg 1.7, but after doing that all the hook and pushlog tests pass for me with:
Mercurial Distributed SCM (version 1.7.3+2-5d1bb1174047)
Comment 3 User image Aravind Gottipati [:aravind] 2011-01-14 10:23:30 PST
Toss this back to us, when you guys are happy it all works well?  You have access to the staging server so feel free to hack on things there all you want.
Comment 4 User image Gary Kwong [:gkw] [:nth10sd] 2011-02-16 21:32:10 PST
While everyone's at it... there's Mercurial 1.7.5 for some weeks now, and possibly another version once March comes along...
Comment 5 User image Chris AtLee [:catlee] 2011-02-17 04:49:50 PST
If it matters at all, all the build slaves are going to be 1.6 or 1.7 shortly.
Comment 6 User image Noah Meyerhans [:noahm] 2011-08-23 18:22:11 PDT
Investigating a possible 1.9 upgrade, I've identified a problem caused by something in our templates.  Attempting to serve hgweb with our templates enabled results in the following exception. Using a standard template resolves the problem.  I haven't had a chance yet to investigate in depth.

mod_wsgi (pid=1919): Exception occurred processing WSGI script '/repo/hg/webroot_wsgi/hgwebdir.wsgi'.
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/mercurial/", line 247, in increasingchunks
    for chunk in source:
  File "/usr/lib/python2.4/site-packages/mercurial/", line 214, in _flatten
    for j in _flatten(i):
  File "/usr/lib/python2.4/site-packages/mercurial/", line 207, in _flatten
    for i in thing:
  File "/usr/lib/python2.4/site-packages/mercurial/hgweb/", line 245, in header
    yield tmpl('header', encoding=encoding.encoding, **map)
  File "/usr/lib/python2.4/site-packages/mercurial/", line 329, in __call__
    stream = proc.process(t, mapping)
  File "/usr/lib/python2.4/site-packages/mercurial/", line 263, in process
    return _flatten(func(self, mapping, data) for func, data in
  File "/usr/lib/python2.4/site-packages/mercurial/", line 256, in _load
    self._cache[t] = compiletemplate(self._loader(t), self)
  File "/usr/lib/python2.4/site-packages/mercurial/", line 93, in compiletemplate
    parseres, pos = p.parse(pd)
  File "/usr/lib/python2.4/site-packages/mercurial/", line 82, in parse
    res = self._parse()
  File "/usr/lib/python2.4/site-packages/mercurial/", line 42, in _parse
    token, value, pos = self._advance()
  File "/usr/lib/python2.4/site-packages/mercurial/", line 31, in _advance
    self.current =
  File "/usr/lib/python2.4/site-packages/mercurial/", line 70, in tokenizer
    raise error.ParseError(_("syntax error"), pos)
ParseError: ('syntax error', 469)
Comment 7 User image Axel Hecht [:Pike] 2011-08-24 00:12:44 PDT
Do you have the patch from bug 666870 applied? changes the header template, which this seems to stumble upon.
Comment 8 User image Noah Meyerhans [:noahm] 2011-08-24 11:08:19 PDT
Cool, that patch seems to fix the problem on my test system. Thanks Axel.
Comment 9 User image Noah Meyerhans [:noahm] 2011-08-24 11:29:00 PDT
Created attachment 555466 [details] [diff] [review]
Patch against

I've refreshed the patch from bug 666870 such that it applies against the current contents of with their inline JS and CSS.
Comment 10 User image Gary Kwong [:gkw] [:nth10sd] 2011-10-29 10:49:20 PDT
Mercurial 2.0 is about to be released probably at the start of November:
Comment 11 User image Chris AtLee [:catlee] 2011-12-08 23:03:29 PST
I think upgrading will greatly improve how long it takes to push to try. See
Comment 12 User image Dustin J. Mitchell [:dustin] 2011-12-13 14:56:31 PST
This is a server-ops task.

At the moment, this looks like something we could mix in during the move to scl3, which means Q1/Q2 of 2012.  Doing it earlier than that will preclude already-defererd maintenance and refactoring that we really need to take care of.
Comment 13 User image Shyam Mani [:fox2mike] (AFK until March 10) 2011-12-14 00:58:27 PST
Punting to cshields, this is for SCL3.
Comment 14 User image Ted Mielczarek [:ted.mielczarek] 2011-12-14 05:00:02 PST
Generally what we've done to sanity check a new version of Mercurial is:
1) Run the unit tests in the hghooks repository ( , it's just with the new version, verify that they all pass.
2) Run the unit tests in the pushlog repository ( , again) with the new version, verify that they all pass
3) Setup the new version with the hooks + extensions + templates on a staging server (Aravind created hgstage a while ago for this purpose) and manually verify that things look okay in the HTML interface.

The first two steps should verify that none of our custom hooks or extensions are broken. The third step is just a sanity check because it's hard to test that the HTML templates produce proper output.
Comment 15 User image matthew zeier [:mrz] 2011-12-22 07:45:30 PST
Mozilla hg infrastructure suffers from a lack of internal documentation.  

So what sounds like a simple upgrade isn't.  We're working on back filling documentation but I'm real hesitant to push hard on this because a) it's working and b) no documentation and c) if it breaks and we can't back out correctly, we have big issues.

Incidentally, we just learned there's a staging hg server (yep, no documentation).  This might help things go quicker but it's sat dormant since Aravind left and I'm unsure of the state.
Comment 16 User image Ted Mielczarek [:ted.mielczarek] 2011-12-27 10:09:58 PST
Comment on attachment 555466 [details] [diff] [review]
Patch against

I pushed this on a new hg_1_6+_updates branch:

I'll merge it to default when we're ready to roll out the new hg to production.
Comment 17 User image Ted Mielczarek [:ted.mielczarek] 2011-12-27 10:12:11 PST
Okay, I've run the hghooks tests and the pushlog tests with hg 2.0.1 on my local system, and they all pass (after applying that templates patch).

This was on:
Mercurial Distributed SCM (version 2.0.1+32-32a6e00e4cfe)
Comment 18 User image Corey Shields [:cshields] 2011-12-27 19:10:39 PST
going to draft up upgrade/backout docs and see if we can do this soon.  Will touch base with ted tomorrow on some additional requests he had for testing on irc when we got distracted by an outage.
Comment 19 User image John O'Duinn [:joduinn] (please use "needinfo?" flag) 2012-01-06 10:17:55 PST
per email w/cshields, this might be ready to happen next week - pending some last testing. cshields will let us know for certain once he's ready. Flagging for downtime, so buildduty are aware.
Comment 20 User image Chris Cooper [:coop] 2012-01-10 09:53:31 PST
Corey: we need a downtime this week for bug 715026 and bug 715478 - would this be ready for a ride-along on that downtime?
Comment 21 User image Corey Shields [:cshields] 2012-01-12 07:02:10 PST
We will be doing this with the tree closure on 1/13.

For those of you interested I've outlined the steps we'll be following here:

Backchannel will be #it for the hg portion of the downtime.

During the downtime, external ssh based connections will fail and http connections will show a hardhat page.  Anyone connected to a VPN at the time may still be able to pull, tree closure hooks should prevent anything from pushing, but in any case I'd appreciate no attempts either way until the maintenance is done.
Comment 22 User image Peter Retzer (:pretzer) 2012-01-12 08:55:19 PST
FYI: The current Mercurial version is 2.0.2 released on 01-01-2012.

Is it too late to use that version?
Comment 23 User image Corey Shields [:cshields] 2012-01-12 09:52:54 PST
(In reply to pretzer from comment #22)
> FYI: The current Mercurial version is 2.0.2 released on 01-01-2012. 
> Is it too late to use that version?

I'll try to get this built and tested before the window.
Comment 24 User image Jonathan Griffin (:jgriffin) 2012-01-13 17:05:00 PST
This update seems to be causing raw HTML files to be served as application/binary; before the update they were served as text/html.  Example url:

Is this a deliberate side-effect of the upgrade?
Comment 25 User image Corey Shields [:cshields] 2012-01-13 21:31:47 PST
(In reply to Jonathan Griffin (:jgriffin) from comment #24)
> This update seems to be causing raw HTML files to be served as
> application/binary; before the update they were served as text/html. 
> Example url:
> testing/tps/pages/page1.html
> Is this a deliberate side-effect of the upgrade?

Yes, as of 1.9.1 that is the behavior, and we are now at 2.0.2. See

Well, this upgrade wasn't as clean as I would have liked but it is done for now.  We still have a lot of work to do on revamping and improving the hg infrastructure but I hope this will help.

There were a lot of hgweb changes (nothing real cosmetic - mostly shifts in backend files) so if something appears to look strange file a bug for it.  In addition if something does not appear at all where it use to, there may be a stuck pushlog entry - we had a bit of time where hooks were executing out of order and ended up clogging some trees.

Thanks for assistance goes out to ted, callek, catlee, lsblakk, philor, atoll, fox2mike

Note You need to log in before you can comment on or make changes to this bug.