Changeset 893 in tailor for vcpx/target.py


Ignore:
Timestamp:
10/13/05 12:04:39 (8 years ago)
Author:
lele@…
Hash name:
20051013100439-7a6fb-0d3dca29eb96cbcc0e90bb02d6a0ed053d84120b
Message:

Handle the "replace" operation, that is a remove+rename
In this case, the remove must be done before the rename on the target
backend as well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/target.py

    r883 r893  
    259259 
    260260        # Replay the actions 
     261 
     262        if renamed and removed: 
     263            # Handle the "replace" operation, that is a remove+rename 
     264 
     265            renames = [e.name for e in renamed] 
     266            removesfirst = [] 
     267            for rem in removed: 
     268                if rem in renames: 
     269                    removesfirst.append(rem) 
     270 
     271            if removedfirst: 
     272                self._removeEntries(removedfirst) 
     273                for rem in removesfirst: 
     274                    removed.remove(rem) 
    261275 
    262276        if renamed: self._renameEntries(renamed) 
Note: See TracChangeset for help on using the changeset viewer.