changeset 11564:9bbfeba33aa3

record: removed 'has_key' usage Py3k has removed the dictionary has_key method. This patch implements a one argument function that can be used as a callback by hg.revert in the record extension.
author Renato Cunha <renatoc@gmail.com>
date Wed, 14 Jul 2010 22:58:29 -0300
parents cd6884231db8
children 7546d4a272c8
files hgext/record.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/record.py	Wed Jul 14 21:30:50 2010 +0200
+++ b/hgext/record.py	Wed Jul 14 22:58:29 2010 -0300
@@ -486,7 +486,8 @@
 
             # 3a. apply filtered patch to clean repo  (clean)
             if backups:
-                hg.revert(repo, repo.dirstate.parents()[0], backups.has_key)
+                hg.revert(repo, repo.dirstate.parents()[0],
+                          lambda key: key in backups)
 
             # 3b. (apply)
             if dopatch: