~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/fetch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-02-20 04:39:19 UTC
  • mfrom: (1534.6.13 repository)
  • Revision ID: pqm@pqm.ubuntu.com-20060220043919-b01f8960604b339d
Merge push/pull and branching within repositories bugfix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
    """
81
81
    def __init__(self, to_repository, from_repository, last_revision=None, pb=None):
82
82
        if to_repository.bzrdir.transport.base == from_repository.bzrdir.transport.base:
83
 
            raise Exception("can't fetch from a repository to itself %s, %s" % 
84
 
                            (from_repository.bzrdir.transport.base,
85
 
                             to_repository.bzrdir.transport.base))
 
83
            # check that last_revision is in 'from' and then return a no-operation.
 
84
            if last_revision not in (None, NULL_REVISION):
 
85
                from_repository.get_revision(last_revision)
 
86
            return
86
87
        self.to_repository = to_repository
87
88
        self.from_repository = from_repository
88
89
        # must not mutate self._last_revision as its potentially a shared instance