# HG changeset patch # User Matt Mackall # Date 1248737900 18000 # Node ID ac02b43bc08ae299bf77109fa71ffe6401d243ee # Parent 5ee916274ce0c5bbf3818204bff9eed4b9bad30d# Parent 2de7d96593db63a7a06c653feb7c761bbc9e208f Merge with crew diff -r 5ee916274ce0 -r ac02b43bc08a hgext/convert/darcs.py --- 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")) diff -r 5ee916274ce0 -r ac02b43bc08a mercurial/hg.py --- 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) diff -r 5ee916274ce0 -r ac02b43bc08a mercurial/mail.py --- 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: diff -r 5ee916274ce0 -r ac02b43bc08a mercurial/patch.py --- 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 diff -r 5ee916274ce0 -r ac02b43bc08a tests/hghave --- a/tests/hghave Mon Jul 27 18:38:03 2009 -0500 +++ b/tests/hghave Mon Jul 27 18:38:20 2009 -0500 @@ -39,7 +39,7 @@ try: import bzrlib return (bzrlib.__doc__ != None - and bzrlib.version_info[:2] == (1, 14)) + and bzrlib.version_info[:2] >= (1, 14)) except ImportError: return False