equal
deleted
inserted
replaced
192 self.prevmodule = None |
192 self.prevmodule = None |
193 self.rootmodule = self.module |
193 self.rootmodule = self.module |
194 self.commits = {} |
194 self.commits = {} |
195 self.paths = {} |
195 self.paths = {} |
196 self.uuid = svn.ra.get_uuid(self.ra).decode(self.encoding) |
196 self.uuid = svn.ra.get_uuid(self.ra).decode(self.encoding) |
197 except SubversionException, e: |
197 except SubversionException: |
198 ui.print_exc() |
198 ui.print_exc() |
199 raise NoRepo("%s does not look like a Subversion repo" % self.url) |
199 raise NoRepo("%s does not look like a Subversion repo" % self.url) |
200 |
200 |
201 if rev: |
201 if rev: |
202 try: |
202 try: |
213 raise util.Abort(_('svn: start revision %s is not an integer') |
213 raise util.Abort(_('svn: start revision %s is not an integer') |
214 % self.startrev) |
214 % self.startrev) |
215 |
215 |
216 try: |
216 try: |
217 self.get_blacklist() |
217 self.get_blacklist() |
218 except IOError, e: |
218 except IOError: |
219 pass |
219 pass |
220 |
220 |
221 self.head = self.latest(self.module, latest) |
221 self.head = self.latest(self.module, latest) |
222 if not self.head: |
222 if not self.head: |
223 raise util.Abort(_('no revision found in module %s') % |
223 raise util.Abort(_('no revision found in module %s') % |
244 def exists(self, path, optrev): |
244 def exists(self, path, optrev): |
245 try: |
245 try: |
246 svn.client.ls(self.url.rstrip('/') + '/' + urllib.quote(path), |
246 svn.client.ls(self.url.rstrip('/') + '/' + urllib.quote(path), |
247 optrev, False, self.ctx) |
247 optrev, False, self.ctx) |
248 return True |
248 return True |
249 except SubversionException, err: |
249 except SubversionException: |
250 return False |
250 return False |
251 |
251 |
252 def getheads(self): |
252 def getheads(self): |
253 |
253 |
254 def isdir(path, revnum): |
254 def isdir(path, revnum): |
436 # in the tag directory. |
436 # in the tag directory. |
437 pass |
437 pass |
438 pendings = remainings |
438 pendings = remainings |
439 tagspath = srctagspath |
439 tagspath = srctagspath |
440 |
440 |
441 except SubversionException, (inst, num): |
441 except SubversionException: |
442 self.ui.note(_('no tags found at revision %d\n') % start) |
442 self.ui.note(_('no tags found at revision %d\n') % start) |
443 return tags |
443 return tags |
444 |
444 |
445 def converted(self, rev, destrev): |
445 def converted(self, rev, destrev): |
446 if not self.wc: |
446 if not self.wc: |
531 for line in file("blacklist.txt", "r"): |
531 for line in file("blacklist.txt", "r"): |
532 if not line.startswith("#"): |
532 if not line.startswith("#"): |
533 try: |
533 try: |
534 svn_rev = int(line.strip()) |
534 svn_rev = int(line.strip()) |
535 blacklist.add(svn_rev) |
535 blacklist.add(svn_rev) |
536 except ValueError, e: |
536 except ValueError: |
537 pass # not an integer or a comment |
537 pass # not an integer or a comment |
538 |
538 |
539 def is_blacklisted(self, svn_rev): |
539 def is_blacklisted(self, svn_rev): |
540 return svn_rev in self.blacklist |
540 return svn_rev in self.blacklist |
541 |
541 |
1101 def putcommit(self, files, copies, parents, commit, source): |
1101 def putcommit(self, files, copies, parents, commit, source): |
1102 # Apply changes to working copy |
1102 # Apply changes to working copy |
1103 for f, v in files: |
1103 for f, v in files: |
1104 try: |
1104 try: |
1105 data = source.getfile(f, v) |
1105 data = source.getfile(f, v) |
1106 except IOError, inst: |
1106 except IOError: |
1107 self.delete.append(f) |
1107 self.delete.append(f) |
1108 else: |
1108 else: |
1109 e = source.getmode(f, v) |
1109 e = source.getmode(f, v) |
1110 self.putfile(f, e, data) |
1110 self.putfile(f, e, data) |
1111 if f in copies: |
1111 if f in copies: |