Merge lp:~jelmer/brz/launchpad-git-push into lp:brz/3.1

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/launchpad-git-push
Merge into: lp:brz/3.1
Diff against target: 69 lines (+17/-6)
3 files modified
breezy/git/remote.py (+10/-4)
breezy/plugins/launchpad/hoster.py (+3/-2)
doc/en/release-notes/brz-3.1.txt (+4/-0)
To merge this branch: bzr merge lp:~jelmer/brz/launchpad-git-push
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve
Review via email: mp+388175@code.launchpad.net

Commit message

Fix various issues pushing to Launchpad Git repositories.

Description of the change

Fix various issues pushing to Launchpad Git repositories.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'breezy/git/remote.py'
--- breezy/git/remote.py 2020-07-15 22:39:05 +0000
+++ breezy/git/remote.py 2020-07-28 02:42:32 +0000
@@ -610,11 +610,16 @@
610 push_result.branch_push_result = None610 push_result.branch_push_result = None
611 repo = self.find_repository()611 repo = self.find_repository()
612 refname = self._get_selected_ref(name)612 refname = self._get_selected_ref(name)
613 ref_chain, old_sha = self.get_refs_container().follow(refname)613 try:
614 if ref_chain:614 ref_chain, old_sha = self.get_refs_container().follow(refname)
615 actual_refname = ref_chain[-1]615 except NotBranchError:
616 else:
617 actual_refname = refname616 actual_refname = refname
617 old_sha = None
618 else:
619 if ref_chain:
620 actual_refname = ref_chain[-1]
621 else:
622 actual_refname = refname
618 if isinstance(source, GitBranch) and lossy:623 if isinstance(source, GitBranch) and lossy:
619 raise errors.LossyPushToSameVCS(source.controldir, self)624 raise errors.LossyPushToSameVCS(source.controldir, self)
620 source_store = get_object_store(source.repository)625 source_store = get_object_store(source.repository)
@@ -634,6 +639,7 @@
634 raise errors.NoRoundtrippingSupport(639 raise errors.NoRoundtrippingSupport(
635 source, self.open_branch(name=name, nascent_ok=True))640 source, self.open_branch(name=name, nascent_ok=True))
636 if not overwrite:641 if not overwrite:
642 old_sha = remote_refs.get(actual_refname)
637 if remote_divergence(old_sha, new_sha, source_store):643 if remote_divergence(old_sha, new_sha, source_store):
638 raise DivergedBranches(644 raise DivergedBranches(
639 source, self.open_branch(name, nascent_ok=True))645 source, self.open_branch(name, nascent_ok=True))
640646
=== modified file 'breezy/plugins/launchpad/hoster.py'
--- breezy/plugins/launchpad/hoster.py 2020-07-24 17:47:14 +0000
+++ breezy/plugins/launchpad/hoster.py 2020-07-28 02:42:32 +0000
@@ -723,7 +723,8 @@
723 revid=self.source_branch.last_revision())723 revid=self.source_branch.last_revision())
724724
725 def create_proposal(self, description, reviewers=None, labels=None,725 def create_proposal(self, description, reviewers=None, labels=None,
726 prerequisite_branch=None, commit_message=None):726 prerequisite_branch=None, commit_message=None,
727 work_in_progress=False, allow_collaboration=False):
727 """Perform the submission."""728 """Perform the submission."""
728 if labels:729 if labels:
729 raise LabelsUnsupported(self)730 raise LabelsUnsupported(self)
@@ -741,7 +742,7 @@
741 merge_prerequisite=prereq_branch_lp,742 merge_prerequisite=prereq_branch_lp,
742 initial_comment=description.strip(),743 initial_comment=description.strip(),
743 commit_message=commit_message,744 commit_message=commit_message,
744 needs_review=True,745 needs_review=(not work_in_progress),
745 reviewers=[self.launchpad.people[reviewer].self_link746 reviewers=[self.launchpad.people[reviewer].self_link
746 for reviewer in reviewers],747 for reviewer in reviewers],
747 review_types=[None for reviewer in reviewers])748 review_types=[None for reviewer in reviewers])
748749
=== modified file 'doc/en/release-notes/brz-3.1.txt'
--- doc/en/release-notes/brz-3.1.txt 2020-07-28 01:28:20 +0000
+++ doc/en/release-notes/brz-3.1.txt 2020-07-28 02:42:32 +0000
@@ -66,6 +66,10 @@
66 * Prevent exceptions during commit when quilt is not installed but66 * Prevent exceptions during commit when quilt is not installed but
67 the tree contains quilt patches. (Jelmer Vernooij)67 the tree contains quilt patches. (Jelmer Vernooij)
6868
69 * Support pushing to Git repositories that do not yet exist,
70 such as is the case on Launchpad repositories.
71 (Jelmer Vernooij)
72
69Documentation73Documentation
70*************74*************
7175

Subscribers

People subscribed via source and target branches