~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/foreign.py

remove all trailing whitespace from bzr source

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
    # Whether this mapping supports exporting and importing all bzr semantics.
42
42
    roundtripping = False
43
43
 
44
 
    # Prefix used when importing native foreign revisions (not roundtripped) 
 
44
    # Prefix used when importing native foreign revisions (not roundtripped)
45
45
    # using this mapping.
46
46
    revid_prefix = None
47
47
 
63
63
 
64
64
    def show_foreign_revid(self, foreign_revid):
65
65
        """Prepare a foreign revision id for formatting using bzr log.
66
 
        
 
66
 
67
67
        :param foreign_revid: Foreign revision id.
68
68
        :return: Dictionary mapping string keys to string values.
69
69
        """
73
73
 
74
74
class VcsMappingRegistry(registry.Registry):
75
75
    """Registry for Bazaar<->foreign VCS mappings.
76
 
    
 
76
 
77
77
    There should be one instance of this registry for every foreign VCS.
78
78
    """
79
79
 
104
104
 
105
105
 
106
106
class ForeignRevision(Revision):
107
 
    """A Revision from a Foreign repository. Remembers 
 
107
    """A Revision from a Foreign repository. Remembers
108
108
    information about foreign revision id and mapping.
109
109
 
110
110
    """
146
146
class ForeignVcsRegistry(registry.Registry):
147
147
    """Registry for Foreign VCSes.
148
148
 
149
 
    There should be one entry per foreign VCS. Example entries would be 
 
149
    There should be one entry per foreign VCS. Example entries would be
150
150
    "git", "svn", "hg", "darcs", etc.
151
 
    
 
151
 
152
152
    """
153
153
 
154
154
    def register(self, key, foreign_vcs, help):
163
163
        registry.Registry.register(self, key, foreign_vcs, help)
164
164
 
165
165
    def parse_revision_id(self, revid):
166
 
        """Parse a bzr revision and return the matching mapping and foreign 
 
166
        """Parse a bzr revision and return the matching mapping and foreign
167
167
        revid.
168
 
        
 
168
 
169
169
        :param revid: The bzr revision id
170
170
        :return: tuple with foreign revid and vcs mapping
171
171
        """
184
184
class ForeignRepository(Repository):
185
185
    """A Repository that exists in a foreign version control system.
186
186
 
187
 
    The data in this repository can not be represented natively using 
 
187
    The data in this repository can not be represented natively using
188
188
    Bazaars internal datastructures, but have to converted using a VcsMapping.
189
189
    """
190
190
 
194
194
    def has_foreign_revision(self, foreign_revid):
195
195
        """Check whether the specified foreign revision is present.
196
196
 
197
 
        :param foreign_revid: A foreign revision id, in the format used 
 
197
        :param foreign_revid: A foreign revision id, in the format used
198
198
                              by this Repository's VCS.
199
199
        """
200
200
        raise NotImplementedError(self.has_foreign_revision)
222
222
    def get_inventory_sha1(self, revision_id):
223
223
        """Get the sha1 for the XML representation of an inventory.
224
224
 
225
 
        :param revision_id: Revision id of the inventory for which to return 
 
225
        :param revision_id: Revision id of the inventory for which to return
226
226
         the SHA1.
227
227
        :return: XML string
228
228
        """