Merge lp:~jelmer/brz/merge-3.3 into lp:brz

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merged at revision: 7665
Proposed branch: lp:~jelmer/brz/merge-3.3
Merge into: lp:brz
Diff against target: 212 lines (+69/-12)
7 files modified
.github/workflows/wheels.yaml (+3/-1)
Cargo.toml (+0/-1)
breezy/forge.py (+28/-3)
breezy/main.rs (+3/-4)
breezy/plugins/github/forge.py (+20/-0)
breezy/plugins/launchpad/forge.py (+5/-1)
breezy/plugins/propose/cmds.py (+10/-2)
To merge this branch: bzr merge lp:~jelmer/brz/merge-3.3
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve
Review via email: mp+432559@code.launchpad.net

Commit message

Description of the change

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Download full text (13.6 KiB)

The attempt to merge lp:~jelmer/brz/merge-3.3 into lp:brz failed. Command exited with 142.
Below is the output from the failed tests.

Collecting setuptools-gettext
  Downloading setuptools_gettext-0.1.1-py3-none-any.whl (10 kB)
Requirement already satisfied: setuptools>=46.1 in ./lib/python3.10/site-packages (from setuptools-gettext) (65.5.0)
Installing collected packages: setuptools-gettext
Successfully installed setuptools-gettext-0.1.1
Obtaining file:///tmp/tarmac/branch.yo2dq1va
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Checking if build backend supports build_editable: started
  Checking if build backend supports build_editable: finished with status 'done'
  Getting requirements to build editable: started
  Getting requirements to build editable: finished with status 'done'
  Preparing editable metadata (pyproject.toml): started
  Preparing editable metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: configobj in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (5.0.6)
