/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Martin Pool
  • Date: 2007-08-28 10:56:41 UTC
  • mto: (2592.3.119 repository)
  • mto: This revision was merged to the branch mainline in revision 2933.
  • Revision ID: mbp@sourcefrog.net-20070828105641-pd0vwkmeop9e09rf
Add Repository.base on all repositories.

Repository.has_same_location now *just* checks the location, not the class -
this seems to fix problems in interaction between remote and vfs repositories.

Add str and repr on RemoteRepository.
 
RemoteRepository.fetch shortcircuits when given two repositories at the same
location, which is required by the underlying fetch code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
260
260
        # on whether escaping is required.
261
261
        self._warn_if_deprecated()
262
262
        self._write_group = None
 
263
        self.base = control_files._transport.base
263
264
 
264
265
    def __repr__(self):
265
 
        return '%s(%r)' % (self.__class__.__name__, 
266
 
                           self.bzrdir.transport.base)
 
266
        return '%s(%r)' % (self.__class__.__name__,
 
267
                           self.base)
267
268
 
268
269
    def has_same_location(self, other):
269
270
        """Returns a boolean indicating if this repository is at the same
272
273
        This might return False even when two repository objects are accessing
273
274
        the same physical repository via different URLs.
274
275
        """
275
 
        if self.__class__ is not other.__class__:
276
 
            return False
277
 
        return (self.control_files._transport.base ==
278
 
                other.control_files._transport.base)
 
276
        ## if self.__class__ is not other.__class__:
 
277
        ##     return False
 
278
        return (self.base == other.base)
279
279
 
280
280
    def is_in_write_group(self):
281
281
        """Return True if there is an open write group.