Merge lp:~jelmer/bzr-git/merge-fetch into lp:bzr-git

Proposed by Jelmer Vernooij on 2011-03-26
Status: Merged
Merged at revision: 1155
Proposed branch: lp:~jelmer/bzr-git/merge-fetch
Merge into: lp:bzr-git
Diff against target: 52 lines (+14/-4)
2 files modified
NEWS (+3/-0)
branch.py (+11/-4)
To merge this branch: bzr merge lp:~jelmer/bzr-git/merge-fetch
Reviewer Review Type Date Requested Status
bzr-git developers 2011-03-26 Pending
Review via email: mp+54963@code.launchpad.net

Description of the change

Implement InterFromGitBranch.fetch.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'NEWS'
--- NEWS 2011-03-26 00:22:06 +0000
+++ NEWS 2011-03-26 17:23:12 +0000
@@ -16,6 +16,9 @@
16 * Fix recursion error merging tags for bound branches.16 * Fix recursion error merging tags for bound branches.
17 (Jelmer Vernooij, #742833)17 (Jelmer Vernooij, #742833)
1818
19 * Fix fetching from remote git repositories during merge.
20 (Jelmer Vernooij, #741760)
21
19 API COMPLETENESS22 API COMPLETENESS
2023
21 * Implement LocalGitControlDir.clone_on_transport. (Jelmer Vernooij, #721899)24 * Implement LocalGitControlDir.clone_on_transport. (Jelmer Vernooij, #721899)
2225
=== modified file 'branch.py'
--- branch.py 2011-03-26 17:09:57 +0000
+++ branch.py 2011-03-26 17:23:12 +0000
@@ -570,9 +570,10 @@
570 not isinstance(target, GitBranch) and570 not isinstance(target, GitBranch) and
571 (getattr(cls._get_interrepo(source, target), "fetch_objects", None) is not None))571 (getattr(cls._get_interrepo(source, target), "fetch_objects", None) is not None))
572572
573 def update_revisions(self, stop_revision=None, overwrite=False,573 def fetch(self, stop_revision=None, fetch_tags=True):
574 graph=None):574 self.fetch_objects(stop_revision, fetch_tags=fetch_tags)
575 """See InterBranch.update_revisions()."""575
576 def fetch_objects(self, stop_revision, fetch_tags):
576 interrepo = self._get_interrepo(self.source, self.target)577 interrepo = self._get_interrepo(self.source, self.target)
577 def determine_wants(heads):578 def determine_wants(heads):
578 if self.source.ref is not None and not self.source.ref in heads:579 if self.source.ref is not None and not self.source.ref in heads:
@@ -587,13 +588,19 @@
587 else:588 else:
588 self._last_revid = stop_revision589 self._last_revid = stop_revision
589 real = interrepo.get_determine_wants_revids(590 real = interrepo.get_determine_wants_revids(
590 [self._last_revid], include_tags=True)591 [self._last_revid], include_tags=fetch_tags)
591 return real(heads)592 return real(heads)
592 pack_hint, head, refs = interrepo.fetch_objects(593 pack_hint, head, refs = interrepo.fetch_objects(
593 determine_wants, self.source.mapping)594 determine_wants, self.source.mapping)
594 if (pack_hint is not None and595 if (pack_hint is not None and
595 self.target.repository._format.pack_compresses):596 self.target.repository._format.pack_compresses):
596 self.target.repository.pack(hint=pack_hint)597 self.target.repository.pack(hint=pack_hint)
598 return head, refs
599
600 def update_revisions(self, stop_revision=None, overwrite=False,
601 graph=None):
602 """See InterBranch.update_revisions()."""
603 head, refs = self.fetch_objects(stop_revision, fetch_tags=True)
597 if overwrite:604 if overwrite:
598 prev_last_revid = None605 prev_last_revid = None
599 else:606 else:

Subscribers

People subscribed via source and target branches

to all changes: