Mercurial > hg
changeset 9248:ac02b43bc08a
Merge with crew
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 27 Jul 2009 18:38:20 -0500 |
parents | 5ee916274ce0 (current diff) 2de7d96593db (diff) |
children | f9087eea293a 74e717a21779 |
files | mercurial/hg.py mercurial/patch.py |
diffstat | 5 files changed, 18 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/darcs.py Mon Jul 27 18:38:03 2009 -0500 +++ b/hgext/convert/darcs.py Mon Jul 27 18:38:20 2009 -0500 @@ -36,6 +36,10 @@ raise NoRepo("%s does not look like a darcs repo" % path) checktool('darcs') + version = self.run0('--version').splitlines()[0].strip() + if version < '2.1': + raise util.Abort(_('darcs version 2.1 or newer needed (found %r)') % + version) if ElementTree is None: raise util.Abort(_("Python ElementTree module is not available"))
--- a/mercurial/hg.py Mon Jul 27 18:38:03 2009 -0500 +++ b/mercurial/hg.py Mon Jul 27 18:38:20 2009 -0500 @@ -138,7 +138,7 @@ try: uprev = r.lookup(test) break - except: + except LookupError: continue _update(r, uprev)
--- a/mercurial/mail.py Mon Jul 27 18:38:03 2009 -0500 +++ b/mercurial/mail.py Mon Jul 27 18:38:20 2009 -0500 @@ -36,7 +36,10 @@ if username and password: ui.note(_('(authenticating to mail server as %s)\n') % (username)) - s.login(username, password) + try: + s.login(username, password) + except smtplib.SMTPException, inst: + raise util.Abort(inst) def send(sender, recipients, msg): try:
--- a/mercurial/patch.py Mon Jul 27 18:38:03 2009 -0500 +++ b/mercurial/patch.py Mon Jul 27 18:38:20 2009 -0500 @@ -182,6 +182,7 @@ lineno = 0 for line in lr: lineno += 1 + line = line.rstrip(' \r\n') if line.startswith('diff --git'): m = gitre.match(line) if m: @@ -200,23 +201,23 @@ continue if line.startswith('rename from '): gp.op = 'RENAME' - gp.oldpath = line[12:].rstrip() + gp.oldpath = line[12:] elif line.startswith('rename to '): - gp.path = line[10:].rstrip() + gp.path = line[10:] elif line.startswith('copy from '): gp.op = 'COPY' - gp.oldpath = line[10:].rstrip() + gp.oldpath = line[10:] elif line.startswith('copy to '): - gp.path = line[8:].rstrip() + gp.path = line[8:] elif line.startswith('deleted file'): gp.op = 'DELETE' # is the deleted file a symlink? - gp.setmode(int(line.rstrip()[-6:], 8)) + gp.setmode(int(line[-6:], 8)) elif line.startswith('new file mode '): gp.op = 'ADD' - gp.setmode(int(line.rstrip()[-6:], 8)) + gp.setmode(int(line[-6:], 8)) elif line.startswith('new mode '): - gp.setmode(int(line.rstrip()[-6:], 8)) + gp.setmode(int(line[-6:], 8)) elif line.startswith('GIT binary patch'): dopatch |= GP_BINARY gp.binary = True