hgext/convert/subversion.py
changeset 4791 9f20f4b205ba
parent 4790 2b5723a5b186
child 4792 1f10a6cccdb5
equal deleted inserted replaced
4790:2b5723a5b186 4791:9f20f4b205ba
   207 
   207 
   208             # The path is outside our tracked tree...
   208             # The path is outside our tracked tree...
   209             self.ui.debug('Ignoring %r since it is not under %r\n' % (path, module))
   209             self.ui.debug('Ignoring %r since it is not under %r\n' % (path, module))
   210             return None
   210             return None
   211 
   211 
   212         received = []
   212         def parselogentry(*arg, **args):
   213         def rcvr(*arg, **args):
       
   214             orig_paths, revnum, author, date, message, pool = arg
   213             orig_paths, revnum, author, date, message, pool = arg
   215             new_orig_paths = svn_paths(orig_paths)
   214             orig_paths = svn_paths(orig_paths)
   216             rcvr2(new_orig_paths, revnum, author, date, message, pool)
   215 
   217 
   216             if self.is_blacklisted(revnum):
   218         def rcvr2(orig_paths, revnum, author, date, message, pool, better_paths = None):
   217                 self.ui.note('skipping blacklisted revision %d\n' % revnum)
   219             if not self.is_blacklisted(revnum):
   218                 return
   220                 received.append((orig_paths, revnum, author, date, message))
   219 
       
   220             self.ui.note("parsing revision %d\n" % revnum)
   221            
   221            
   222         def after_received(orig_paths, revnum, author, date, message):
       
   223             self.ui.note("parsing revision %d\n" % revnum)
       
   224             if orig_paths is None:
   222             if orig_paths is None:
       
   223                 self.ui.debug('revision %d has no entries\n' % revnum)
   225                 return
   224                 return
   226 
   225 
   227             if revnum in self.modulemap:
   226             if revnum in self.modulemap:
   228                 new_module = self.modulemap[revnum]
   227                 new_module = self.modulemap[revnum]
   229                 if new_module != self.module:
   228                 if new_module != self.module:
   435             self.child_rev = rev
   434             self.child_rev = rev
   436 
   435 
   437         try:
   436         try:
   438             discover_changed_paths = True
   437             discover_changed_paths = True
   439             strict_node_history = False
   438             strict_node_history = False
   440             svn.ra.get_log(self.ra, [self.module], from_revnum, to_revnum, 
   439             svn.ra.get_log(self.ra, [self.module], from_revnum, to_revnum, 0,
   441                            0, discover_changed_paths, strict_node_history, rcvr)
   440                            discover_changed_paths, strict_node_history,
   442             for args in received:
   441                            parselogentry)
   443                 after_received(*args)
       
   444             self.last_revnum = to_revnum
   442             self.last_revnum = to_revnum
   445         except SubversionException, (_, num):
   443         except SubversionException, (_, num):
   446             if num == svn.core.SVN_ERR_FS_NO_SUCH_REVISION:
   444             if num == svn.core.SVN_ERR_FS_NO_SUCH_REVISION:
   447                 raise NoSuchRevision(branch=self, 
   445                 raise NoSuchRevision(branch=self, 
   448                     revision="Revision number %d" % to_revnum)
   446                     revision="Revision number %d" % to_revnum)