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

Update branch head appropriately during dpull.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
    mutter,
37
37
    )
38
38
 
 
39
from bzrlib.plugins.git.errors import (
 
40
    NoSuchRef,
 
41
    )
39
42
from bzrlib.plugins.git.foreign import (
40
43
    ForeignBranch,
41
44
    )
120
123
        revidmap = self.repository.dfetch(source.repository, stop_revision)
121
124
        self.head, self.mapping = self.mapping.revision_id_bzr_to_foreign(
122
125
            revidmap[stop_revision])
 
126
        self.repository._git.set_ref(self.name, self.head)
123
127
        return revidmap
124
128
 
125
129
    def lock_write(self):
222
226
        self._last_revid = None
223
227
        def determine_wants(heads):
224
228
            if not self.source.name in heads:
225
 
                raise BzrError("No such remote branch '%s', found: %r" % (
226
 
                    self.source.name, heads.keys()))
 
229
                raise NoSuchRef(self.source.name, heads.keys())
227
230
            head = heads[self.source.name]
228
231
            self._last_revid = self.source.mapping.revision_id_foreign_to_bzr(
229
232
                head)