comparison hglib/client.py @ 147:98829bf71f10

util: define BytesIO in one place
author Matt Mackall <mpm@selenic.com>
date Fri, 13 Mar 2015 12:28:06 -0500
parents 8d7bf729a4db
children c1b966866ed7
comparison
equal deleted inserted replaced
146:8d7bf729a4db 147:98829bf71f10
1 import subprocess, os, struct, re, datetime 1 import subprocess, os, struct, re, datetime
2 try:
3 from io import BytesIO
4 except ImportError:
5 from cStringIO import StringIO as BytesIO
6 import hglib, error, util, templates, merge, context 2 import hglib, error, util, templates, merge, context
7 3
8 from util import b, cmdbuilder 4 from util import b, cmdbuilder, BytesIO
9 5
10 class revision(tuple): 6 class revision(tuple):
11 def __new__(cls, rev, node, tags, branch, author, desc, date): 7 def __new__(cls, rev, node, tags, branch, author, desc, date):
12 return tuple.__new__(cls, (rev, node, tags, branch, author, desc, date)) 8 return tuple.__new__(cls, (rev, node, tags, branch, author, desc, date))
13 9