/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

  • Committer: Jelmer Vernooij
  • Date: 2010-05-13 15:44:32 UTC
  • mto: (0.200.912 trunk)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@samba.org-20100513154432-wtw5355qat6ywsfu
Avoid trying to set HEAD for remote branches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
    NoSuchRef,
52
52
    )
53
53
from bzrlib.plugins.git.refs import (
 
54
    branch_name_to_ref,
54
55
    ref_to_branch_name,
55
56
    extract_tags,
56
57
    tag_name_to_ref,
252
253
        return branch.InterBranch.get(self, target)._basic_push(
253
254
            overwrite, stop_revision)
254
255
 
 
256
    def lookup_foreign_revision_id(self, foreign_revid):
 
257
        return self.repository.lookup_foreign_revision_id(foreign_revid, 
 
258
            self.mapping)
 
259
 
255
260
 
256
261
class LocalGitBranch(GitBranch):
257
262
    """A local Git branch."""
339
344
 
340
345
    def supports_tags(self):
341
346
        return True
342
 
 
343
 
    def lookup_foreign_revision_id(self, foreign_revid):
344
 
        return self.repository.lookup_foreign_revision_id(foreign_revid, 
345
 
            self.mapping)
346
347
    
347
348
 
348
349
class GitBranchPullResult(branch.PullResult):
636
637
    def _get_new_refs(self, stop_revision=None):
637
638
        if stop_revision is None:
638
639
            stop_revision = self.source.last_revision()
639
 
        refs = { self.target.ref: stop_revision }
 
640
        refs = {
 
641
            branch_name_to_ref(self.target.name, "refs/heads/master"): stop_revision }
640
642
        for name, revid in self.source.tags.get_tag_dict().iteritems():
641
643
            if self.source.repository.has_revision(revid):
642
644
                refs[tag_name_to_ref(name)] = revid