Changeset 1637 in tailor


Ignore:
Timestamp:
06/11/08 19:29:24 (5 years ago)
Author:
lele@…
Hash name:
20080611172924-7a6fb-be8911a488dfaaf6bd545cd8eb5d47279c62bca6
Message:

Be backward compatible with existing statefiles
Using class attributes to initialize the default values is the right way
of extending the ChangesetEntry, without the risk of triggering
AttributeError on old instances loaded from a statefile built with
a previous version of tailor.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/changes.py

    r1634 r1637  
    3232    CONFLICT = 'CONFLICT' 
    3333 
     34    old_name = None 
     35    old_revision = None 
     36    new_revision = None 
     37    action_kind = None 
     38    status = None 
     39    unidiff = None # This is the unidiff of this particular entry 
     40    is_directory = False # This usually makes sense only on ADDs and DELs 
     41    is_symlink = False 
     42 
    3443    def __init__(self, name): 
    3544        self.name = name 
    36         self.old_name = None 
    37         self.old_revision = None 
    38         self.new_revision = None 
    39         self.action_kind = None 
    40         self.status = None 
    41         self.unidiff = None # This is the unidiff of this particular entry 
    42         self.is_directory = False # This usually makes sense only on ADDs and DELs 
    43         self.is_symlink = False 
    4445 
    4546    def __str__(self): 
Note: See TracChangeset for help on using the changeset viewer.