Show More
@@ -36,6 +36,10 b' class darcs_source(converter_source, com' | |||||
36 | raise NoRepo("%s does not look like a darcs repo" % path) |
|
36 | raise NoRepo("%s does not look like a darcs repo" % path) | |
37 |
|
37 | |||
38 | checktool('darcs') |
|
38 | checktool('darcs') | |
|
39 | version = self.run0('--version').splitlines()[0].strip() | |||
|
40 | if version < '2.1': | |||
|
41 | raise util.Abort(_('darcs version 2.1 or newer needed (found %r)') % | |||
|
42 | version) | |||
39 |
|
43 | |||
40 | if ElementTree is None: |
|
44 | if ElementTree is None: | |
41 | raise util.Abort(_("Python ElementTree module is not available")) |
|
45 | raise util.Abort(_("Python ElementTree module is not available")) |
@@ -138,7 +138,7 b' def share(ui, source, dest=None, update=' | |||||
138 | try: |
|
138 | try: | |
139 | uprev = r.lookup(test) |
|
139 | uprev = r.lookup(test) | |
140 | break |
|
140 | break | |
141 | except: |
|
141 | except LookupError: | |
142 | continue |
|
142 | continue | |
143 | _update(r, uprev) |
|
143 | _update(r, uprev) | |
144 |
|
144 |
@@ -36,7 +36,10 b' def _smtp(ui):' | |||||
36 | if username and password: |
|
36 | if username and password: | |
37 | ui.note(_('(authenticating to mail server as %s)\n') % |
|
37 | ui.note(_('(authenticating to mail server as %s)\n') % | |
38 | (username)) |
|
38 | (username)) | |
39 | s.login(username, password) |
|
39 | try: | |
|
40 | s.login(username, password) | |||
|
41 | except smtplib.SMTPException, inst: | |||
|
42 | raise util.Abort(inst) | |||
40 |
|
43 | |||
41 | def send(sender, recipients, msg): |
|
44 | def send(sender, recipients, msg): | |
42 | try: |
|
45 | try: |
@@ -182,6 +182,7 b' def readgitpatch(lr):' | |||||
182 | lineno = 0 |
|
182 | lineno = 0 | |
183 | for line in lr: |
|
183 | for line in lr: | |
184 | lineno += 1 |
|
184 | lineno += 1 | |
|
185 | line = line.rstrip(' \r\n') | |||
185 | if line.startswith('diff --git'): |
|
186 | if line.startswith('diff --git'): | |
186 | m = gitre.match(line) |
|
187 | m = gitre.match(line) | |
187 | if m: |
|
188 | if m: | |
@@ -200,23 +201,23 b' def readgitpatch(lr):' | |||||
200 | continue |
|
201 | continue | |
201 | if line.startswith('rename from '): |
|
202 | if line.startswith('rename from '): | |
202 | gp.op = 'RENAME' |
|
203 | gp.op = 'RENAME' | |
203 |
gp.oldpath = line[12:] |
|
204 | gp.oldpath = line[12:] | |
204 | elif line.startswith('rename to '): |
|
205 | elif line.startswith('rename to '): | |
205 |
gp.path = line[10:] |
|
206 | gp.path = line[10:] | |
206 | elif line.startswith('copy from '): |
|
207 | elif line.startswith('copy from '): | |
207 | gp.op = 'COPY' |
|
208 | gp.op = 'COPY' | |
208 |
gp.oldpath = line[10:] |
|
209 | gp.oldpath = line[10:] | |
209 | elif line.startswith('copy to '): |
|
210 | elif line.startswith('copy to '): | |
210 |
gp.path = line[8:] |
|
211 | gp.path = line[8:] | |
211 | elif line.startswith('deleted file'): |
|
212 | elif line.startswith('deleted file'): | |
212 | gp.op = 'DELETE' |
|
213 | gp.op = 'DELETE' | |
213 | # is the deleted file a symlink? |
|
214 | # is the deleted file a symlink? | |
214 |
gp.setmode(int(line |
|
215 | gp.setmode(int(line[-6:], 8)) | |
215 | elif line.startswith('new file mode '): |
|
216 | elif line.startswith('new file mode '): | |
216 | gp.op = 'ADD' |
|
217 | gp.op = 'ADD' | |
217 |
gp.setmode(int(line |
|
218 | gp.setmode(int(line[-6:], 8)) | |
218 | elif line.startswith('new mode '): |
|
219 | elif line.startswith('new mode '): | |
219 |
gp.setmode(int(line |
|
220 | gp.setmode(int(line[-6:], 8)) | |
220 | elif line.startswith('GIT binary patch'): |
|
221 | elif line.startswith('GIT binary patch'): | |
221 | dopatch |= GP_BINARY |
|
222 | dopatch |= GP_BINARY | |
222 | gp.binary = True |
|
223 | gp.binary = True |
@@ -39,7 +39,7 b' def has_bzr114():' | |||||
39 | try: |
|
39 | try: | |
40 | import bzrlib |
|
40 | import bzrlib | |
41 | return (bzrlib.__doc__ != None |
|
41 | return (bzrlib.__doc__ != None | |
42 |
and bzrlib.version_info[:2] |
|
42 | and bzrlib.version_info[:2] >= (1, 14)) | |
43 | except ImportError: |
|
43 | except ImportError: | |
44 | return False |
|
44 | return False | |
45 |
|
45 |
General Comments 0
You need to be logged in to leave comments.
Login now