Changeset 1583 in tailor for vcpx/repository/darcs/source.py


Ignore:
Timestamp:
05/31/08 01:17:47 (5 years ago)
Author:
lele@…
Hash name:
20080530231747-97f81-cfc68186fb253db37a7b0599d6873ff14e67d80f
Message:

Collapse another strange darcs combination
Patch [1211] splitted the monolithic git backend into a subpackage,
moving files around: strangely, it say something like

  • add A
  • mv A B
  • edit B

(although not in that order) with the net result of a simpler add B.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/repository/darcs/source.py

    r1579 r1583  
    6262        - collapse "rename A B; remove B" into "remove A" 
    6363        - collapse "rename A B; rename B C" into "rename A C" 
     64        - collapse "add A; edit A" into "add A" 
    6465        """ 
    6566 
     
    106107                            e.old_name = None 
    107108                            e.is_directory = entry.is_directory 
     109 
     110                            # Collapse "add A; edit A" into "add A" 
     111                            for j,oe in enumerate(self.entries): 
     112                                if oe.action_kind == e.UPDATED and e.name == oe.name: 
     113                                    del self.entries[j] 
     114 
    108115                            return e 
    109116 
     
    170177        # obviously to the end, and since the latter, as said, come 
    171178        # in very early, appending is just good. 
     179 
    172180        self.entries.append(entry) 
    173181        return entry 
Note: See TracChangeset for help on using the changeset viewer.