[PATCH 6 of 9] record extension: removed 'has_key' usage
Renato Cunha
renatoc at gmail.com
Thu Jul 1 20:56:50 CDT 2010
On Fri, Jul 02, 2010 at 01:33:37AM +0200, Mads Kiilerich wrote:
> backups is visible inside has_key, so couldn't it just be
>
> def has_key(key):
> return key in backups
> hg.revert(repo, repo.dirstate.parents()[0], has_key)
>
> or even
>
> hg.revert(repo, repo.dirstate.parents()[0], lambda key: key in backups)
Fair enough. But I believe Greg's suggestion is slightly better, as it is a
bit more direct. (Or not?)
--
Renato Cunha <http://renatocunha.com>
Blog: http://valedotrovao.com
"Do, or do not. There is no 'try'".
-- Jedi Master Yoda
More information about the Mercurial-devel
mailing list