Mercurial > hg
comparison hgext/record.py @ 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 | b782a7eb9037 |
children | 226a328a7ff3 |
comparison
equal
deleted
inserted
replaced
11563:cd6884231db8 | 11564:9bbfeba33aa3 |
---|---|
484 dopatch = fp.tell() | 484 dopatch = fp.tell() |
485 fp.seek(0) | 485 fp.seek(0) |
486 | 486 |
487 # 3a. apply filtered patch to clean repo (clean) | 487 # 3a. apply filtered patch to clean repo (clean) |
488 if backups: | 488 if backups: |
489 hg.revert(repo, repo.dirstate.parents()[0], backups.has_key) | 489 hg.revert(repo, repo.dirstate.parents()[0], |
490 lambda key: key in backups) | |
490 | 491 |
491 # 3b. (apply) | 492 # 3b. (apply) |
492 if dopatch: | 493 if dopatch: |
493 try: | 494 try: |
494 ui.debug('applying patch\n') | 495 ui.debug('applying patch\n') |