##// END OF EJS Templates
merge with stable
Matt Mackall -
r16662:ea7bf1d4 merge default
parent child Browse files
Show More
@@ -585,11 +585,13 b' class cookietransportrequest(object):'
585 585 # inheritance with a new-style class.
586 586 class cookietransport(cookietransportrequest, xmlrpclib.Transport):
587 587 def __init__(self, use_datetime=0):
588 xmlrpclib.Transport.__init__(self, use_datetime)
588 if util.safehasattr(xmlrpclib.Transport, "__init__"):
589 xmlrpclib.Transport.__init__(self, use_datetime)
589 590
590 591 class cookiesafetransport(cookietransportrequest, xmlrpclib.SafeTransport):
591 592 def __init__(self, use_datetime=0):
592 xmlrpclib.SafeTransport.__init__(self, use_datetime)
593 if util.safehasattr(xmlrpclib.Transport, "__init__"):
594 xmlrpclib.SafeTransport.__init__(self, use_datetime)
593 595
594 596 class bzxmlrpc(bzaccess):
595 597 """Support for access to Bugzilla via the Bugzilla XMLRPC API.
@@ -85,10 +85,8 b' def uisetup(ui):'
85 85 (cmd not in ui.configlist('pager', 'ignore') and not attend))):
86 86 ui.setconfig('ui', 'formatted', ui.formatted())
87 87 ui.setconfig('ui', 'interactive', False)
88 try:
88 if util.safehasattr(signal, "SIGPIPE"):
89 89 signal.signal(signal.SIGPIPE, signal.SIG_DFL)
90 except ValueError:
91 pass
92 90 _runpager(p)
93 91 return orig(ui, options, cmd, cmdfunc)
94 92
@@ -135,7 +135,7 b' testhunk(PyObject *self, PyObject *args)'
135 135 return NULL;
136 136 alen = PyList_Size(a);
137 137 blen = PyList_Size(b);
138 if (alen > blen - bstart) {
138 if (alen > blen - bstart || bstart < 0) {
139 139 return Py_BuildValue("l", -1);
140 140 }
141 141 for (i = 0; i < alen; i++) {
@@ -1014,9 +1014,9 b' class hunk(object):'
1014 1014 oldstart = self.starta + top
1015 1015 newstart = self.startb + top
1016 1016 # zero length hunk ranges already have their start decremented
1017 if self.lena:
1017 if self.lena and oldstart > 0:
1018 1018 oldstart -= 1
1019 if self.lenb:
1019 if self.lenb and newstart > 0:
1020 1020 newstart -= 1
1021 1021 return old, oldstart, new, newstart
1022 1022
@@ -997,6 +997,26 b' import a unified diff with no lines of c'
997 997 c3
998 998 c4
999 999
1000 no segfault while importing a unified diff which start line is zero but chunk
1001 size is non-zero
1002
1003 $ hg init startlinezero
1004 $ cd startlinezero
1005 $ echo foo > foo
1006 $ hg commit -Amfoo
1007 adding foo
1008
1009 $ hg import --no-commit - << EOF
1010 > diff a/foo b/foo
1011 > --- a/foo
1012 > +++ b/foo
1013 > @@ -0,1 +0,1 @@
1014 > foo
1015 > EOF
1016 applying patch from stdin
1017
1018 $ cd ..
1019
1000 1020 Test corner case involving fuzz and skew
1001 1021
1002 1022 $ hg init morecornercases
General Comments 0
You need to be logged in to leave comments. Login now