Requirement already satisfied: dulwich>=0.20.46 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.20.46)
Requirement already satisfied: patiencediff in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.2.3)
Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (5.4.1)
Requirement already satisfied: merge3 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.0.8)
Requirement already satisfied: urllib3>=1.24.1 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (1.26.12)
Requirement already satisfied: fastbencode in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.0.12)
Collecting fastimport
  Downloading fastimport-0.9.14.tar.gz (41 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.8/41.8 kB 1.1 MB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: gpg in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (1.18.0)
Collecting python-subunit
  Downloading python_subunit-1.4.0-py2.py3-none-any.whl (106 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 106.1/106.1 kB 3.3 MB/s eta 0:00:00
Collecting testtools
  Downloading testtools-2.5.0-py3-none-any.whl (181 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 182.0/182.0 kB 8.6 MB/s eta 0:00:00
Requirement already satisfied: paramiko in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (2.10.4)
Requirement already satisfied: launchpadlib>=1.6.3 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (1.10.17)
Collecting sphinx
  Downloading sphinx-5.3.0-py3-none-any.whl (3.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 8.3 MB/s eta 0:00:00
Requirement already satisfied: setuptools in ./lib/python3.10/site-packages (from breezy==3.3.1.dev0) (65.5.0)
Collecting sphinx-epytext
  Downloading sphinx-epytext-0.0.4.tar.gz (3.6 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: httplib2 in /usr/lib/python3/dist-packages (from l...

lp:~jelmer/brz/merge-3.3 updated
7665. By Ondřej Pohořelský

Merge lp:brz/3.3

by jelmer review by jelmer

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.github/workflows/wheels.yaml'
--- .github/workflows/wheels.yaml 2022-10-21 07:48:29 +0000
+++ .github/workflows/wheels.yaml 2022-11-03 21:05:37 +0000
@@ -43,7 +43,9 @@
43 - name: Build wheels43 - name: Build wheels
44 run: python -m cibuildwheel --output-dir wheelhouse44 run: python -m cibuildwheel --output-dir wheelhouse
45 env:45 env:
46 CIBW_ARCHS_LINUX: x86_64 aarch6446 CIBW_ARCHS_LINUX: x86_64
47 # ARM builds fail at the moment:
48 # CIBW_ARCHS_LINUX: x86_64 aarch64
47 CIBW_ARCHS_MACOS: x86_64 arm64 universal249 CIBW_ARCHS_MACOS: x86_64 arm64 universal2
48 CIBW_SKIP: '*-win32'50 CIBW_SKIP: '*-win32'
49 CIBW_ENVIRONMENT: 'PATH="$HOME/.cargo/bin:$PATH"'51 CIBW_ENVIRONMENT: 'PATH="$HOME/.cargo/bin:$PATH"'
5052
=== modified file 'Cargo.toml'
--- Cargo.toml 2022-10-29 18:49:13 +0000
+++ Cargo.toml 2022-11-03 21:05:37 +0000
@@ -19,5 +19,4 @@
19path = "breezy/main.rs"19path = "breezy/main.rs"
2020
21[dependencies]21[dependencies]
22pkg-version = "1.0.0"
23pyo3 = ">=0.14,<0.16"22pyo3 = ">=0.14,<0.16"
2423
=== modified file 'breezy/forge.py'
--- breezy/forge.py 2022-11-02 11:49:27 +0000
+++ breezy/forge.py 2022-11-03 21:05:37 +0000
@@ -221,7 +221,7 @@
221 raise NotImplementedError(self.post_comment)221 raise NotImplementedError(self.post_comment)
222222
223 def reopen(self):223 def reopen(self):
224 """Reopen the merge proposal if it is closed."""224 """Reopen this merge proposal."""
225 raise NotImplementedError(self.reopen)225 raise NotImplementedError(self.reopen)
226226
227227
@@ -366,7 +366,7 @@
366 def probe_from_hostname(cls, hostname, possible_transports=None):366 def probe_from_hostname(cls, hostname, possible_transports=None):
367 """Create a Forge object if this forge knows about a hostname.367 """Create a Forge object if this forge knows about a hostname.
368 """368 """
369 raise NotImplementedError(self.probe_from_hostname)369 raise NotImplementedError(cls.probe_from_hostname)
370370
371 @classmethod371 @classmethod
372 def probe_from_branch(cls, branch):372 def probe_from_branch(cls, branch):
@@ -379,7 +379,7 @@
379 def probe_from_url(cls, url, possible_transports=None):379 def probe_from_url(cls, url, possible_transports=None):
380 """Create a Forge object if this forge knows about a URL."""380 """Create a Forge object if this forge knows about a URL."""
381 hostname = urlutils.URL.from_string(url).host381 hostname = urlutils.URL.from_string(url).host
382 return cls.probe_from_hostname(hostname, possible_forges)382 return cls.probe_from_hostname(hostname, possible_transports=possible_transports)
383383
384 def iter_my_proposals(self, status='open', author=None):384 def iter_my_proposals(self, status='open', author=None):
385 """Iterate over the proposals created by the currently logged in user.385 """Iterate over the proposals created by the currently logged in user.
@@ -406,6 +406,11 @@
406 """406 """
407 raise NotImplementedError(self.delete_project)407 raise NotImplementedError(self.delete_project)
408408
409 def create_project(self, name):
410 """Create a project.
411 """
412 raise NotImplementedError(self.create_project)
413
409 @classmethod414 @classmethod
410 def iter_instances(cls):415 def iter_instances(cls):
411 """Iterate instances.416 """Iterate instances.
@@ -505,4 +510,24 @@
505 raise UnsupportedForge(url)510 raise UnsupportedForge(url)
506511
507512
513def create_project(url: str) -> None:
514 """Create a project.
515
516 Args:
517 url: URL of project to create
518 """
519 parsed_url = urlutils.URL.from_string(url)
520 hostname = parsed_url.host
521 for name, forge_cls in forges.items():
522 try:
523 hoster = forge_cls.probe_from_url(url)
524 except UnsupportedForge:
525 pass
526 else:
527 hoster.create_project(parsed_url.path)
528 break
529 else:
530 raise UnsupportedForge(url)
531
532
508forges = registry.Registry()533forges = registry.Registry()
509534
=== modified file 'breezy/main.rs'
--- breezy/main.rs 2021-11-20 02:18:52 +0000
+++ breezy/main.rs 2022-11-03 21:05:37 +0000
@@ -1,13 +1,12 @@
1use pkg_version::*;
2use pyo3::prelude::*;1use pyo3::prelude::*;
3use pyo3::types::*;2use pyo3::types::*;
4use std::path::*;3use std::path::*;
54
6const MAJOR: u32 = pkg_version_major!();
7const MINOR: u32 = pkg_version_minor!();
8const PATCH: u32 = pkg_version_patch!();
95
10fn check_version(py: Python<'_>) -> PyResult<()> {6fn check_version(py: Python<'_>) -> PyResult<()> {
7 let MAJOR: u32 = env!("CARGO_PKG_VERSION_MAJOR").parse::<u32>().unwrap();
8 let MINOR: u32 = env!("CARGO_PKG_VERSION_MINOR").parse::<u32>().unwrap();
9 let PATCH: u32 = env!("CARGO_PKG_VERSION_PATCH").parse::<u32>().unwrap();
11 let breezy = PyModule::import(py, "breezy").map_err(|e| {10 let breezy = PyModule::import(py, "breezy").map_err(|e| {
12 eprintln!(11 eprintln!(
13 "brz: ERROR: Couldn't import breezy and dependencies.\n\12 "brz: ERROR: Couldn't import breezy and dependencies.\n\
1413
=== modified file 'breezy/plugins/github/forge.py'
--- breezy/plugins/github/forge.py 2022-11-01 10:25:33 +0000
+++ breezy/plugins/github/forge.py 2022-11-03 21:05:37 +0000
@@ -708,6 +708,26 @@
708 return json.loads(response.text)708 return json.loads(response.text)
709 raise UnexpectedHttpStatus(path, response.status, headers=response.getheaders())709 raise UnexpectedHttpStatus(path, response.status, headers=response.getheaders())
710710
711 def create_project(self, path, *, description=None, homepage=None,
712 private=False, has_issues=True, has_projects=False,
713 has_wiki=False):
714 owner, name = path.split('/')
715 path = 'repos'
716 data = {
717 "name": "name",
718 "description": description,
719 "homepage": homepage,
720 "private": private,
721 "has_issues": has_issues,
722 "has_projects": has_projects,
723 "has_wiki": has_wiki,
724 }
725 response = self._api_request(
726 'POST', path, body=json.dumps(data).encode('utf-8'))
727 if response.status != 201:
728 return json.loads(response.text)
729 raise UnexpectedHttpStatus(path, response.status, headers=response.getheaders())
730
711 def get_current_user(self):731 def get_current_user(self):
712 if self._token is not None:732 if self._token is not None:
713 return self.current_user['login']733 return self.current_user['login']
714734
=== modified file 'breezy/plugins/launchpad/forge.py'
--- breezy/plugins/launchpad/forge.py 2022-11-01 10:25:33 +0000
+++ breezy/plugins/launchpad/forge.py 2022-11-03 21:05:37 +0000
@@ -110,7 +110,7 @@
110 self._mp = mp110 self._mp = mp
111111
112 def get_web_url(self):112 def get_web_url(self):
113 return self.web_link113 return self._mp.web_link
114114
115 def get_source_branch_url(self):115 def get_source_branch_url(self):
116 if self._mp.source_branch:116 if self._mp.source_branch:
@@ -545,6 +545,10 @@
545 mp = self.launchpad.load(api_url)545 mp = self.launchpad.load(api_url)
546 return LaunchpadMergeProposal(mp)546 return LaunchpadMergeProposal(mp)
547547
548 def create_project(self, path):
549 self.launchpad.projects.new_project(
550 display_name=path, name=path, summary=path, title=path)
551
548552
549class LaunchpadBazaarMergeProposalBuilder(MergeProposalBuilder):553class LaunchpadBazaarMergeProposalBuilder(MergeProposalBuilder):
550554
551555
=== modified file 'breezy/plugins/propose/cmds.py'
--- breezy/plugins/propose/cmds.py 2022-10-31 16:47:31 +0000
+++ breezy/plugins/propose/cmds.py 2022-11-03 21:05:37 +0000
@@ -162,6 +162,7 @@
162 Option('allow-empty',162 Option('allow-empty',
163 help='Do not prevent empty merge proposals.'),163 help='Do not prevent empty merge proposals.'),
164 Option('overwrite', help="Overwrite existing commits."),164 Option('overwrite', help="Overwrite existing commits."),
165 Option('open', help='Open merge proposal in web browser'),
165 ]166 ]
166 takes_args = ['submit_branch?']167 takes_args = ['submit_branch?']
167168
@@ -170,7 +171,8 @@
170 def run(self, submit_branch=None, directory='.', forge=None,171 def run(self, submit_branch=None, directory='.', forge=None,
171 reviewers=None, name=None, no_allow_lossy=False, description=None,172 reviewers=None, name=None, no_allow_lossy=False, description=None,
172 labels=None, prerequisite=None, commit_message=None, wip=False,173 labels=None, prerequisite=None, commit_message=None, wip=False,
173 allow_collaboration=False, allow_empty=False, overwrite=False):174 allow_collaboration=False, allow_empty=False, overwrite=False,
175 open=False):
174 tree, branch, relpath = (176 tree, branch, relpath = (
175 controldir.ControlDir.open_containing_tree_or_branch(directory))177 controldir.ControlDir.open_containing_tree_or_branch(directory))
176 if submit_branch is None:178 if submit_branch is None:
@@ -194,7 +196,8 @@
194 overwrite=overwrite)196 overwrite=overwrite)
195 branch.set_push_location(remote_branch.user_url)197 branch.set_push_location(remote_branch.user_url)
196 branch.set_submit_branch(target.user_url)198 branch.set_submit_branch(target.user_url)
197 note(gettext('Published branch to %s') % public_branch_url)199 note(gettext('Published branch to %s'),
200 forge.get_web_url(remote_branch) or public_branch_url)
198 if prerequisite is not None:201 if prerequisite is not None:
199 prerequisite_branch = _mod_branch.Branch.open(prerequisite)202 prerequisite_branch = _mod_branch.Branch.open(prerequisite)
200 else:203 else:
@@ -217,6 +220,11 @@
217 note(gettext('There is already a branch merge proposal: %s'), e.url)220 note(gettext('There is already a branch merge proposal: %s'), e.url)
218 else:221 else:
219 note(gettext('Merge proposal created: %s') % proposal.url)222 note(gettext('Merge proposal created: %s') % proposal.url)
223 if open:
224 web_url = proposal.get_web_url()
225 note(gettext('Opening %s in web browser'), web_url)
226 import webbrowser
227 webbrowser.open(web_url)
220228
221229
222class cmd_find_merge_proposal(Command):230class cmd_find_merge_proposal(Command):

Subscribers

People subscribed via source and target branches