Merge lp:~jelmer/brz/move-generate-ids into lp:brz

Proposed by Jelmer Vernooij on 2019-02-05
Status: Merged
Approved by: Jelmer Vernooij on 2019-02-14
Approved revision: 7269
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/move-generate-ids
Merge into: lp:brz
Diff against target: 248 lines (+27/-20)
12 files modified
breezy/bzr/generate_ids.py (+3/-3)
breezy/bzr/inventory.py (+2/-4)
breezy/bzr/vf_repository.py (+5/-0)
breezy/bzr/workingtree_4.py (+1/-1)
breezy/merge.py (+1/-1)
breezy/plugins/fastimport/bzr_commit_handler.py (+1/-1)
breezy/repository.py (+0/-5)
breezy/tests/test_generate_ids.py (+3/-1)
breezy/tests/test_merge_core.py (+3/-1)
breezy/tests/test_transform.py (+3/-1)
breezy/upstream_import.py (+2/-1)
breezy/workingtree.py (+3/-1)
To merge this branch: bzr merge lp:~jelmer/brz/move-generate-ids
Reviewer Review Type Date Requested Status
Martin Packman 2019-02-05 Approve on 2019-02-14
Review via email: mp+362711@code.launchpad.net

Commit message

Move .generate_ids to breezy.bzr.

Description of the change

Move .generate_ids to breezy.bzr.

This functionality is bzr-specific.

To post a comment you must log in.
Martin Packman (gz) wrote :

Thanks!

review: Approve
lp:~jelmer/brz/move-generate-ids updated on 2019-02-14
7269. By Jelmer Vernooij on 2019-02-14

