[PATCH] bookmarks: introduce a bmstore to manage bookmark persistence

Kevin Bullock kbullock+mercurial at ringworld.org
Thu Nov 8 10:25:24 CST 2012


On 7 Nov 2012, at 6:51 PM, Augie Fackler wrote:

> # HG changeset patch
> # User Augie Fackler <raf at durin42.com>
> # Date 1352326899 21600
> # Node ID 331cd9e8db4b21a77831b90561c570a7b4a60bf0
> # Parent  fb14a5dcdc62987512820531fe60719d650491b6
> bookmarks: introduce a bmstore to manage bookmark persistence
> 
> Bookmarks persistence still showed a fair amount of its legacy as a
> monkeypatching extension. This encapsulates all bookmarks
> serialization and parsing in a single class, and offers a single
> location where other bookmarks storage engines can be substituted
> in. As a result, many files no longer import the bookmarks module,
> which strikes me as an encapsulation win.

With this, we've still got some strange calling back-and-forth between bmstore and localrepo (bmstore calling methods on localrepo to get at its _own_ state), but wrapping it in a class is a big _layering_ win.

It was a bit hard to sort out all the re-indenting in bookmarks.py in a single patch, but I think it looks good. I agree w/Adrian's comments, but other than that I'm +1.

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock



More information about the Mercurial-devel mailing list