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

  • Committer: Lalo Martins
  • Date: 2005-09-07 10:50:03 UTC
  • mto: (1185.1.5)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: lalo@exoweb.net-20050907105002-4e37d43b7d4060fe
unifying 'base' (from Branch) and 'baseurl' (from RemoteBranch) attributes;
this allows us to remove quite a few "dead chickens" from the code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1482
1482
    return gen_file_id('TREE_ROOT')
1483
1483
 
1484
1484
 
1485
 
def pull_loc(branch):
1486
 
    # TODO: Should perhaps just make attribute be 'base' in
1487
 
    # RemoteBranch and Branch?
1488
 
    if hasattr(branch, "baseurl"):
1489
 
        return branch.baseurl
1490
 
    else:
1491
 
        return branch.base
1492
 
 
1493
 
 
1494
1485
def copy_branch(branch_from, to_location, revision=None):
1495
1486
    """Copy branch_from into the existing directory to_location.
1496
1487
 
1516
1507
    merge((to_location, -1), (to_location, 0), this_dir=to_location,
1517
1508
          check_clean=False, ignore_zero=True)
1518
1509
    
1519
 
    from_location = pull_loc(branch_from)
1520
 
    br_to.set_parent(pull_loc(branch_from))
 
1510
    from_location = branch_from.base
 
1511
    br_to.set_parent(branch_from.base)
1521
1512