/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/fetch.py

  • Committer: Neil Santos
  • Date: 2010-03-04 02:43:41 UTC
  • mto: (5080.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5081.
  • Revision ID: neil_santos@users.sourceforge.net-20100304024341-ra7njxj4lzjb46rl
Removed separate lstat() and reverted LocalTransport and SFTPTransport's stat() methods to using lstat() internally.
Reworked how SFTPTransport's symlink() handles success and signals failure.
Removed lstat() declaration on the Transport base class.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
from bzrlib.lazy_import import lazy_import
29
29
lazy_import(globals(), """
30
30
from bzrlib import (
 
31
    graph as _mod_graph,
 
32
    static_tuple,
31
33
    tsort,
32
34
    versionedfile,
33
35
    )
35
37
import bzrlib
36
38
from bzrlib import (
37
39
    errors,
 
40
    symbol_versioning,
38
41
    ui,
39
42
    )
40
43
from bzrlib.revision import NULL_REVISION
246
249
        if len(revs) > 100:
247
250
            # XXX: not covered by tests, should have a flag to always run
248
251
            # this. -- mbp 20100129
249
 
            graph = self.source_repo.get_known_graph_ancestry(revs)
 
252
            graph = _get_rich_root_heads_graph(self.source, revs)
250
253
        new_roots_stream = _new_root_data_stream(
251
254
            root_id_order, rev_id_to_root_id, parent_map, self.source, graph)
252
255
        return [('texts', new_roots_stream)]
254
257
 
255
258
def _get_rich_root_heads_graph(source_repo, revision_ids):
256
259
    """Get a Graph object suitable for asking heads() for new rich roots."""
257
 
    return 
 
260
    st = static_tuple.StaticTuple
 
261
    revision_keys = [st(r_id).intern() for r_id in revision_ids]
 
262
    known_graph = source_repo.revisions.get_known_graph_ancestry(
 
263
                    revision_keys)
 
264
    return _mod_graph.GraphThunkIdsToKeys(known_graph)
258
265
 
259
266
 
260
267
def _new_root_data_stream(