[PATCH 2 of 3] phases: make advance/retractboundary() atomic
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Sat May 12 06:23:29 CDT 2012
On Sat, May 12, 2012 at 12:22:18PM +0200, Patrick Mézard wrote:
>
> I see what you mean now:
>
> - repo._phasecache.replace(phcache)
> + repo._phasecache = phcache
Ok... I must have woke too early, I though you *were* using the "reassignement"
version (repo._phasecache = phcache)
I'm perfectly ok with the way you are doing it.
> Maybe. Sure it is simpler and does not require to maintain .replace(). Buf if
> people start referencing phasecache objects, even in short-lived scope like
> we often do to save fields lookups, they will hit strange, hard to debug
> problems (I hit exactly this with repo.changelog before writing the comment
> in .phase())
+1
--
Pierre-Yves
More information about the Mercurial-devel
mailing list