Changeset 505 in tailor


Ignore:
Timestamp:
08/05/05 12:33:39 (8 years ago)
Author:
lele@…
Hash name:
20050805103339-97f81-99d307e096953caf32096545b76a5ccce0594e73
Message:

Added a new hook executed after application and before final commit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/source.py

    r504 r505  
    6868 
    6969    def applyPendingChangesets(self, root, module, applyable=None, 
    70                                replay=None, applied=None, logger=None, 
    71                                delayed_commit=False): 
     70                               replayable=None, replay=None, applied=None, 
     71                               logger=None, delayed_commit=False): 
    7272        """ 
    7373        Apply the collected upstream changes. 
     
    116116                    return last, conflicts 
    117117 
     118            if not self._didApplyChangeset(root, c, replayable): 
     119                continue 
     120 
    118121            if replay: 
    119122                replay(root, module, c, delayed_commit=delayed_commit, 
     
    142145        if applyable: 
    143146            return applyable(root, changeset) 
     147        else: 
     148            return True 
     149 
     150    def _didApplyChangeset(self, root, changeset, replayable=None): 
     151        """ 
     152        This gets called right after changeset application.  The final 
     153        commit on the target system won't be carried out if this 
     154        returns False. 
     155 
     156        Subclasses may use this to alter the changeset in any way, before 
     157        committing its changes to the target system. 
     158        """ 
     159 
     160        if replayable: 
     161            return replayable(root, changeset) 
    144162        else: 
    145163            return True 
Note: See TracChangeset for help on using the changeset viewer.