Mercurial > public > mercurial-scm > hg
diff hgext/convert/common.py @ 5127:39b6eaee6fd7
convert: replace fork with subprocess call.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 06 Aug 2007 21:49:26 +0200 |
parents | ef338e34a906 |
children | d4fa6bafc43a |
line wrap: on
line diff
--- a/hgext/convert/common.py Thu Aug 02 23:38:32 2007 +0200 +++ b/hgext/convert/common.py Mon Aug 06 21:49:26 2007 +0200 @@ -1,4 +1,19 @@ # common code for the convert extension +import base64 +import cPickle as pickle + +def encodeargs(args): + def encodearg(s): + lines = base64.encodestring(s) + lines = [l.splitlines()[0] for l in lines] + return ''.join(lines) + + s = pickle.dumps(args) + return encodearg(s) + +def decodeargs(s): + s = base64.decodestring(s) + return pickle.loads(s) class NoRepo(Exception): pass @@ -118,3 +133,4 @@ """Put tags into sink. tags: {tagname: sink_rev_id, ...}""" raise NotImplementedError() +