/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: Wouter van Heyst
  • Date: 2006-06-06 16:16:09 UTC
  • mto: This revision was merged to the branch mainline in revision 1752.
  • Revision ID: larstiq@larstiq.dyndns.org-20060606161609-6c14b8aaef2fe0be
working on get_parent, set_parent and relative urls, broken

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
                            safe_unicode,
48
48
                            rmtree,
49
49
                            )
50
 
from bzrlib.textui import show_status
51
 
from bzrlib.trace import mutter, note
52
 
from bzrlib.tree import EmptyTree, RevisionTree
53
50
from bzrlib.repository import Repository
54
51
from bzrlib.revision import (
55
52
                             is_ancestor,
58
55
                             )
59
56
from bzrlib.store import copy_all
60
57
from bzrlib.symbol_versioning import *
 
58
from bzrlib.textui import show_status
 
59
from bzrlib.trace import mutter, note
61
60
import bzrlib.transactions as transactions
62
61
from bzrlib.transport import Transport, get_transport
63
62
from bzrlib.tree import EmptyTree, RevisionTree
64
63
import bzrlib.ui
 
64
import bzrlib.urlutils as urlutils
65
65
import bzrlib.xml5
66
66
 
67
67
 
1133
1133
        """See Branch.get_parent."""
1134
1134
        import errno
1135
1135
        _locs = ['parent', 'pull', 'x-pull']
 
1136
        assert self.base[-1] == '/'
1136
1137
        for l in _locs:
1137
1138
            try:
1138
 
                return self.control_files.get_utf8(l).read().strip('\n')
 
1139
                return urlutils.join(self.base[:-1], 
 
1140
                            self.control_files.get(l).read().strip('\n'))
1139
1141
            except NoSuchFile:
1140
1142
                pass
1141
1143
        return None
1162
1164
        if url is None:
1163
1165
            self.control_files._transport.delete('parent')
1164
1166
        else:
1165
 
            self.control_files.put_utf8('parent', url + '\n')
 
1167
            url = urlutils.relative_url(self.base, url)
 
1168
            self.control_files.put('parent', url + '\n')
1166
1169
 
1167
1170
    def tree_config(self):
1168
1171
        return TreeConfig(self)