Mercurial > hg > crecord
changeset 44:88dcdf9fc50c
crecord: modify to permit use of either encoding or util module (prevents problems with older mercurial versions)
author | Mark Edgington <edgimar@gmail.com> |
---|---|
date | Sat, 06 Jun 2009 22:35:48 +0200 |
parents | 3da2e3be7333 |
children | 946b2961c490 |
files | crecord/chunk_selector.py |
diffstat | 1 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/crecord/chunk_selector.py +++ b/crecord/chunk_selector.py @@ -1,6 +1,16 @@ from mercurial.i18n import gettext, _ from mercurial import cmdutil, commands, extensions, hg, mdiff -from mercurial import util, encoding +from mercurial import util + +# accomodate older versions where encoding module doesn't yet exist +from mercurial import demandimport +demandimport.ignore.append('mercurial.encoding') +try: + import mercurial.encoding as encoding +except: + encoding = util + + import copy, cStringIO, errno, operator, os, re, tempfile