Merge lp:~jelmer/brz/move-patch-tree into lp:brz
- move-patch-tree
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Jelmer Vernooij |
Approved revision: | 7859 |
Merged at revision: | 7862 |
Proposed branch: | lp:~jelmer/brz/move-patch-tree |
Merge into: | lp:brz |
Diff against target: |
93 lines (+21/-19) 5 files modified
breezy/builtins.py (+1/-2) breezy/git/commands.py (+1/-1) breezy/mutabletree.py (+1/-0) breezy/patch.py (+5/-16) breezy/workingtree.py (+13/-0) |
To merge this branch: | bzr merge lp:~jelmer/brz/move-patch-tree |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jelmer Vernooij | Approve | ||
Review via email: mp+445416@code.launchpad.net |
Commit message
Move patch_tree to breezy.workingtree
Description of the change
Move patch_tree to breezy.workingtree
Jelmer Vernooij (jelmer) : | # |
The Breezy Bot (the-breezy-bot) wrote : | # |
The Breezy Bot (the-breezy-bot) wrote : | # |
The attempt to merge lp:~jelmer/brz/move-patch-tree into lp:brz failed. Command exited with 2.
Below is the output from the failed tests.
... OUTPUT TRIMMED ...
|
193 | DateTime:
| ^^^^^^^^^^^^^^
warning: use of deprecated associated function `chrono:
--> crates/
|
198 | let local = Local.timestamp(t, 0);
| ^^^^^^^^^
warning: use of deprecated associated function `chrono:
--> crates/
|
287 | let system_time = Utc.timestamp(when as i64, 0);
| ^^^^^^^^^
warning: unused import: `std::io::Write`
--> crates/
|
5 | use std::io::Write;
| ^^^^^^^^^^^^^^
|
= note: `#[warn(
Fresh xmltree v0.10.3
Fresh serde v1.0.164
Fresh bendy v0.3.3
Fresh unicode-linebreak v0.1.4
Fresh fancy-regex v0.11.0
warning: `breezy-osutils` (lib) generated 8 warnings
Fresh locale_config v0.3.0
Fresh ghost v0.1.9
Fresh unicode-width v0.1.10
Fresh unsafe-libyaml v0.2.8
Fresh itoa v1.0.6
Fresh ryu v1.0.13
Fresh smawk v0.3.1
Fresh serde_yaml v0.9.21
Fresh inventory v0.3.6
Fresh textwrap v0.16.0
Fresh gettext-rs v0.7.0
Fresh url v2.4.0
Running `rustc --crate-name pyo3_build_config --edition=2018 /root/.
Compiling pyo3-ffi v0.19.0
Compiling pyo3 v0.19.0
Running `rustc --crate-name build_script_build --edition=2018 /root/.
Running `rustc --crate-name build_script_build --edition=2018 /root/.
The Breezy Bot (the-breezy-bot) wrote : | # |
The attempt to merge lp:~jelmer/brz/move-patch-tree into lp:brz failed. Command exited with 2.
Below is the output from the failed tests.
... OUTPUT TRIMMED ...
lib/python3.
lib/python3.
lib/python3.
lib/python3.
lib/python3.
lib/python3.
lib/python3.
lib/python3.
lib/python3.
lib/python3.
lib/python3.
lib/python3.
lib/python3.
lib/python3.
lib/python3.
lib/python3.
lib/python3.
lib/python3.
lib/python3.
lib/python3.
lib/python3.
lib/python3.
lib/python3.
lib/python3.
The Breezy Bot (the-breezy-bot) wrote : | # |
The attempt to merge lp:~jelmer/brz/move-patch-tree into lp:brz failed. Command exited with 2.
Below is the output from the failed tests.
... OUTPUT TRIMMED ...
warning: use of deprecated associated function `chrono:
--> crates/
|
287 | let system_time = Utc.timestamp(when as i64, 0);
| ^^^^^^^^^
warning: unused import: `std::io::Write`
--> crates/
|
5 | use std::io::Write;
| ^^^^^^^^^^^^^^
|
= note: `#[warn(
Fresh gettext-sys v0.21.3
Fresh unicode-linebreak v0.1.4
Fresh bendy v0.3.3
Fresh fancy-regex v0.11.0
warning: `breezy-osutils` (lib) generated 8 warnings
Fresh locale_config v0.3.0
Fresh ghost v0.1.9
Fresh ryu v1.0.13
Fresh unsafe-libyaml v0.2.8
Fresh smawk v0.3.1
Fresh itoa v1.0.6
Fresh unicode-width v0.1.10
Fresh gettext-rs v0.7.0
Fresh textwrap v0.16.0
Fresh serde_yaml v0.9.21
Fresh inventory v0.3.6
Fresh url v2.4.0
Running `rustc --crate-name pyo3_build_config --edition=2018 /root/.
Compiling pyo3-ffi v0.19.0
Compiling pyo3 v0.19.0
Running `rustc --crate-name build_script_build --edition=2018 /root/.
Running `rustc --crate-name build_script_build --edition=2018 /root/.
The Breezy Bot (the-breezy-bot) wrote : | # |
The attempt to merge lp:~jelmer/brz/move-patch-tree into lp:brz failed. Command exited with 2.
Below is the output from the failed tests.
... OUTPUT TRIMMED ...
--> crates/
|
23 | const HASH_LIMIT: usize = 64;
| ^^^^^^^^^^
warning: constant `RABIN_SHIFT` is never used
--> crates/
|
25 | const RABIN_SHIFT: usize = 23;
| ^^^^^^^^^^^
warning: constant `RABIN_WINDOW` is never used
--> crates/
|
26 | const RABIN_WINDOW: usize = 16;
| ^^^^^^^^^^^^
warning: constant `EXTRA_NULLS` is never used
--> crates/
|
31 | const EXTRA_NULLS: usize = 4;
| ^^^^^^^^^^^
warning: constant `T` is never used
--> crates/
|
33 | const T: &[u32; 256] = &[
| ^
warning: constant `U` is never used
--> crates/
|
68 | const U: &[u32; 256] = &[
| ^
warning: struct `SourceInfo` is never constructed
--> crates/
|
103 | struct SourceInfo {
| ^^^^^^^^^^
warning: constant `DELTA_SIZE_MIN` is never used
--> crates/
|
118 | const DELTA_SIZE_MIN: u64 = 3;
| ^^^^^^^^^^^^^^
warning: function `get_delta_
--> crates/
|
120 | fn get_delta_
| ^^^^^^^^^^^^^^^^^^
warning: function `get_text` is never used
--> crates/
|
141 | fn get_text(buff: &mut [u8; 128], ptr: &[u8]) {
| ^^^^^^^^
warning: function `rabin_hash` is never used
--> crates/
|
171 | fn rabin_hash(data: &[u8]) -> u32 {
| ^^^^^^^^^^
warning: function `surrogate_escape` is never used
--> crates/
|
112 | fn surrogate_escape(b: u8) -> Vec<u8> {
| ^^^^^^^^^^^^^^^^
Compiling breezy v3.4.0 (/tmp/tarmac/
Running `rustc --crate-name breezy --edition=2021 src/lib.rs --error-format=json --json=
The Breezy Bot (the-breezy-bot) wrote : | # |
The attempt to merge lp:~jelmer/brz/move-patch-tree into lp:brz failed. Command exited with -15.
Below is the output from the failed tests.
Collecting setuptools-gettext
Downloading setuptools_
Requirement already satisfied: setuptools>=46.1 in ./lib/python3.
Installing collected packages: setuptools-gettext
Successfully installed setuptools-
Obtaining file://
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'
Installing backend dependencies: started
Installing backend dependencies: 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/
Requirement already satisfied: fastbencode in /usr/lib/
Requirement already satisfied: patiencediff in /usr/lib/
Requirement already satisfied: merge3 in /usr/lib/
Collecting dulwich>=0.21.3 (from breezy==3.4.0.dev0)
Downloading dulwich-
━━
Requirement already satisfied: urllib3>=1.24.1 in /usr/lib/
Requirement already satisfied: pyyaml in /usr/lib/
Collecting testtools>=0.9.5 (from breezy==3.4.0.dev0)
Downloading testtools-
━━
Collecting testscenarios (from breezy==3.4.0.dev0)
Downloading testscenarios-
Collecting python-subunit (from breezy==3.4.0.dev0)
Downloading python_
━━
Requirement already satisfied: flake8 in /usr/lib/
Collecting cython>=0.29 (from breezy==3.4.0.dev0)
Using cached Cython-
Collecting ruff (from breezy==3.4.0.dev0)
Downloading ruff-0.
━━
Collecting docutils (from breezy==3.4.0.dev0)
Downloading docutils-
━━
Requirement already satisfied: setuptools i...
Preview Diff
1 | === modified file 'breezy/builtins.py' |
2 | --- breezy/builtins.py 2023-06-24 13:01:43 +0000 |
3 | +++ breezy/builtins.py 2023-06-28 12:51:16 +0000 |
4 | @@ -7095,8 +7095,7 @@ |
5 | Option('silent', help='Suppress chatter.')] |
6 | |
7 | def run(self, filename=None, strip=None, silent=False): |
8 | - from .patch import patch_tree |
9 | - from .workingtree import WorkingTree |
10 | + from .workingtree import WorkingTree, patch_tree |
11 | wt = WorkingTree.open_containing('.')[0] |
12 | if strip is None: |
13 | strip = 1 |
14 | |
15 | === modified file 'breezy/git/commands.py' |
16 | --- breezy/git/commands.py 2023-06-24 13:01:43 +0000 |
17 | +++ breezy/git/commands.py 2023-06-28 12:51:16 +0000 |
18 | @@ -228,7 +228,7 @@ |
19 | """ |
20 | from dulwich.patch import git_am_patch_split |
21 | |
22 | - from ..patch import patch_tree |
23 | + from ..workingtree import patch_tree |
24 | (c, diff, version) = git_am_patch_split(f) |
25 | # FIXME: Cope with git-specific bits in patch |
26 | # FIXME: Add new files to working tree |
27 | |
28 | === modified file 'breezy/mutabletree.py' |
29 | --- breezy/mutabletree.py 2023-06-24 13:01:43 +0000 |
30 | +++ breezy/mutabletree.py 2023-06-28 12:51:16 +0000 |
31 | @@ -359,3 +359,4 @@ |
32 | def __init__(self, mutable_tree): |
33 | """Create the parameters for the post_commit hook.""" |
34 | self.mutable_tree = mutable_tree |
35 | + |
36 | |
37 | === modified file 'breezy/patch.py' |
38 | --- breezy/patch.py 2023-06-24 13:01:43 +0000 |
39 | +++ breezy/patch.py 2023-06-28 12:51:16 +0000 |
40 | @@ -17,7 +17,11 @@ |
41 | |
42 | """Diff and patch functionality.""" |
43 | |
44 | -from ._patch_rs import ( # noqa: F401 |
45 | +__all__ = ['PatchFailed', 'PatchInvokeError', 'diff3', |
46 | + 'format_patch_date', 'iter_patched_from_hunks', 'parse_patch_date', |
47 | + 'patch', 'run_patch'] |
48 | + |
49 | +from ._patch_rs import ( |
50 | PatchFailed, |
51 | PatchInvokeError, |
52 | diff3, |
53 | @@ -27,18 +31,3 @@ |
54 | patch, |
55 | run_patch, |
56 | ) |
57 | - |
58 | - |
59 | -def patch_tree(tree, patches, strip=0, reverse=False, dry_run=False, |
60 | - quiet=False, out=None): |
61 | - """Apply a patch to a tree. |
62 | - |
63 | - Args: |
64 | - tree: A MutableTree object |
65 | - patches: list of patches as bytes |
66 | - strip: Strip X segments of paths |
67 | - reverse: Apply reversal of patch |
68 | - dry_run: Dry run |
69 | - """ |
70 | - return run_patch(tree.basedir, patches=patches, strip=strip, |
71 | - reverse=reverse, dry_run=dry_run, quiet=quiet, out=out) |
72 | |
73 | === modified file 'breezy/workingtree.py' |
74 | --- breezy/workingtree.py 2023-06-24 13:01:43 +0000 |
75 | +++ breezy/workingtree.py 2023-06-28 12:51:16 +0000 |
76 | @@ -1263,4 +1263,17 @@ |
77 | return self._matchingcontroldir |
78 | |
79 | |
80 | +def patch_tree(tree: WorkingTree, patches, strip: int = 0, reverse: bool = False, dry_run: bool = False, |
81 | + quiet: bool = False, out=None): |
82 | + """Apply a patch to a tree. |
83 | |
84 | + Args: |
85 | + tree: A MutableTree object |
86 | + patches: list of patches as bytes |
87 | + strip: Strip X segments of paths |
88 | + reverse: Apply reversal of patch |
89 | + dry_run: Dry run |
90 | + """ |
91 | + from .patch import run_patch |
92 | + return run_patch(tree.basedir, patches=patches, strip=strip, |
93 | + reverse=reverse, dry_run=dry_run, quiet=quiet, out=out) |
Attempt to merge into lp:brz failed due to conflicts:
text conflict in breezy/patch.py