~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Martin Pool
  • Date: 2005-05-09 08:27:49 UTC
  • Revision ID: mbp@sourcefrog.net-20050509082749-22b1a6f4af329f7b
- bzr log and bzr root now accept an http URL
- new RemoteBranch.relpath()
- new find_branch factory method

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 
41
41
 
42
42
 
 
43
def find_branch(f, **args):
 
44
    if f.startswith('http://') or f.startswith('https://'):
 
45
        import remotebranch 
 
46
        return remotebranch.RemoteBranch(f, **args)
 
47
    else:
 
48
        return Branch(f, **args)
 
49
        
 
50
 
43
51
def find_branch_root(f=None):
44
52
    """Find the branch root enclosing f, or pwd.
45
53
 
 
54
    f may be a filename or a URL.
 
55
 
46
56
    It is not necessary that f exists.
47
57
 
48
58
    Basically we keep looking up until we find the control directory or