Mercurial > hg-stable
changeset 9138:5e5a91e39642
merge with mpm
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Wed, 15 Jul 2009 00:24:20 +0200 |
parents | 6f95c756d9fa (diff) 294c5e460b36 (current diff) |
children | 6d1f9238824e |
files | |
diffstat | 13 files changed, 19 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/hgdiff Tue Jul 14 12:18:22 2009 -0500 +++ b/contrib/hgdiff Wed Jul 15 00:24:20 2009 +0200 @@ -38,13 +38,13 @@ def diff_files(file1, file2): if file1 is None: - b = file(file2).read().splitlines(1) + b = file(file2).read().splitlines(True) l1 = "--- %s\n" % (file2) l2 = "+++ %s\n" % (file2) l3 = "@@ -0,0 +1,%d @@\n" % len(b) l = [l1, l2, l3] + ["+" + e for e in b] elif file2 is None: - a = file(file1).read().splitlines(1) + a = file(file1).read().splitlines(True) l1 = "--- %s\n" % (file1) l2 = "+++ %s\n" % (file1) l3 = "@@ -1,%d +0,0 @@\n" % len(a) @@ -52,8 +52,8 @@ else: t1 = file(file1).read() t2 = file(file2).read() - l1 = t1.splitlines(1) - l2 = t2.splitlines(1) + l1 = t1.splitlines(True) + l2 = t2.splitlines(True) if options.difflib: l = difflib.unified_diff(l1, l2, file1, file2) else:
--- a/hgext/convert/hg.py Tue Jul 14 12:18:22 2009 -0500 +++ b/hgext/convert/hg.py Wed Jul 15 00:24:20 2009 +0200 @@ -183,7 +183,7 @@ tagparent = nullid try: - oldlines = sorted(parentctx['.hgtags'].data().splitlines(1)) + oldlines = sorted(parentctx['.hgtags'].data().splitlines(True)) except: oldlines = []
--- a/hgext/hgcia.py Tue Jul 14 12:18:22 2009 -0500 +++ b/hgext/hgcia.py Wed Jul 15 00:24:20 2009 +0200 @@ -205,7 +205,7 @@ msg['From'] = self.emailfrom msg['Subject'] = 'DeliverXML' msg['Content-type'] = 'text/xml' - msgtext = msg.as_string(0) + msgtext = msg.as_string() self.ui.status(_('hgcia: sending update to %s\n') % address) mail.sendmail(self.ui, util.email(self.emailfrom),
--- a/hgext/notify.py Tue Jul 14 12:18:22 2009 -0500 +++ b/hgext/notify.py Wed Jul 15 00:24:20 2009 +0200 @@ -221,7 +221,7 @@ hash(self.repo.root), socket.getfqdn())) msg['To'] = ', '.join(self.subs) - msgtext = msg.as_string(0) + msgtext = msg.as_string() if self.test: self.ui.write(msgtext) if not msgtext.endswith('\n'):
--- a/mercurial/commands.py Tue Jul 14 12:18:22 2009 -0500 +++ b/mercurial/commands.py Wed Jul 15 00:24:20 2009 +0200 @@ -1448,7 +1448,7 @@ if not doc: doc = _("(no help text available)") if ui.quiet: - doc = doc.splitlines(0)[0] + doc = doc.splitlines()[0] ui.write("\n%s\n" % doc.rstrip()) if not ui.quiet: @@ -1476,7 +1476,7 @@ doc = gettext(e[0].__doc__) if not doc: doc = _("(no help text available)") - h[f] = doc.splitlines(0)[0].rstrip() + h[f] = doc.splitlines()[0].rstrip() cmds[f] = c.lstrip("^") if not h: @@ -1523,7 +1523,7 @@ raise error.UnknownCommand(name) doc = gettext(mod.__doc__) or _('no help text available') - doc = doc.splitlines(0) + doc = doc.splitlines() ui.write(_('%s extension - %s\n') % (name.split('.')[-1], doc[0])) for d in doc[1:]: ui.write(d, '\n')
--- a/mercurial/config.py Tue Jul 14 12:18:22 2009 -0500 +++ b/mercurial/config.py Wed Jul 15 00:24:20 2009 +0200 @@ -82,7 +82,7 @@ line = 0 cont = 0 - for l in data.splitlines(1): + for l in data.splitlines(True): line += 1 if cont: m = contre.match(l)
--- a/mercurial/context.py Tue Jul 14 12:18:22 2009 -0500 +++ b/mercurial/context.py Wed Jul 15 00:24:20 2009 +0200 @@ -443,7 +443,7 @@ del hist[p] hist[f] = curr - return zip(hist[f][0], hist[f][1].splitlines(1)) + return zip(hist[f][0], hist[f][1].splitlines(True)) def ancestor(self, fc2): """
--- a/mercurial/extensions.py Tue Jul 14 12:18:22 2009 -0500 +++ b/mercurial/extensions.py Wed Jul 15 00:24:20 2009 +0200 @@ -173,6 +173,6 @@ doc = (gettext(ext.__doc__) or _('(no help text available)')) ename = ename.split('.')[-1] maxlength = max(len(ename), maxlength) - exts[ename] = doc.splitlines(0)[0].strip() + exts[ename] = doc.splitlines()[0].strip() return exts, maxlength
--- a/mercurial/hgweb/webcommands.py Tue Jul 14 12:18:22 2009 -0500 +++ b/mercurial/hgweb/webcommands.py Wed Jul 15 00:24:20 2009 +0200 @@ -65,7 +65,7 @@ text = '(binary:%s)' % mt def lines(): - for lineno, t in enumerate(text.splitlines(1)): + for lineno, t in enumerate(text.splitlines(True)): yield {"line": t, "lineid": "l%d" % (lineno + 1), "linenumber": "% 6d" % (lineno + 1),
--- a/mercurial/localrepo.py Tue Jul 14 12:18:22 2009 -0500 +++ b/mercurial/localrepo.py Wed Jul 15 00:24:20 2009 +0200 @@ -473,9 +473,8 @@ latest = newnodes.pop() if latest not in bheads: continue - reachable = set() - for bh in bheads: - reachable |= self.changelog.reachable(latest, bh) + minbhrev = self[min([self[bh].rev() for bh in bheads])].node() + reachable = self.changelog.reachable(latest, minbhrev) bheads = [b for b in bheads if b not in reachable] newbheads.insert(0, latest) bheads.extend(newbheads)
--- a/mercurial/templatefilters.py Tue Jul 14 12:18:22 2009 -0500 +++ b/mercurial/templatefilters.py Wed Jul 15 00:24:20 2009 +0200 @@ -73,7 +73,7 @@ def firstline(text): '''return the first line of text''' try: - return text.splitlines(1)[0].rstrip('\r\n') + return text.splitlines(True)[0].rstrip('\r\n') except IndexError: return ''
--- a/mercurial/url.py Tue Jul 14 12:18:22 2009 -0500 +++ b/mercurial/url.py Wed Jul 15 00:24:20 2009 +0200 @@ -388,6 +388,7 @@ if urlparts[0] == 'https': # only use CONNECT for HTTPS if ':' in urlparts[1]: realhost, realport = urlparts[1].split(':') + realport = int(realport) else: realhost = urlparts[1] realport = 443
--- a/tests/test-fetch Tue Jul 14 12:18:22 2009 -0500 +++ b/tests/test-fetch Wed Jul 15 00:24:20 2009 +0200 @@ -194,7 +194,7 @@ hg --cwd i1726r1 ci -m second echo c > i1726r2/a hg --cwd i1726r2 ci -m third -HGMERGE=true hg --cwd i1726r2 fetch ../i1726r1 | sed 's/new changeset 3:[0-9a-zA-Z]\+/new changeset 3/' +HGMERGE=true hg --cwd i1726r2 fetch ../i1726r1 | sed 's/new changeset 3:[0-9a-zA-Z]* /new changeset 3 /' hg --cwd i1726r2 heads default --template '{rev}\n' "$TESTDIR/killdaemons.py"