Changeset 1179 in tailor for vcpx/repository/bzr.py


Ignore:
Timestamp:
06/25/06 01:12:08 (7 years ago)
Author:
lele@…
Hash name:
20060624231208-97f81-7b9ce234ef7b5441fe2a59ef89689e76b9466411
Message:

Split the monolithic repository.py into smaller units
The repository subclass of each backend is now in the same unit that
implements its working dir, under the vcpx.repository subpackage.
This has several advantages: the obvious of keeping related code closer
and the ability of lazy load only the needed unit, as it was already done
for the working dir subclasses.

Location:
vcpx/repository
Files:
1 added
1 moved

Legend:

Unmodified
Added
Removed
  • vcpx/repository/bzr.py

    r1164 r1179  
    1515__docformat__ = 'reStructuredText' 
    1616 
    17 from workdir import WorkingDir 
    18 from source import UpdatableSourceWorkingDir, ChangesetApplicationFailure 
    19 from target import SynchronizableTargetWorkingDir 
    2017from bzrlib.osutils import normpath 
    2118from bzrlib.bzrdir import BzrDir 
    2219from bzrlib.delta import compare_trees 
    2320from bzrlib import errors 
     21 
     22from vcpx.repository import Repository 
     23from vcpx.workdir import WorkingDir 
     24from vcpx.source import UpdatableSourceWorkingDir, ChangesetApplicationFailure 
     25from vcpx.target import SynchronizableTargetWorkingDir 
     26 
     27 
     28class BzrRepository(Repository): 
     29    METADIR = '.bzr' 
     30 
     31    def _load(self, project): 
     32        Repository._load(self, project) 
     33        ppath = project.config.get(self.name, 'python-path') 
     34        if ppath: 
     35            from sys import path 
     36 
     37            if ppath not in path: 
     38                path.insert(0, ppath) 
     39 
    2440 
    2541class BzrWorkingDir(UpdatableSourceWorkingDir, SynchronizableTargetWorkingDir): 
     
    4258        Generate changeset for the given Bzr revision 
    4359        """ 
    44         from changes import ChangesetEntry, Changeset 
    4560        from datetime import datetime 
     61        from vcpx.changes import ChangesetEntry, Changeset 
    4662 
    4763        revision = branch.repository.get_revision(revision_id) 
Note: See TracChangeset for help on using the changeset viewer.