[PATCH 1 of 4 phases] phases: store phase values in constant instead of using raw integer

Matt Mackall mpm at selenic.com
Fri Jan 6 03:43:55 UTC 2012


On Wed, 2012-01-04 at 01:19 +0100, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
> # Date 1325098119 -3600
> # Node ID 5bd197de486d13680484560fb56425bb503715ff
> # Parent  371cff9610cdf6d6a7e1a6238ce75441b8107f03
> phases: store phase values in constant instead of using raw integer
> 
> Phases constant are named after the phase name. Usage of integer have been
> replaced by proper constant.
> 
> diff --git a/mercurial/context.py b/mercurial/context.py
> --- a/mercurial/context.py
> +++ b/mercurial/context.py
> @@ -7,6 +7,7 @@
>  
>  from node import nullid, nullrev, short, hex
>  from i18n import _
> +from phases import public, draft

No "from" imports, please. You're not _, you're not important enough.

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial-devel mailing list