/breezy-svn/trunk

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy-svn/trunk

« back to all changes in this revision

Viewing changes to fetch.py

  • Committer: Jelmer Vernooij
  • Date: 2018-06-09 09:28:31 UTC
  • Revision ID: jelmer@jelmer.uk-20180609092831-fce99rq1m3020ttx
Make svn_transport a separate variable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
754
754
                    svn_base_path = "."
755
755
                else:
756
756
                    # Map copyfrom_path to the path that's related to the lhs parent branch path.
757
 
                    prev_locations = self.source.transport.get_locations(
 
757
                    prev_locations = self.source.svn_transport.get_locations(
758
758
                        copyfrom_path, copyfrom_revnum, [self.lhs_parent_revmeta.metarev.revnum])
759
759
                    copyfrom_path = prev_locations[self.lhs_parent_revmeta.metarev.revnum].strip("/")
760
760
                    svn_base_path = urlutils.determine_relative_path(
865
865
        self.target.add_revision(self.revid, rev)
866
866
 
867
867
        # Only fetch signature if it's cheap
868
 
        if self.source.transport.has_capability("log-revprops"):
 
868
        if self.source.svn_transport.has_capability("log-revprops"):
869
869
            signature = self.revmeta.get_signature()
870
870
            if signature is not None:
871
871
                self.target.add_signature_text(self.revid, signature)
1383
1383
        self._text_cache = lru_cache.LRUSizeCache(TEXT_CACHE_SIZE,
1384
1384
                                                  compute_size=chunks_to_size)
1385
1385
 
1386
 
        self._use_replay_range = self.source.transport.has_capability(
 
1386
        self._use_replay_range = self.source.svn_transport.has_capability(
1387
1387
            "partial-replay") and False
1388
 
        self._use_replay = self.source.transport.has_capability(
 
1388
        self._use_replay = self.source.svn_transport.has_capability(
1389
1389
            "partial-replay") and False
1390
1390
 
1391
1391
    def copy_content(self, revision_id=None, pb=None):
1467
1467
            parent_revnum = parent_revmeta.metarev.revnum
1468
1468
            start_empty = False
1469
1469
 
1470
 
        conn = self.source.transport.get_connection(parent_branch)
 
1470
        conn = self.source.svn_transport.get_connection(parent_branch)
1471
1471
        try:
1472
1472
            assert revmeta.metarev.revnum > parent_revnum or start_empty
1473
1473
 
1490
1490
                raise
1491
1491
        finally:
1492
1492
            if not conn.busy:
1493
 
                self.source.transport.add_connection(conn)
 
1493
                self.source.svn_transport.add_connection(conn)
1494
1494
 
1495
1495
    def _fetch_revision_replay(self, editor, revmeta, parent_revmeta):
1496
1496
        assert revmeta.revnum >= 0
1497
 
        conn = self.source.transport.get_connection(revmeta.branch_path)
 
1497
        conn = self.source.svn_transport.get_connection(revmeta.branch_path)
1498
1498
        try:
1499
1499
            conn.replay(revmeta.revnum, 0, editor_strip_prefix(editor, revmeta.branch_path),
1500
1500
                True)
1501
1501
        finally:
1502
1502
            if not conn.busy:
1503
 
                self.source.transport.add_connection(conn)
 
1503
                self.source.svn_transport.add_connection(conn)
1504
1504
 
1505
1505
    def _fetch_revisions_nochunks(self, revs, pb=None, use_replay=False):
1506
1506
        """Copy a set of related revisions using svn.ra.switch.
1703
1703
                    assert editor.root_inventory is not None
1704
1704
                    self._prev_inv = editor.root_inventory
1705
1705
 
1706
 
                conn = self.source.transport.get_connection(revmetas[-1].branch_path)
 
1706
                conn = self.source.svn_transport.get_connection(revmetas[-1].branch_path)
1707
1707
                try:
1708
1708
                    conn.replay_range(revmetas[0].revnum, revmetas[-1].revnum, 0, (revstart, revfinish), True)
1709
1709
                finally:
1710
1710
                    if not conn.busy:
1711
 
                        self.source.transport.add_connection(conn)
 
1711
                        self.source.svn_transport.add_connection(conn)
1712
1712
        except:
1713
1713
            self.target.abort_write_group()
1714
1714
            raise