Changeset 1129 in tailor


Ignore:
Timestamp:
05/19/06 21:46:17 (7 years ago)
Author:
lele@…
Hash name:
20060519194617-97f81-a314f3a3c827edd894bd2eb55f6aa0ea93a44820
Message:

Don't necessarily remove an empty directory
Fix CvspsWorkingDir.__maybeDeleteDirectory() so that it does
not remove the directory when the same changeset adds other entries
to it. This fixes #49.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/cvsps.py

    r1116 r1129  
    178178        absentrydir = join(self.basedir, entrydir) 
    179179        if not exists(absentrydir) or listdir(absentrydir) == ['CVS']: 
     180            # Oh, the directory is empty: if there are no other added entries 
     181            # in the directory, insert a REMOVE event against it. 
     182            for added in changeset.addedEntries(): 
     183                if added.name.startswith(entrydir): 
     184                    # entrydir got empty, but only temporarily 
     185                    return 
     186 
    180187            deldir = changeset.addEntry(entrydir, None) 
    181188            deldir.action_kind = deldir.DELETED 
Note: See TracChangeset for help on using the changeset viewer.