/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/bundle/__init__.py

  • Committer: Andrew Bennetts
  • Date: 2008-04-02 00:14:00 UTC
  • mfrom: (3324 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3756.
  • Revision ID: andrew.bennetts@canonical.com-20080402001400-r1pqse38i03dl97w
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    return read_mergeable_from_url(url, _do_directive=False)
34
34
 
35
35
 
36
 
def read_mergeable_from_url(url, _do_directive=True):
 
36
def read_mergeable_from_url(url, _do_directive=True, possible_transports=None):
37
37
    """Read mergable object from a given URL.
38
38
 
39
39
    :return: An object supporting get_target_revision.  Raises NotABundle if
40
40
        the target is not a mergeable type.
41
41
    """
42
 
    url = urlutils.normalize_url(url)
43
 
    url, filename = urlutils.split(url, exclude_trailing_slash=False)
44
 
    if not filename:
 
42
    child_transport = get_transport(url,
 
43
        possible_transports=possible_transports)
 
44
    transport = child_transport.clone('..')
 
45
    filename = transport.relpath(child_transport.base)
 
46
    if filename.endswith('/'):
45
47
        # A path to a directory was passed in
46
48
        # definitely not a bundle
47
49
        raise errors.NotABundle('A directory cannot be a bundle')
48
 
 
49
 
    transport = get_transport(url)
50
50
    mergeable, transport = read_mergeable_from_transport(transport, filename,
51
51
                                                         _do_directive)
52
52
    return mergeable