summaryrefslogtreecommitdiff
path: root/hgext/hgcia.py
diff options
context:
space:
mode:
Diffstat (limited to 'hgext/hgcia.py')
-rw-r--r--hgext/hgcia.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/hgext/hgcia.py b/hgext/hgcia.py
index 075840a..6a3ea66 100644
--- a/hgext/hgcia.py
+++ b/hgext/hgcia.py
@@ -46,15 +46,17 @@ from mercurial.node import bin, short
from mercurial import cmdutil, patch, templater, util, mail
import email.Parser
-import socket, xmlrpclib
+import xmlrpclib
from xml.sax import saxutils
-testedwith = 'internal'
socket_timeout = 30 # seconds
-if util.safehasattr(socket, 'setdefaulttimeout'):
+try:
# set a timeout for the socket so you don't have to wait so looooong
# when cia.vc is having problems. requires python >= 2.3:
+ import socket
socket.setdefaulttimeout(socket_timeout)
+except:
+ pass
HGCIA_VERSION = '0.1'
HGCIA_URL = 'http://hg.kublai.com/mercurial/hgcia'
@@ -111,7 +113,7 @@ class ciamsg(object):
# diffstat is stupid
self.name = 'cia'
def write(self, data):
- self.lines += data.splitlines(True)
+ self.lines.append(data)
def close(self):
pass