Edgewall Software

Ticket #4900: resync_fix-r5961.diff

File resync_fix-r5961.diff, 1.8 kB (added by cboos, 14 months ago)

Work in progress: the deleted entries look now ok in the node_change table, but the displayed info in the templates has yet to be updated. Also, there are 4 regressions in the tests which heavily suggest that this is not the final fix ;-)

  • trac/versioncontrol/svn_fs.py

     
    863863            if not (_is_path_within_scope(self.scope, path) and \ 
    864864                    self.authz.has_permission(path)): 
    865865                continue 
    866  
    867             path = change.path 
     866            new_path = change.path 
    868867            base_path = change.base_path 
    869868            base_rev = change.base_rev 
    870869 
     
    874873                base_path, base_rev = None, -1 
    875874 
    876875            # Determine the action 
    877             if not path:                # deletion 
     876            if not new_path:            # deletion 
    878877                if base_path: 
    879                     if base_path in deletions: 
    880                         continue # duplicates on base_path are possible (#3778) 
     878                    #if base_path in deletions: 
     879                    #    continue # duplicates on base_path are possible (#3778) 
    881880                    action = Changeset.DELETE 
    882                     deletions[base_path] = idx 
     881                    deletions[path] = idx # ''not'' base_path (see #4900) 
    883882                elif self.scope == '/': # root property change 
    884883                    action = Changeset.EDIT 
    885884                else:                   # deletion outside of scope, ignore 
     
    906905                    base_path, base_rev = cbase_path, cbase_rev 
    907906 
    908907            kind = _kindmap[change.item_kind] 
    909             path = _path_within_scope(self.scope, _from_svn(path or base_path)) 
     908            path = _path_within_scope(self.scope, _from_svn(path)) 
    910909            base_path = _path_within_scope(self.scope, _from_svn(base_path)) 
    911910            changes.append([path, kind, action, base_path, base_rev]) 
    912911            idx += 1