[PATCH 2 of 2] hgweb: generate archive links in order

Sean Farley sean at farley.io
Sat Jan 7 22:08:08 EST 2017


Anton Shestakov <av6 at dwimlabs.net> writes:

> # HG changeset patch
> # User Anton Shestakov <av6 at dwimlabs.net>
> # Date 1483807974 -28800
> #      Sun Jan 08 00:52:54 2017 +0800
> # Node ID cfd14b0508ddf8edf156d202e2c5d07b259c2f46
> # Parent  3cecf85b42c6cf3e2d81ff5d69e9328bb204d209
> hgweb: generate archive links in order
>
> It would be nice for archive links to always be in a certain commonly used
> order, such as 'zip', 'bz', 'gzip2'. Repo index page (hgwebdir_mod) already
> shows archive links in this order, let's do the same in hgweb_mod.
>
> Sadly, archivespecs is a regular unordered dict, and collections.OrderedDict is
> new in 2.7. But requestcontext.archives is a tuple of archive types, so it can
> be used as an index to archivespecs.

Sure, this looks good to me.


More information about the Mercurial-devel mailing list