Mercurial > hg > crecord
changeset 73:1164bfd10266
- a couple small changes to maintain backward compatibility with hg 1.1
author | Mark Edgington <edgimar@gmail.com> |
---|---|
date | Mon, 16 Aug 2010 12:49:12 +0200 |
parents | f9655697ea60 |
children | 70d6827d977a |
files | crecord/crecord_core.py |
diffstat | 1 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/crecord/crecord_core.py +++ b/crecord/crecord_core.py @@ -20,8 +20,12 @@ import chunk_selector def dorecord(ui, repo, commitfunc, *pats, **opts): - if not ui.interactive(): - raise util.Abort(_('running non-interactively, use commit instead')) + try: + if not ui.interactive(): + raise util.Abort(_('running non-interactively, use commit instead')) + except TypeError: # backwards compatibility with hg 1.1 + if not ui.interactive: + raise util.Abort(_('running non-interactively, use commit instead')) def recordfunc(ui, repo, message, match, opts): """This is generic record driver. @@ -117,8 +121,11 @@ ui.debug('applying patch\n') ui.debug(fp.getvalue()) pfiles = {} - patch.internalpatch(fp, ui, 1, repo.root, files=pfiles, - eolmode=None) + try: + patch.internalpatch(fp, ui, 1, repo.root, files=pfiles, + eolmode=None) + except TypeError: # backwards compatilibity with hg 1.1 + patch.internalpatch(fp, ui, 1, repo.root, files=pfiles) patch.updatedir(ui, repo, pfiles) except patch.PatchError, err: s = str(err)