Edgewall Software

Ticket #295: pop_to_del_python2_2.patch

File pop_to_del_python2_2.patch, 1.1 KB (added by jmanning@…, 4 years ago)

Revert pop to del to support python 2.2

  • trac/sync.py

     
    214214            """ 
    215215            for node_type, path, old_path, old_rev, action in self.additions: 
    216216                if self.deletions.has_key(old_path): # normal rename 
    217                     self.deletions.pop(old_path) 
     217                    del self.deletions[old_path] 
    218218                    action = 'R' 
    219219                elif self.deletions.has_key(path):   # copy+modification in a branch 
    220220                    action = 'C' 
    221221                    # FIXME: actually, this could be a 'R' if the parent branch 
    222222                    #        is a 'R'. This can be fixed if the parent branch 
    223223                    #        is recorded in addition to the old_path. 
    224                     self.deletions.pop(path) 
     224                    del self.deletions[path] 
    225225                if action == 'A':                    # add on a branch 
    226226                    old_path = old_rev = None 
    227227                self._save_change(node_type, action, path, old_path, old_rev)