Fix import.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== renamed file 'breezy/generate_ids.py' => 'breezy/bzr/generate_ids.py'
2--- breezy/generate_ids.py 2018-11-11 04:08:32 +0000
3+++ breezy/bzr/generate_ids.py 2019-02-14 21:46:04 +0000
4@@ -18,7 +18,7 @@
5
6 from __future__ import absolute_import
7
8-from .lazy_import import lazy_import
9+from ..lazy_import import lazy_import
10 lazy_import(globals(), """
11 import time
12
13@@ -28,10 +28,10 @@
14 )
15 """)
16
17-from . import (
18+from .. import (
19 lazy_regex,
20 )
21-from .sixish import text_type
22+from ..sixish import text_type
23
24 # the regex removes any weird characters; we don't escape them
25 # but rather just pull them out
26
27=== modified file 'breezy/bzr/inventory.py'
28--- breezy/bzr/inventory.py 2018-11-22 22:15:05 +0000
29+++ breezy/bzr/inventory.py 2019-02-14 21:46:04 +0000
30@@ -38,18 +38,16 @@
31 from ..lazy_import import lazy_import
32 lazy_import(globals(), """
33
34-from breezy import (
35- generate_ids,
36- osutils,
37- )
38 from breezy.bzr import (
39 chk_map,
40+ generate_ids,
41 )
42 """)
43
44 from .. import (
45 errors,
46 lazy_regex,
47+ osutils,
48 trace,
49 )
50 from ..sixish import (
51
52=== modified file 'breezy/bzr/vf_repository.py'
53--- breezy/bzr/vf_repository.py 2019-02-02 15:13:30 +0000
54+++ breezy/bzr/vf_repository.py 2019-02-14 21:46:04 +0000
55@@ -39,6 +39,7 @@
56 from breezy.bzr import (
57 fetch as _mod_fetch,
58 check,
59+ generate_ids,
60 inventory_delta,
61 inventorytree,
62 versionedfile,
63@@ -230,6 +231,10 @@
64 self.parents)
65 return self._new_revision_id
66
67+ def _gen_revision_id(self):
68+ """Return new revision-id."""
69+ return generate_ids.gen_revision_id(self._committer, self._timestamp)
70+
71 def _require_root_change(self, tree):
72 """Enforce an appropriate root object change.
73
74
75=== modified file 'breezy/bzr/workingtree_4.py'
76--- breezy/bzr/workingtree_4.py 2018-12-18 20:55:37 +0000
77+++ breezy/bzr/workingtree_4.py 2019-02-14 21:46:04 +0000
78@@ -39,7 +39,6 @@
79 debug,
80 errors,
81 filters as _mod_filters,
82- generate_ids,
83 osutils,
84 revision as _mod_revision,
85 revisiontree,
86@@ -49,6 +48,7 @@
87 )
88 from breezy.bzr import (
89 dirstate,
90+ generate_ids,
91 )
92 """)
93
94
95=== modified file 'breezy/merge.py'
96--- breezy/merge.py 2018-11-18 01:02:16 +0000
97+++ breezy/merge.py 2019-02-14 21:46:04 +0000
98@@ -23,7 +23,6 @@
99 cleanup,
100 conflicts as _mod_conflicts,
101 debug,
102- generate_ids,
103 graph as _mod_graph,
104 merge3,
105 osutils,
106@@ -38,6 +37,7 @@
107 workingtree,
108 )
109 from breezy.bzr import (
110+ generate_ids,
111 versionedfile,
112 )
113 from breezy.i18n import gettext
114
115=== modified file 'breezy/plugins/fastimport/bzr_commit_handler.py'
116--- breezy/plugins/fastimport/bzr_commit_handler.py 2018-11-11 04:08:32 +0000
117+++ breezy/plugins/fastimport/bzr_commit_handler.py 2019-02-14 21:46:04 +0000
118@@ -20,11 +20,11 @@
119 from ... import (
120 debug,
121 errors,
122- generate_ids,
123 osutils,
124 revision,
125 )
126 from ...bzr import (
127+ generate_ids,
128 inventory,
129 serializer,
130 )
131
132=== modified file 'breezy/repository.py'
133--- breezy/repository.py 2019-02-01 16:56:56 +0000
134+++ breezy/repository.py 2019-02-14 21:46:04 +0000
135@@ -24,7 +24,6 @@
136 config,
137 controldir,
138 debug,
139- generate_ids,
140 graph,
141 osutils,
142 revision as _mod_revision,
143@@ -183,10 +182,6 @@
144 """
145 raise NotImplementedError(self.finish_inventory)
146
147- def _gen_revision_id(self):
148- """Return new revision-id."""
149- return generate_ids.gen_revision_id(self._committer, self._timestamp)
150-
151 def _generate_revision_if_needed(self, revision_id):
152 """Create a revision id if None was supplied.
153
154
155=== modified file 'breezy/tests/test_generate_ids.py'
156--- breezy/tests/test_generate_ids.py 2018-11-11 04:08:32 +0000
157+++ breezy/tests/test_generate_ids.py 2019-02-14 21:46:04 +0000
158@@ -17,8 +17,10 @@
159 """Tests for breezy/generate_ids.py"""
160
161 from .. import (
162+ tests,
163+ )
164+from ..bzr import (
165 generate_ids,
166- tests,
167 )
168
169
170
171=== modified file 'breezy/tests/test_merge_core.py'
172--- breezy/tests/test_merge_core.py 2018-11-11 04:08:32 +0000
173+++ breezy/tests/test_merge_core.py 2019-02-14 21:46:04 +0000
174@@ -21,7 +21,6 @@
175 from .. import (
176 controldir,
177 errors,
178- generate_ids,
179 merge_directive,
180 osutils,
181 )
182@@ -36,6 +35,9 @@
183 WeaveMerger,
184 Merger,
185 )
186+from ..bzr import (
187+ generate_ids,
188+ )
189 from ..osutils import getcwd, pathjoin
190 from ..transform import TreeTransform
191 from . import TestCaseWithTransport, TestSkipped
192
193=== modified file 'breezy/tests/test_transform.py'
194--- breezy/tests/test_transform.py 2018-11-18 00:25:19 +0000
195+++ breezy/tests/test_transform.py 2019-02-14 21:46:04 +0000
196@@ -24,7 +24,6 @@
197 bencode,
198 errors,
199 filters,
200- generate_ids,
201 osutils,
202 revision as _mod_revision,
203 rules,
204@@ -33,6 +32,9 @@
205 transform,
206 urlutils,
207 )
208+from ..bzr import (
209+ generate_ids,
210+ )
211 from ..conflicts import (
212 DeletingParent,
213 DuplicateEntry,
214
215=== modified file 'breezy/upstream_import.py'
216--- breezy/upstream_import.py 2018-11-11 04:08:32 +0000
217+++ breezy/upstream_import.py 2019-02-14 21:46:04 +0000
218@@ -28,7 +28,8 @@
219 import tarfile
220 import zipfile
221
222-from . import generate_ids, urlutils
223+from . import urlutils
224+from .bzr import generate_ids
225 from .controldir import ControlDir, is_control_filename
226 from .errors import (BzrError, NoSuchFile, BzrCommandError, NotBranchError)
227 from .osutils import (pathjoin, isdir, file_iterator, basename,
228
229=== modified file 'breezy/workingtree.py'
230--- breezy/workingtree.py 2019-02-14 03:30:18 +0000
231+++ breezy/workingtree.py 2019-02-14 21:46:04 +0000
232@@ -46,13 +46,15 @@
233 controldir,
234 errors,
235 filters as _mod_filters,
236- generate_ids,
237 merge,
238 revision as _mod_revision,
239 transform,
240 transport,
241 views,
242 )
243+from breezy.bzr import (
244+ generate_ids,
245+ )
246 """)
247
248 from . import (

Subscribers

People subscribed via source and target branches