hgext/convert/subversion.py
changeset 5117 d4fa6bafc43a
parent 5114 bcf6ba3fcbe4
child 5118 07735e2d24cb
equal deleted inserted replaced
5116:2ffe3e2a1ac2 5117:d4fa6bafc43a
    65     def receiver(orig_paths, revnum, author, date, message, pool):
    65     def receiver(orig_paths, revnum, author, date, message, pool):
    66         if orig_paths is not None:
    66         if orig_paths is not None:
    67             for k, v in orig_paths.iteritems():
    67             for k, v in orig_paths.iteritems():
    68                 orig_paths[k] = changedpath(v)
    68                 orig_paths[k] = changedpath(v)
    69         pickle.dump((orig_paths, revnum, author, date, message),
    69         pickle.dump((orig_paths, revnum, author, date, message),
    70                                 fp, protocol)
    70                     fp, protocol)
    71         
    71 
    72     try:
    72     try:
    73         # Use an ra of our own so that our parent can consume
    73         # Use an ra of our own so that our parent can consume
    74         # our results without confusing the server.
    74         # our results without confusing the server.
    75         t = transport.SvnRaTransport(url=url)
    75         t = transport.SvnRaTransport(url=url)
    76         svn.ra.get_log(t.ra, paths, start, end, limit,
    76         svn.ra.get_log(t.ra, paths, start, end, limit,
   238                 except:
   238                 except:
   239                     if entry is None:
   239                     if entry is None:
   240                         break
   240                         break
   241                     raise SubversionException("child raised exception", entry)
   241                     raise SubversionException("child raised exception", entry)
   242                 yield entry
   242                 yield entry
   243             
   243 
   244         args = [self.url, paths, start, end, limit, discover_changed_paths,
   244         args = [self.url, paths, start, end, limit, discover_changed_paths,
   245                 strict_node_history]
   245                 strict_node_history]
   246         arg = encodeargs(args)
   246         arg = encodeargs(args)
   247         hgexe = util.hgexecutable()
   247         hgexe = util.hgexecutable()
   248         cmd = '"%s "debugsvnlog""' % util.shellquote(hgexe)
   248         cmd = '"%s "debugsvnlog""' % util.shellquote(hgexe)
   249         stdin, stdout = os.popen2(cmd, 'b')
   249         stdin, stdout = os.popen2(cmd, 'b')
   250         
   250 
   251         stdin.write(arg)
   251         stdin.write(arg)
   252         stdin.close()
   252         stdin.close()
   253 
   253 
   254         for p in parent(stdout):
   254         for p in parent(stdout):
   255             yield p
   255             yield p
   538                 return
   538                 return
   539 
   539 
   540             parents = []
   540             parents = []
   541             orig_paths = orig_paths.items()
   541             orig_paths = orig_paths.items()
   542             orig_paths.sort()
   542             orig_paths.sort()
   543             
   543 
   544             # check whether this revision is the start of a branch
   544             # check whether this revision is the start of a branch
   545             path, ent = orig_paths and orig_paths[0] or (None, None)
   545             path, ent = orig_paths and orig_paths[0] or (None, None)
   546             if ent and path == self.module:
   546             if ent and path == self.module:
   547                 if ent.copyfrom_path:
   547                 if ent.copyfrom_path:
   548                     # ent.copyfrom_rev may not be the actual last revision
   548                     # ent.copyfrom_rev may not be the actual last revision