bzr branch
http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
0.358.2
by Jelmer Vernooij
Refresh copyright headers, add my email. |
1 |
# Copyright (C) 2008-2018 Jelmer Vernooij <jelmer@jelmer.uk>
|
0.200.18
by John Arbash Meinel
Start splitting up the Git{Branch,Dir,Repository} into separate modules, etc. |
2 |
# Copyright (C) 2007 Canonical Ltd
|
3 |
#
|
|
4 |
# This program is free software; you can redistribute it and/or modify
|
|
5 |
# it under the terms of the GNU General Public License as published by
|
|
6 |
# the Free Software Foundation; either version 2 of the License, or
|
|
7 |
# (at your option) any later version.
|
|
8 |
#
|
|
9 |
# This program is distributed in the hope that it will be useful,
|
|
10 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12 |
# GNU General Public License for more details.
|
|
13 |
#
|
|
14 |
# You should have received a copy of the GNU General Public License
|
|
15 |
# along with this program; if not, write to the Free Software
|
|
0.358.1
by Jelmer Vernooij
Fix FSF address. |
16 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
0.200.18
by John Arbash Meinel
Start splitting up the Git{Branch,Dir,Repository} into separate modules, etc. |
17 |
|
18 |
"""An adapter between a Git Repository and a Bazaar Branch"""
|
|
19 |
||
0.200.1594
by Jelmer Vernooij
Use absolute_import everywhere. |
20 |
from __future__ import absolute_import |
21 |
||
6986.2.1
by Jelmer Vernooij
Move breezy.plugins.git to breezy.git. |
22 |
from .. import ( |
0.200.1244
by Jelmer Vernooij
Implement GitRepository.check. |
23 |
check, |
0.200.43
by David Allouche
Ultra-experimental support for "bzr pull". No test. No sanity. |
24 |
errors, |
0.200.1281
by Jelmer Vernooij
Provide Repository.get_known_graph_ancestry. |
25 |
graph as _mod_graph, |
0.200.1670
by Jelmer Vernooij
Fix compatibility with newer versions of bzr. |
26 |
lock, |
0.200.18
by John Arbash Meinel
Start splitting up the Git{Branch,Dir,Repository} into separate modules, etc. |
27 |
repository, |
0.285.5
by Jelmer Vernooij
Fix import. |
28 |
revision as _mod_revision, |
0.425.1
by Jelmer Vernooij
Add really basic check implementation. |
29 |
trace, |
0.200.1411
by Jelmer Vernooij
Fix control files. |
30 |
transactions, |
0.200.1601
by Jelmer Vernooij
remove compatibility code for bzr < 2.5. |
31 |
ui, |
0.200.18
by John Arbash Meinel
Start splitting up the Git{Branch,Dir,Repository} into separate modules, etc. |
32 |
)
|
6986.2.1
by Jelmer Vernooij
Move breezy.plugins.git to breezy.git. |
33 |
from ..decorators import only_raises |
34 |
from ..foreign import ( |
|
0.200.292
by Jelmer Vernooij
Fix formatting. |
35 |
ForeignRepository, |
36 |
)
|
|
0.200.18
by John Arbash Meinel
Start splitting up the Git{Branch,Dir,Repository} into separate modules, etc. |
37 |
|
0.200.1641
by Jelmer Vernooij
Use relative imports where possible. |
38 |
from .commit import ( |
0.200.387
by Jelmer Vernooij
Initial work on supporting commit in git trees. |
39 |
GitCommitBuilder, |
40 |
)
|
|
0.200.1641
by Jelmer Vernooij
Use relative imports where possible. |
41 |
from .filegraph import ( |
0.200.1283
by Jelmer Vernooij
Provide Repository.get_file_graph() and Tree.get_file_revision(). |
42 |
GitFileLastChangeScanner, |
43 |
GitFileParentProvider, |
|
44 |
)
|
|
0.200.1641
by Jelmer Vernooij
Use relative imports where possible. |
45 |
from .mapping import ( |
0.200.256
by Jelmer Vernooij
Add tests for import_revision_gist. |
46 |
default_mapping, |
0.200.1263
by Jelmer Vernooij
Fix foreign_vcs_git. |
47 |
foreign_vcs_git, |
0.200.256
by Jelmer Vernooij
Add tests for import_revision_gist. |
48 |
mapping_registry, |
49 |
)
|
|
0.200.1641
by Jelmer Vernooij
Use relative imports where possible. |
50 |
from .tree import ( |
0.200.617
by Jelmer Vernooij
Add custom InterTree for use between git revision trees. |
51 |
GitRevisionTree, |
52 |
)
|
|
0.200.18
by John Arbash Meinel
Start splitting up the Git{Branch,Dir,Repository} into separate modules, etc. |
53 |
|
54 |
||
0.200.1636
by Jelmer Vernooij
Some formatting fixes. |
55 |
from dulwich.errors import ( |
56 |
NotCommitError, |
|
57 |
)
|
|
0.252.21
by Jelmer Vernooij
Fix GitRepository.all_revision_ids() to find all revisions. |
58 |
from dulwich.objects import ( |
59 |
Commit, |
|
0.200.1153
by Jelmer Vernooij
Import ZERO_SHA from dulwich.objects. |
60 |
ZERO_SHA, |
0.252.21
by Jelmer Vernooij
Fix GitRepository.all_revision_ids() to find all revisions. |
61 |
)
|
0.200.1233
by Jelmer Vernooij
Implement Repository.iter_files_bytes. |
62 |
from dulwich.object_store import ( |
63 |
tree_lookup_path, |
|
64 |
)
|
|
0.252.21
by Jelmer Vernooij
Fix GitRepository.all_revision_ids() to find all revisions. |
65 |
|
66 |
||
0.200.1244
by Jelmer Vernooij
Implement GitRepository.check. |
67 |
class GitCheck(check.Check): |
68 |
||
69 |
def __init__(self, repository, check_repo=True): |
|
70 |
self.repository = repository |
|
0.425.1
by Jelmer Vernooij
Add really basic check implementation. |
71 |
self.check_repo = check_repo |
0.200.1244
by Jelmer Vernooij
Implement GitRepository.check. |
72 |
self.checked_rev_cnt = 0 |
0.425.1
by Jelmer Vernooij
Add really basic check implementation. |
73 |
self.object_count = None |
74 |
self.problems = [] |
|
0.200.1244
by Jelmer Vernooij
Implement GitRepository.check. |
75 |
|
76 |
def check(self, callback_refs=None, check_repo=True): |
|
77 |
if callback_refs is None: |
|
78 |
callback_refs = {} |
|
7143.15.3
by Jelmer Vernooij
Fix pep8 issues in breezy.git. |
79 |
with self.repository.lock_read(), \ |
80 |
ui.ui_factory.nested_progress_bar() as self.progress: |
|
0.425.1
by Jelmer Vernooij
Add really basic check implementation. |
81 |
shas = set(self.repository._git.object_store) |
82 |
self.object_count = len(shas) |
|
83 |
# TODO(jelmer): Check more things
|
|
84 |
for i, sha in enumerate(shas): |
|
85 |
self.progress.update('checking objects', i, self.object_count) |
|
86 |
o = self.repository._git.object_store[sha] |
|
87 |
try: |
|
88 |
o.check() |
|
89 |
except Exception as e: |
|
90 |
self.problems.append((sha, e)) |
|
91 |
||
92 |
def _report_repo_results(self, verbose): |
|
93 |
trace.note('checked repository {0} format {1}'.format( |
|
94 |
self.repository.user_url, |
|
95 |
self.repository._format)) |
|
96 |
trace.note('%6d objects', self.object_count) |
|
97 |
for sha, problem in self.problems: |
|
98 |
trace.note('%s: %s', sha, problem) |
|
0.200.1244
by Jelmer Vernooij
Implement GitRepository.check. |
99 |
|
100 |
def report_results(self, verbose): |
|
0.425.1
by Jelmer Vernooij
Add really basic check implementation. |
101 |
if self.check_repo: |
102 |
self._report_repo_results(verbose) |
|
0.200.1244
by Jelmer Vernooij
Implement GitRepository.check. |
103 |
|
104 |
||
0.200.1447
by Jelmer Vernooij
Load optimisers at most once. |
105 |
_optimisers_loaded = False |
106 |
||
7143.15.2
by Jelmer Vernooij
Run autopep8. |
107 |
|
0.200.1447
by Jelmer Vernooij
Load optimisers at most once. |
108 |
def lazy_load_optimisers(): |
109 |
global _optimisers_loaded |
|
110 |
if _optimisers_loaded: |
|
111 |
return
|
|
0.401.2
by Jelmer Vernooij
Move all InterRepository implementations into interrepo. |
112 |
from . import interrepo |
113 |
for optimiser in [interrepo.InterRemoteGitNonGitRepository, |
|
114 |
interrepo.InterLocalGitNonGitRepository, |
|
115 |
interrepo.InterLocalGitLocalGitRepository, |
|
116 |
interrepo.InterRemoteGitLocalGitRepository, |
|
117 |
interrepo.InterToLocalGitRepository, |
|
0.401.3
by Jelmer Vernooij
Formatting fixes. |
118 |
interrepo.InterToRemoteGitRepository, |
119 |
]:
|
|
0.200.1447
by Jelmer Vernooij
Load optimisers at most once. |
120 |
repository.InterRepository.register_optimiser(optimiser) |
121 |
_optimisers_loaded = True |
|
122 |
||
123 |
||
0.200.115
by Jelmer Vernooij
Pass mapping object. |
124 |
class GitRepository(ForeignRepository): |
0.200.18
by John Arbash Meinel
Start splitting up the Git{Branch,Dir,Repository} into separate modules, etc. |
125 |
"""An adapter to git repositories for bzr.""" |
126 |
||
0.200.41
by David Allouche
Define _serializer = None in GitRepository. |
127 |
_serializer = None |
0.200.1263
by Jelmer Vernooij
Fix foreign_vcs_git. |
128 |
vcs = foreign_vcs_git |
0.200.1086
by Jelmer Vernooij
Provide chk_bytes attribute. |
129 |
chk_bytes = None |
0.200.41
by David Allouche
Define _serializer = None in GitRepository. |
130 |
|
0.200.1411
by Jelmer Vernooij
Fix control files. |
131 |
def __init__(self, gitdir): |
0.200.1447
by Jelmer Vernooij
Load optimisers at most once. |
132 |
self._transport = gitdir.root_transport |
0.200.1307
by Jelmer Vernooij
Formatting fixes, specify path to a couple more functions. |
133 |
super(GitRepository, self).__init__(GitRepositoryFormat(), |
7143.15.2
by Jelmer Vernooij
Run autopep8. |
134 |
gitdir, control_files=None) |
0.200.1449
by Jelmer Vernooij
Fix compatibility with bzr < 2.5 when used with remote repositories. |
135 |
self.base = gitdir.root_transport.base |
0.200.1447
by Jelmer Vernooij
Load optimisers at most once. |
136 |
lazy_load_optimisers() |
0.200.1411
by Jelmer Vernooij
Fix control files. |
137 |
self._lock_mode = None |
138 |
self._lock_count = 0 |
|
0.200.139
by Jelmer Vernooij
Share more code between local and remote classes, support opening remote branches. |
139 |
|
0.200.1231
by Jelmer Vernooij
Implement GitRepository.add_fallback_repository. |
140 |
def add_fallback_repository(self, basis_url): |
0.200.1307
by Jelmer Vernooij
Formatting fixes, specify path to a couple more functions. |
141 |
raise errors.UnstackableRepositoryFormat(self._format, |
7143.15.2
by Jelmer Vernooij
Run autopep8. |
142 |
self.control_transport.base) |
0.200.1231
by Jelmer Vernooij
Implement GitRepository.add_fallback_repository. |
143 |
|
0.200.139
by Jelmer Vernooij
Share more code between local and remote classes, support opening remote branches. |
144 |
def is_shared(self): |
0.200.886
by Jelmer Vernooij
Git repositories are not shared. |
145 |
return False |
0.200.139
by Jelmer Vernooij
Share more code between local and remote classes, support opening remote branches. |
146 |
|
0.200.1411
by Jelmer Vernooij
Fix control files. |
147 |
def get_physical_lock_status(self): |
148 |
return False |
|
149 |
||
150 |
def lock_write(self): |
|
151 |
"""See Branch.lock_write().""" |
|
152 |
if self._lock_mode: |
|
0.361.1
by Jelmer Vernooij
Don't use assert. |
153 |
if self._lock_mode != 'w': |
154 |
raise errors.ReadOnlyError(self) |
|
0.200.1411
by Jelmer Vernooij
Fix control files. |
155 |
self._lock_count += 1 |
156 |
else: |
|
157 |
self._lock_mode = 'w' |
|
158 |
self._lock_count = 1 |
|
0.334.1
by Jelmer Vernooij
Improve transaction and write group handling. |
159 |
self._transaction = transactions.WriteTransaction() |
0.200.1680
by Jelmer Vernooij
Fix repo locks. |
160 |
return repository.RepositoryWriteLockResult(self.unlock, None) |
0.200.1411
by Jelmer Vernooij
Fix control files. |
161 |
|
0.200.1454
by Jelmer Vernooij
Provide Repository.break_lock. |
162 |
def break_lock(self): |
163 |
raise NotImplementedError(self.break_lock) |
|
164 |
||
0.200.1411
by Jelmer Vernooij
Fix control files. |
165 |
def dont_leave_lock_in_place(self): |
166 |
raise NotImplementedError(self.dont_leave_lock_in_place) |
|
167 |
||
168 |
def leave_lock_in_place(self): |
|
169 |
raise NotImplementedError(self.leave_lock_in_place) |
|
170 |
||
171 |
def lock_read(self): |
|
172 |
if self._lock_mode: |
|
0.361.1
by Jelmer Vernooij
Don't use assert. |
173 |
if self._lock_mode not in ('r', 'w'): |
174 |
raise AssertionError |
|
0.200.1411
by Jelmer Vernooij
Fix control files. |
175 |
self._lock_count += 1 |
176 |
else: |
|
177 |
self._lock_mode = 'r' |
|
178 |
self._lock_count = 1 |
|
0.334.1
by Jelmer Vernooij
Improve transaction and write group handling. |
179 |
self._transaction = transactions.ReadOnlyTransaction() |
0.200.1670
by Jelmer Vernooij
Fix compatibility with newer versions of bzr. |
180 |
return lock.LogicalLockResult(self.unlock) |
0.200.1411
by Jelmer Vernooij
Fix control files. |
181 |
|
182 |
@only_raises(errors.LockNotHeld, errors.LockBroken) |
|
183 |
def unlock(self): |
|
184 |
if self._lock_count == 0: |
|
185 |
raise errors.LockNotHeld(self) |
|
186 |
if self._lock_count == 1 and self._lock_mode == 'w': |
|
187 |
if self._write_group is not None: |
|
188 |
self.abort_write_group() |
|
189 |
self._lock_count -= 1 |
|
190 |
self._lock_mode = None |
|
191 |
raise errors.BzrError( |
|
192 |
'Must end write groups before releasing write locks.') |
|
193 |
self._lock_count -= 1 |
|
194 |
if self._lock_count == 0: |
|
195 |
self._lock_mode = None |
|
0.334.1
by Jelmer Vernooij
Improve transaction and write group handling. |
196 |
transaction = self._transaction |
197 |
self._transaction = None |
|
198 |
transaction.finish() |
|
0.200.1411
by Jelmer Vernooij
Fix control files. |
199 |
|
200 |
def is_write_locked(self): |
|
201 |
return (self._lock_mode == 'w') |
|
202 |
||
203 |
def is_locked(self): |
|
204 |
return (self._lock_mode is not None) |
|
205 |
||
206 |
def get_transaction(self): |
|
207 |
"""See Repository.get_transaction().""" |
|
0.334.1
by Jelmer Vernooij
Improve transaction and write group handling. |
208 |
if self._transaction is None: |
0.200.1411
by Jelmer Vernooij
Fix control files. |
209 |
return transactions.PassThroughTransaction() |
210 |
else: |
|
0.334.1
by Jelmer Vernooij
Improve transaction and write group handling. |
211 |
return self._transaction |
0.200.1411
by Jelmer Vernooij
Fix control files. |
212 |
|
0.200.1246
by Jelmer Vernooij
Provide GitRepository.reconcile. |
213 |
def reconcile(self, other=None, thorough=False): |
214 |
"""Reconcile this repository.""" |
|
7206.6.4
by Jelmer Vernooij
Move reconcile logic to breezy.bzr.reconcile. |
215 |
from ..reconcile import ReconcileResult |
216 |
ret = ReconcileResult() |
|
217 |
ret.aborted = False |
|
218 |
return ret |
|
0.200.1246
by Jelmer Vernooij
Provide GitRepository.reconcile. |
219 |
|
0.200.139
by Jelmer Vernooij
Share more code between local and remote classes, support opening remote branches. |
220 |
def supports_rich_root(self): |
221 |
return True |
|
222 |
||
223 |
def get_mapping(self): |
|
224 |
return default_mapping |
|
225 |
||
0.200.147
by Jelmer Vernooij
Merge new dulwich; fetching objects from local repository works now; they aren't converted yet though. |
226 |
def make_working_trees(self): |
0.200.1546
by Jelmer Vernooij
Provide get_config. |
227 |
return not self._git.get_config().get_boolean(("core", ), "bare") |
0.200.139
by Jelmer Vernooij
Share more code between local and remote classes, support opening remote branches. |
228 |
|
0.200.557
by Jelmer Vernooij
Implement GitRepository.revision_graph_can_have_wrong_parents(). |
229 |
def revision_graph_can_have_wrong_parents(self): |
230 |
return False |
|
231 |
||
0.200.1158
by Jelmer Vernooij
Implement stub Repositor.add_signature_text. |
232 |
def add_signature_text(self, revid, signature): |
233 |
raise errors.UnsupportedOperation(self.add_signature_text, self) |
|
234 |
||
0.200.1467
by Jelmer Vernooij
Implement GitRepository.sign_revision. |
235 |
def sign_revision(self, revision_id, gpg_strategy): |
236 |
raise errors.UnsupportedOperation(self.add_signature_text, self) |
|
237 |
||
0.200.139
by Jelmer Vernooij
Share more code between local and remote classes, support opening remote branches. |
238 |
|
239 |
class LocalGitRepository(GitRepository): |
|
0.200.276
by Jelmer Vernooij
Improve formatting. |
240 |
"""Git repository on the file system.""" |
0.200.139
by Jelmer Vernooij
Share more code between local and remote classes, support opening remote branches. |
241 |
|
0.200.1411
by Jelmer Vernooij
Fix control files. |
242 |
def __init__(self, gitdir): |
243 |
GitRepository.__init__(self, gitdir) |
|
0.200.90
by Jelmer Vernooij
Basic support for opening working trees. |
244 |
self._git = gitdir._git |
0.200.1283
by Jelmer Vernooij
Provide Repository.get_file_graph() and Tree.get_file_revision(). |
245 |
self._file_change_scanner = GitFileLastChangeScanner(self) |
0.334.1
by Jelmer Vernooij
Improve transaction and write group handling. |
246 |
self._transaction = None |
0.200.45
by David Allouche
More performance hacking, introduce sqlite cache, escape characters in commits that break serializers. |
247 |
|
0.200.1224
by Jelmer Vernooij
provide explicit GitRepository.get_commit_builder. |
248 |
def get_commit_builder(self, branch, parents, config, timestamp=None, |
249 |
timezone=None, committer=None, revprops=None, |
|
250 |
revision_id=None, lossy=False): |
|
251 |
"""Obtain a CommitBuilder for this repository. |
|
252 |
||
253 |
:param branch: Branch to commit to.
|
|
254 |
:param parents: Revision ids of the parents of the new revision.
|
|
255 |
:param config: Configuration to use.
|
|
256 |
:param timestamp: Optional timestamp recorded for commit.
|
|
257 |
:param timezone: Optional timezone for timestamp.
|
|
258 |
:param committer: Optional committer to set for commit.
|
|
259 |
:param revprops: Optional dictionary of revision properties.
|
|
260 |
:param revision_id: Optional revision id.
|
|
261 |
:param lossy: Whether to discard data that can not be natively
|
|
262 |
represented, when pushing to a foreign VCS
|
|
263 |
"""
|
|
7143.15.3
by Jelmer Vernooij
Fix pep8 issues in breezy.git. |
264 |
builder = GitCommitBuilder( |
265 |
self, parents, config, timestamp, timezone, committer, revprops, |
|
266 |
revision_id, lossy) |
|
0.200.1229
by Jelmer Vernooij
Provide CommitBuilder.any_changes. |
267 |
self.start_write_group() |
0.294.1
by Jelmer Vernooij
Fix write group handling when creating commit builder fails. |
268 |
return builder |
0.200.1224
by Jelmer Vernooij
provide explicit GitRepository.get_commit_builder. |
269 |
|
0.200.1283
by Jelmer Vernooij
Provide Repository.get_file_graph() and Tree.get_file_revision(). |
270 |
def get_file_graph(self): |
0.200.1307
by Jelmer Vernooij
Formatting fixes, specify path to a couple more functions. |
271 |
return _mod_graph.Graph(GitFileParentProvider( |
272 |
self._file_change_scanner)) |
|
0.200.1283
by Jelmer Vernooij
Provide Repository.get_file_graph() and Tree.get_file_revision(). |
273 |
|
0.200.1233
by Jelmer Vernooij
Implement Repository.iter_files_bytes. |
274 |
def iter_files_bytes(self, desired_files): |
275 |
"""Iterate through file versions. |
|
276 |
||
277 |
Files will not necessarily be returned in the order they occur in
|
|
278 |
desired_files. No specific order is guaranteed.
|
|
279 |
||
280 |
Yields pairs of identifier, bytes_iterator. identifier is an opaque
|
|
281 |
value supplied by the caller as part of desired_files. It should
|
|
282 |
uniquely identify the file version in the caller's context. (Examples:
|
|
283 |
an index number or a TreeTransform trans_id.)
|
|
284 |
||
285 |
bytes_iterator is an iterable of bytestrings for the file. The
|
|
286 |
kind of iterable and length of the bytestrings are unspecified, but for
|
|
287 |
this implementation, it is a list of bytes produced by
|
|
288 |
VersionedFile.get_record_stream().
|
|
289 |
||
290 |
:param desired_files: a list of (file_id, revision_id, identifier)
|
|
291 |
triples
|
|
292 |
"""
|
|
293 |
per_revision = {} |
|
294 |
for (file_id, revision_id, identifier) in desired_files: |
|
0.200.1307
by Jelmer Vernooij
Formatting fixes, specify path to a couple more functions. |
295 |
per_revision.setdefault(revision_id, []).append( |
296 |
(file_id, identifier)) |
|
7479.2.1
by Jelmer Vernooij
Drop python2 support. |
297 |
for revid, files in per_revision.items(): |
0.200.1745
by Jelmer Vernooij
Fix iter_files_bytes. |
298 |
try: |
299 |
(commit_id, mapping) = self.lookup_bzr_revision_id(revid) |
|
300 |
except errors.NoSuchRevision: |
|
301 |
raise errors.RevisionNotPresent(revid, self) |
|
0.200.1233
by Jelmer Vernooij
Implement Repository.iter_files_bytes. |
302 |
try: |
303 |
commit = self._git.object_store[commit_id] |
|
304 |
except KeyError: |
|
305 |
raise errors.RevisionNotPresent(revid, self) |
|
306 |
root_tree = commit.tree |
|
307 |
for fileid, identifier in files: |
|
0.200.1715
by Jelmer Vernooij
Fix some more tests. |
308 |
try: |
309 |
path = mapping.parse_file_id(fileid) |
|
310 |
except ValueError: |
|
311 |
raise errors.RevisionNotPresent((fileid, revid), self) |
|
0.200.1233
by Jelmer Vernooij
Implement Repository.iter_files_bytes. |
312 |
try: |
313 |
obj = tree_lookup_path( |
|
7045.4.1
by Jelmer Vernooij
Some brz-git fixes. |
314 |
self._git.object_store.__getitem__, root_tree, |
315 |
path.encode('utf-8')) |
|
0.200.1233
by Jelmer Vernooij
Implement Repository.iter_files_bytes. |
316 |
if isinstance(obj, tuple): |
317 |
(mode, item_id) = obj |
|
318 |
obj = self._git.object_store[item_id] |
|
319 |
except KeyError: |
|
320 |
raise errors.RevisionNotPresent((fileid, revid), self) |
|
321 |
else: |
|
7045.2.13
by Jelmer Vernooij
Fix some workingtree_4 tests. |
322 |
if obj.type_name == b"tree": |
0.200.1233
by Jelmer Vernooij
Implement Repository.iter_files_bytes. |
323 |
yield (identifier, []) |
7045.2.13
by Jelmer Vernooij
Fix some workingtree_4 tests. |
324 |
elif obj.type_name == b"blob": |
0.200.1233
by Jelmer Vernooij
Implement Repository.iter_files_bytes. |
325 |
yield (identifier, obj.chunked) |
326 |
else: |
|
327 |
raise AssertionError("file text resolved to %r" % obj) |
|
328 |
||
0.200.1533
by Jelmer Vernooij
Improve gather_stats. |
329 |
def gather_stats(self, revid=None, committers=None): |
330 |
"""See Repository.gather_stats().""" |
|
7143.15.2
by Jelmer Vernooij
Run autopep8. |
331 |
result = super(LocalGitRepository, self).gather_stats( |
332 |
revid, committers) |
|
0.200.1533
by Jelmer Vernooij
Improve gather_stats. |
333 |
revs = [] |
334 |
for sha in self._git.object_store: |
|
335 |
o = self._git.object_store[sha] |
|
7045.2.13
by Jelmer Vernooij
Fix some workingtree_4 tests. |
336 |
if o.type_name == b"commit": |
0.200.1533
by Jelmer Vernooij
Improve gather_stats. |
337 |
revs.append(o.id) |
338 |
result['revisions'] = len(revs) |
|
339 |
return result |
|
340 |
||
0.252.46
by Jelmer Vernooij
Generate refs/bzr/* if not set yet. |
341 |
def _iter_revision_ids(self): |
0.200.1021
by Jelmer Vernooij
Put testament sha1 in revisions. |
342 |
mapping = self.get_mapping() |
0.252.21
by Jelmer Vernooij
Fix GitRepository.all_revision_ids() to find all revisions. |
343 |
for sha in self._git.object_store: |
344 |
o = self._git.object_store[sha] |
|
345 |
if not isinstance(o, Commit): |
|
346 |
continue
|
|
7464.3.2
by Jelmer Vernooij
Drop reverse roundtripping support. |
347 |
revid = mapping.revision_id_foreign_to_bzr(o.id) |
7464.3.1
by Jelmer Vernooij
Drop roundtripping support in git repositories. |
348 |
yield o.id, revid |
0.252.46
by Jelmer Vernooij
Generate refs/bzr/* if not set yet. |
349 |
|
350 |
def all_revision_ids(self): |
|
0.200.1727
by Jelmer Vernooij
Change all_revision_ids type to list. |
351 |
ret = set() |
7464.3.1
by Jelmer Vernooij
Drop roundtripping support in git repositories. |
352 |
for git_sha, revid in self._iter_revision_ids(): |
353 |
ret.add(revid) |
|
0.200.1727
by Jelmer Vernooij
Change all_revision_ids type to list. |
354 |
return list(ret) |
0.200.74
by Jelmer Vernooij
Implement Repository.all_revision_ids(). |
355 |
|
0.200.1552
by Jelmer Vernooij
Claim to support nested trees. |
356 |
def _get_parents(self, revid, no_alternates=False): |
0.200.1756
by Jelmer Vernooij
Initial work on annotate support. |
357 |
if type(revid) != bytes: |
0.200.1328
by Jelmer Vernooij
More test fixes. |
358 |
raise ValueError |
359 |
try: |
|
0.200.1343
by Jelmer Vernooij
Update docstrings. |
360 |
(hexsha, mapping) = self.lookup_bzr_revision_id(revid) |
0.200.1328
by Jelmer Vernooij
More test fixes. |
361 |
except errors.NoSuchRevision: |
362 |
return None |
|
0.200.1552
by Jelmer Vernooij
Claim to support nested trees. |
363 |
# FIXME: Honor no_alternates setting
|
0.200.1328
by Jelmer Vernooij
More test fixes. |
364 |
try: |
0.200.1553
by Jelmer Vernooij
Avoid using nonexistant method. |
365 |
commit = self._git.object_store[hexsha] |
0.200.1328
by Jelmer Vernooij
More test fixes. |
366 |
except KeyError: |
367 |
return None |
|
6965.1.1
by Jelmer Vernooij
Add basic support for horizoned history. |
368 |
ret = [] |
369 |
for p in commit.parents: |
|
370 |
try: |
|
371 |
ret.append(self.lookup_foreign_revision_id(p, mapping)) |
|
372 |
except KeyError: |
|
373 |
ret.append(mapping.revision_id_foreign_to_bzr(p)) |
|
374 |
return ret |
|
0.200.1328
by Jelmer Vernooij
More test fixes. |
375 |
|
0.200.1552
by Jelmer Vernooij
Claim to support nested trees. |
376 |
def _get_parent_map_no_fallbacks(self, revids): |
377 |
return self.get_parent_map(revids, no_alternates=True) |
|
378 |
||
379 |
def get_parent_map(self, revids, no_alternates=False): |
|
0.200.131
by Jelmer Vernooij
Fix all tests but two, use rich roots by default. |
380 |
parent_map = {} |
381 |
for revision_id in revids: |
|
7143.15.2
by Jelmer Vernooij
Run autopep8. |
382 |
parents = self._get_parents( |
383 |
revision_id, no_alternates=no_alternates) |
|
0.285.5
by Jelmer Vernooij
Fix import. |
384 |
if revision_id == _mod_revision.NULL_REVISION: |
0.200.1329
by Jelmer Vernooij
Fix more tests. |
385 |
parent_map[revision_id] = () |
386 |
continue
|
|
0.200.1328
by Jelmer Vernooij
More test fixes. |
387 |
if parents is None: |
388 |
continue
|
|
0.200.1324
by Jelmer Vernooij
More work on roundtripping support. |
389 |
if len(parents) == 0: |
0.285.5
by Jelmer Vernooij
Fix import. |
390 |
parents = [_mod_revision.NULL_REVISION] |
0.200.1094
by Jelmer Vernooij
Fix test_get_no_parents. |
391 |
parent_map[revision_id] = tuple(parents) |
0.200.131
by Jelmer Vernooij
Fix all tests but two, use rich roots by default. |
392 |
return parent_map |
393 |
||
0.200.1281
by Jelmer Vernooij
Provide Repository.get_known_graph_ancestry. |
394 |
def get_known_graph_ancestry(self, revision_ids): |
395 |
"""Return the known graph for a set of revision ids and their ancestors. |
|
396 |
"""
|
|
397 |
pending = set(revision_ids) |
|
398 |
parent_map = {} |
|
399 |
while pending: |
|
0.200.1328
by Jelmer Vernooij
More test fixes. |
400 |
this_parent_map = {} |
401 |
for revid in pending: |
|
0.285.5
by Jelmer Vernooij
Fix import. |
402 |
if revid == _mod_revision.NULL_REVISION: |
0.200.1328
by Jelmer Vernooij
More test fixes. |
403 |
continue
|
404 |
parents = self._get_parents(revid) |
|
405 |
if parents is not None: |
|
406 |
this_parent_map[revid] = parents |
|
0.200.1281
by Jelmer Vernooij
Provide Repository.get_known_graph_ancestry. |
407 |
parent_map.update(this_parent_map) |
408 |
pending = set() |
|
7479.2.1
by Jelmer Vernooij
Drop python2 support. |
409 |
for values in this_parent_map.values(): |
7045.4.4
by Jelmer Vernooij
Fix more git tests. |
410 |
pending.update(values) |
0.200.1281
by Jelmer Vernooij
Provide Repository.get_known_graph_ancestry. |
411 |
pending = pending.difference(parent_map) |
412 |
return _mod_graph.KnownGraph(parent_map) |
|
413 |
||
0.200.43
by David Allouche
Ultra-experimental support for "bzr pull". No test. No sanity. |
414 |
def get_signature_text(self, revision_id): |
0.386.1
by Jelmer Vernooij
Support signing commits. |
415 |
git_commit_id, mapping = self.lookup_bzr_revision_id(revision_id) |
416 |
try: |
|
417 |
commit = self._git.object_store[git_commit_id] |
|
418 |
except KeyError: |
|
419 |
raise errors.NoSuchRevision(self, revision_id) |
|
420 |
if commit.gpgsig is None: |
|
421 |
raise errors.NoSuchRevision(self, revision_id) |
|
422 |
return commit.gpgsig |
|
0.200.43
by David Allouche
Ultra-experimental support for "bzr pull". No test. No sanity. |
423 |
|
0.200.1244
by Jelmer Vernooij
Implement GitRepository.check. |
424 |
def check(self, revision_ids=None, callback_refs=None, check_repo=True): |
425 |
result = GitCheck(self, check_repo=check_repo) |
|
426 |
result.check(callback_refs) |
|
427 |
return result |
|
428 |
||
0.257.1
by Jelmer Vernooij
use transport repo objects even for local access. |
429 |
def pack(self, hint=None, clean_obsolete_packs=False): |
430 |
self._git.object_store.pack_loose_objects() |
|
431 |
||
0.200.650
by Jelmer Vernooij
Use standard names for lookup functions. |
432 |
def lookup_foreign_revision_id(self, foreign_revid, mapping=None): |
0.200.124
by Jelmer Vernooij
Add lookup_revision_id stub. |
433 |
"""Lookup a revision id. |
0.200.676
by Jelmer Vernooij
Avoid iterating over all keys in the tdb database. |
434 |
|
0.200.1508
by Jelmer Vernooij
Add docstring, use peel_sha. |
435 |
:param foreign_revid: Foreign revision id to look up
|
436 |
:param mapping: Mapping to use (use default mapping if not specified)
|
|
437 |
:raise KeyError: If foreign revision was not found
|
|
438 |
:return: bzr revision id
|
|
0.200.124
by Jelmer Vernooij
Add lookup_revision_id stub. |
439 |
"""
|
7018.3.2
by Jelmer Vernooij
Fix some git tests. |
440 |
if not isinstance(foreign_revid, bytes): |
0.361.1
by Jelmer Vernooij
Don't use assert. |
441 |
raise TypeError(foreign_revid) |
0.200.649
by Jelmer Vernooij
Make GitRevisions VF implementation behave as the interface expects. |
442 |
if mapping is None: |
443 |
mapping = self.get_mapping() |
|
0.200.914
by Jelmer Vernooij
Fix tests. |
444 |
if foreign_revid == ZERO_SHA: |
0.285.5
by Jelmer Vernooij
Fix import. |
445 |
return _mod_revision.NULL_REVISION |
0.200.1508
by Jelmer Vernooij
Add docstring, use peel_sha. |
446 |
commit = self._git.object_store.peel_sha(foreign_revid) |
0.200.1403
by Jelmer Vernooij
Cope with tags pointing at tree objects when cloning local git repositories. |
447 |
if not isinstance(commit, Commit): |
448 |
raise NotCommitError(commit.id) |
|
7268.1.2
by Jelmer Vernooij
Allow access to native git repositories, ignoring unknown hg fields. |
449 |
revid = mapping.get_revision_id(commit) |
0.200.1021
by Jelmer Vernooij
Put testament sha1 in revisions. |
450 |
# FIXME: check testament before doing this?
|
7268.1.2
by Jelmer Vernooij
Allow access to native git repositories, ignoring unknown hg fields. |
451 |
return revid |
0.200.124
by Jelmer Vernooij
Add lookup_revision_id stub. |
452 |
|
0.200.60
by Jelmer Vernooij
Support signature functions. |
453 |
def has_signature_for_revision_id(self, revision_id): |
0.200.1343
by Jelmer Vernooij
Update docstrings. |
454 |
"""Check whether a GPG signature is present for this revision. |
455 |
||
456 |
This is never the case for Git repositories.
|
|
457 |
"""
|
|
0.386.2
by Jelmer Vernooij
Support verifying signatures. |
458 |
try: |
459 |
self.get_signature_text(revision_id) |
|
460 |
except errors.NoSuchRevision: |
|
461 |
return False |
|
462 |
else: |
|
463 |
return True |
|
464 |
||
465 |
def verify_revision_signature(self, revision_id, gpg_strategy): |
|
466 |
"""Verify the signature on a revision. |
|
467 |
||
468 |
:param revision_id: the revision to verify
|
|
469 |
:gpg_strategy: the GPGStrategy object to used
|
|
470 |
||
471 |
:return: gpg.SIGNATURE_VALID or a failed SIGNATURE_ value
|
|
472 |
"""
|
|
473 |
from breezy import gpg |
|
474 |
with self.lock_read(): |
|
475 |
git_commit_id, mapping = self.lookup_bzr_revision_id(revision_id) |
|
476 |
try: |
|
477 |
commit = self._git.object_store[git_commit_id] |
|
478 |
except KeyError: |
|
479 |
raise errors.NoSuchRevision(self, revision_id) |
|
480 |
||
481 |
if commit.gpgsig is None: |
|
482 |
return gpg.SIGNATURE_NOT_SIGNED, None |
|
483 |
||
484 |
without_sig = Commit.from_string(commit.as_raw_string()) |
|
485 |
without_sig.gpgsig = None |
|
486 |
||
7143.15.2
by Jelmer Vernooij
Run autopep8. |
487 |
(result, key, plain_text) = gpg_strategy.verify( |
488 |
without_sig.as_raw_string(), commit.gpgsig) |
|
0.386.3
by Jelmer Vernooij
use new API. |
489 |
return (result, key) |
0.200.60
by Jelmer Vernooij
Support signature functions. |
490 |
|
0.200.913
by Jelmer Vernooij
Fix tests. |
491 |
def lookup_bzr_revision_id(self, bzr_revid, mapping=None): |
0.200.1343
by Jelmer Vernooij
Update docstrings. |
492 |
"""Lookup a bzr revision id in a Git repository. |
493 |
||
494 |
:param bzr_revid: Bazaar revision id
|
|
495 |
:param mapping: Optional mapping to use
|
|
496 |
:return: Tuple with git commit id, mapping that was used and supplement
|
|
497 |
details
|
|
498 |
"""
|
|
0.200.105
by Jelmer Vernooij
Add common function for finding git commit by bzr revid. |
499 |
try: |
7143.15.3
by Jelmer Vernooij
Fix pep8 issues in breezy.git. |
500 |
(git_sha, mapping) = mapping_registry.revision_id_bzr_to_foreign( |
501 |
bzr_revid) |
|
0.200.105
by Jelmer Vernooij
Add common function for finding git commit by bzr revid. |
502 |
except errors.InvalidRevisionId: |
7464.3.1
by Jelmer Vernooij
Drop roundtripping support in git repositories. |
503 |
raise errors.NoSuchRevision(self, bzr_revid) |
0.200.1343
by Jelmer Vernooij
Update docstrings. |
504 |
else: |
505 |
return (git_sha, mapping) |
|
0.200.105
by Jelmer Vernooij
Add common function for finding git commit by bzr revid. |
506 |
|
0.200.18
by John Arbash Meinel
Start splitting up the Git{Branch,Dir,Repository} into separate modules, etc. |
507 |
def get_revision(self, revision_id): |
7018.3.7
by Jelmer Vernooij
Fix remaining git tests. |
508 |
if not isinstance(revision_id, bytes): |
0.200.1101
by Jelmer Vernooij
Raise InvalidRevisionId on invalid type being specified to Repository.get_revision. |
509 |
raise errors.InvalidRevisionId(revision_id, self) |
0.200.650
by Jelmer Vernooij
Use standard names for lookup functions. |
510 |
git_commit_id, mapping = self.lookup_bzr_revision_id(revision_id) |
0.200.147
by Jelmer Vernooij
Merge new dulwich; fetching objects from local repository works now; they aren't converted yet though. |
511 |
try: |
0.200.1552
by Jelmer Vernooij
Claim to support nested trees. |
512 |
commit = self._git.object_store[git_commit_id] |
0.200.147
by Jelmer Vernooij
Merge new dulwich; fetching objects from local repository works now; they aren't converted yet though. |
513 |
except KeyError: |
514 |
raise errors.NoSuchRevision(self, revision_id) |
|
0.200.1029
by Jelmer Vernooij
Use dictionary with verifiers rather than requiring testament3-sha1 everywhere. |
515 |
revision, roundtrip_revid, verifiers = mapping.import_commit( |
7410.2.1
by Jelmer Vernooij
Allow unknown extras in git commits when just inspecting revisions, rather than importing. |
516 |
commit, self.lookup_foreign_revision_id, strict=False) |
0.361.1
by Jelmer Vernooij
Don't use assert. |
517 |
if revision is None: |
518 |
raise AssertionError |
|
0.200.1029
by Jelmer Vernooij
Use dictionary with verifiers rather than requiring testament3-sha1 everywhere. |
519 |
# FIXME: check verifiers ?
|
0.200.1021
by Jelmer Vernooij
Put testament sha1 in revisions. |
520 |
if roundtrip_revid: |
521 |
revision.revision_id = roundtrip_revid |
|
0.200.43
by David Allouche
Ultra-experimental support for "bzr pull". No test. No sanity. |
522 |
return revision |
0.200.18
by John Arbash Meinel
Start splitting up the Git{Branch,Dir,Repository} into separate modules, etc. |
523 |
|
524 |
def has_revision(self, revision_id): |
|
0.200.1119
by Jelmer Vernooij
Refactor repository initialization. |
525 |
"""See Repository.has_revision.""" |
0.285.5
by Jelmer Vernooij
Fix import. |
526 |
if revision_id == _mod_revision.NULL_REVISION: |
0.200.1122
by Jelmer Vernooij
has_revision(null:) should always return True. |
527 |
return True |
0.200.18
by John Arbash Meinel
Start splitting up the Git{Branch,Dir,Repository} into separate modules, etc. |
528 |
try: |
0.200.902
by Jelmer Vernooij
Fix Repository.has_revision{s,}. |
529 |
git_commit_id, mapping = self.lookup_bzr_revision_id(revision_id) |
0.200.130
by Jelmer Vernooij
Make most tree inspection tests succeed. |
530 |
except errors.NoSuchRevision: |
0.200.18
by John Arbash Meinel
Start splitting up the Git{Branch,Dir,Repository} into separate modules, etc. |
531 |
return False |
0.200.902
by Jelmer Vernooij
Fix Repository.has_revision{s,}. |
532 |
return (git_commit_id in self._git) |
533 |
||
534 |
def has_revisions(self, revision_ids): |
|
0.200.1119
by Jelmer Vernooij
Refactor repository initialization. |
535 |
"""See Repository.has_revisions.""" |
0.200.913
by Jelmer Vernooij
Fix tests. |
536 |
return set(filter(self.has_revision, revision_ids)) |
0.200.18
by John Arbash Meinel
Start splitting up the Git{Branch,Dir,Repository} into separate modules, etc. |
537 |
|
0.200.1657
by Jelmer Vernooij
Implement iter_revisions. |
538 |
def iter_revisions(self, revision_ids): |
0.200.1119
by Jelmer Vernooij
Refactor repository initialization. |
539 |
"""See Repository.get_revisions.""" |
0.200.1657
by Jelmer Vernooij
Implement iter_revisions. |
540 |
for revid in revision_ids: |
541 |
try: |
|
542 |
rev = self.get_revision(revid) |
|
543 |
except errors.NoSuchRevision: |
|
544 |
rev = None |
|
545 |
yield (revid, rev) |
|
0.200.18
by John Arbash Meinel
Start splitting up the Git{Branch,Dir,Repository} into separate modules, etc. |
546 |
|
547 |
def revision_trees(self, revids): |
|
0.200.1119
by Jelmer Vernooij
Refactor repository initialization. |
548 |
"""See Repository.revision_trees.""" |
0.200.18
by John Arbash Meinel
Start splitting up the Git{Branch,Dir,Repository} into separate modules, etc. |
549 |
for revid in revids: |
550 |
yield self.revision_tree(revid) |
|
551 |
||
552 |
def revision_tree(self, revision_id): |
|
0.200.1119
by Jelmer Vernooij
Refactor repository initialization. |
553 |
"""See Repository.revision_tree.""" |
0.287.6
by Jelmer Vernooij
Fix some more tests. |
554 |
if revision_id is None: |
555 |
raise ValueError('invalid revision id %s' % revision_id) |
|
0.200.195
by Jelmer Vernooij
Return mapping in revision_id_bzr_to_foreign() as required by the interface. |
556 |
return GitRevisionTree(self, revision_id) |
0.200.18
by John Arbash Meinel
Start splitting up the Git{Branch,Dir,Repository} into separate modules, etc. |
557 |
|
0.285.4
by Jelmer Vernooij
Add get_deltas_for_revisoins implementation. |
558 |
def get_deltas_for_revisions(self, revisions, specific_fileids=None): |
559 |
"""Produce a generator of revision deltas. |
|
560 |
||
561 |
Note that the input is a sequence of REVISIONS, not revision_ids.
|
|
562 |
Trees will be held in memory until the generator exits.
|
|
563 |
Each delta is relative to the revision's lefthand predecessor.
|
|
564 |
||
565 |
:param specific_fileids: if not None, the result is filtered
|
|
566 |
so that only those file-ids, their parents and their
|
|
567 |
children are included.
|
|
568 |
"""
|
|
569 |
# Get the revision-ids of interest
|
|
570 |
required_trees = set() |
|
571 |
for revision in revisions: |
|
572 |
required_trees.add(revision.revision_id) |
|
573 |
required_trees.update(revision.parent_ids[:1]) |
|
574 |
||
0.200.1743
by Jelmer Vernooij
Fix some revision delta filtering. |
575 |
trees = dict((t.get_revision_id(), t) for |
7143.15.2
by Jelmer Vernooij
Run autopep8. |
576 |
t in self.revision_trees(required_trees)) |
0.285.4
by Jelmer Vernooij
Add get_deltas_for_revisoins implementation. |
577 |
|
578 |
# Calculate the deltas
|
|
579 |
for revision in revisions: |
|
580 |
if not revision.parent_ids: |
|
581 |
old_tree = self.revision_tree(_mod_revision.NULL_REVISION) |
|
582 |
else: |
|
583 |
old_tree = trees[revision.parent_ids[0]] |
|
0.200.1743
by Jelmer Vernooij
Fix some revision delta filtering. |
584 |
new_tree = trees[revision.revision_id] |
585 |
if specific_fileids is not None: |
|
7143.15.2
by Jelmer Vernooij
Run autopep8. |
586 |
specific_files = [new_tree.id2path( |
587 |
fid) for fid in specific_fileids] |
|
0.200.1743
by Jelmer Vernooij
Fix some revision delta filtering. |
588 |
else: |
589 |
specific_files = None |
|
7143.15.3
by Jelmer Vernooij
Fix pep8 issues in breezy.git. |
590 |
yield new_tree.changes_from( |
591 |
old_tree, specific_files=specific_files) |
|
0.285.4
by Jelmer Vernooij
Add get_deltas_for_revisoins implementation. |
592 |
|
0.200.108
by Jelmer Vernooij
Support bzr init --git. |
593 |
def set_make_working_trees(self, trees): |
0.287.6
by Jelmer Vernooij
Fix some more tests. |
594 |
raise errors.UnsupportedOperation(self.set_make_working_trees, self) |
0.200.108
by Jelmer Vernooij
Support bzr init --git. |
595 |
|
0.200.276
by Jelmer Vernooij
Improve formatting. |
596 |
def fetch_objects(self, determine_wants, graph_walker, resolve_ext_ref, |
7143.15.2
by Jelmer Vernooij
Run autopep8. |
597 |
progress=None, limit=None): |
0.286.6
by Jelmer Vernooij
Pass through limit argument. |
598 |
return self._git.fetch_objects(determine_wants, graph_walker, progress, |
7143.15.2
by Jelmer Vernooij
Run autopep8. |
599 |
limit=limit) |
0.200.138
by Jelmer Vernooij
Add initial infrastructure for accessing remote git repositories. |
600 |
|
0.200.43
by David Allouche
Ultra-experimental support for "bzr pull". No test. No sanity. |
601 |
|
0.200.289
by Jelmer Vernooij
Cope with new member variables in RepositoryFormat. |
602 |
class GitRepositoryFormat(repository.RepositoryFormat): |
0.200.429
by Jelmer Vernooij
get remote dpush to a point where we now what to send. |
603 |
"""Git repository format.""" |
0.203.1
by Aaron Bentley
Make checkouts work |
604 |
|
0.200.1294
by Jelmer Vernooij
Mark as not supporting versioned directories. |
605 |
supports_versioned_directories = False |
0.429.2
by Jelmer Vernooij
Some more work on submodule support. |
606 |
supports_tree_reference = True |
0.200.133
by Jelmer Vernooij
Unmark as deprecated. |
607 |
rich_root_data = True |
0.200.1105
by Jelmer Vernooij
Don't claim to support leaving locks. |
608 |
supports_leaving_lock = False |
0.200.1106
by Jelmer Vernooij
Claim to support fast deltas. |
609 |
fast_deltas = True |
0.200.1123
by Jelmer Vernooij
Set more repository format flags. |
610 |
supports_funky_characters = True |
0.200.1560
by Jelmer Vernooij
stacking is not supported. |
611 |
supports_external_lookups = False |
0.200.1135
by Jelmer Vernooij
Set supports_full_versioned_files=False. |
612 |
supports_full_versioned_files = False |
0.200.1162
by Jelmer Vernooij
Set RepositoryFormat.supports_revision_signatures. |
613 |
supports_revision_signatures = False |
0.200.1383
by Jelmer Vernooij
Claim to not support nested repositories. |
614 |
supports_nesting_repositories = False |
0.200.1166
by Jelmer Vernooij
Set GitRepositoryFormat.revision_graph_can_have_wrong_parents. |
615 |
revision_graph_can_have_wrong_parents = False |
0.200.1493
by Jelmer Vernooij
Test fixes. |
616 |
supports_unreferenced_revisions = True |
0.200.1665
by Jelmer Vernooij
Rename _matchingbzrdir to _matchingcnotroldir. |
617 |
supports_setting_revision_ids = False |
0.200.1698
by Jelmer Vernooij
Update xfail. |
618 |
supports_storing_branch_nick = False |
619 |
supports_overriding_transport = False |
|
0.200.1746
by Jelmer Vernooij
Mark as not supporting custom revision properties. |
620 |
supports_custom_revision_properties = False |
0.396.1
by Jelmer Vernooij
Mark as not support per file revision recording. |
621 |
records_per_file_revision = False |
0.200.71
by Jelmer Vernooij
Implement GitRepositoryFormat.get_format_description. |
622 |
|
0.200.1083
by Jelmer Vernooij
Register repository format. |
623 |
@property
|
0.200.1665
by Jelmer Vernooij
Rename _matchingbzrdir to _matchingcnotroldir. |
624 |
def _matchingcontroldir(self): |
0.200.1641
by Jelmer Vernooij
Use relative imports where possible. |
625 |
from .dir import LocalGitControlDirFormat |
0.200.1083
by Jelmer Vernooij
Register repository format. |
626 |
return LocalGitControlDirFormat() |
627 |
||
0.200.71
by Jelmer Vernooij
Implement GitRepositoryFormat.get_format_description. |
628 |
def get_format_description(self): |
629 |
return "Git Repository" |
|
0.200.133
by Jelmer Vernooij
Unmark as deprecated. |
630 |
|
0.200.1084
by Jelmer Vernooij
Support 'initializing' repositories in control directories. |
631 |
def initialize(self, controldir, shared=False, _internal=False): |
0.200.1641
by Jelmer Vernooij
Use relative imports where possible. |
632 |
from .dir import GitDir |
0.200.1084
by Jelmer Vernooij
Support 'initializing' repositories in control directories. |
633 |
if not isinstance(controldir, GitDir): |
634 |
raise errors.UninitializableFormat(self) |
|
635 |
return controldir.open_repository() |
|
0.200.133
by Jelmer Vernooij
Unmark as deprecated. |
636 |
|
637 |
def check_conversion_target(self, target_repo_format): |
|
638 |
return target_repo_format.rich_root_data |
|
0.200.536
by Jelmer Vernooij
Implement network name. |
639 |
|
0.200.658
by Jelmer Vernooij
Provide right infrastructure for foreign repository tests from bzrlib. |
640 |
def get_foreign_tests_repository_factory(self): |
0.200.1654
by Jelmer Vernooij
Fix test import. |
641 |
from .tests.test_repository import ( |
0.200.713
by Jelmer Vernooij
Improve formatting. |
642 |
ForeignTestsRepositoryFactory, |
643 |
)
|
|
0.200.658
by Jelmer Vernooij
Provide right infrastructure for foreign repository tests from bzrlib. |
644 |
return ForeignTestsRepositoryFactory() |
645 |
||
0.200.536
by Jelmer Vernooij
Implement network name. |
646 |
def network_name(self): |
6973.7.8
by Jelmer Vernooij
Fix more tests. |
647 |
return b"git" |
6989.2.6
by Jelmer Vernooij
Run tests against brz-git interrepositories. |
648 |
|
649 |
||
650 |
def get_extra_interrepo_test_combinations(): |
|
6986.2.2
by Jelmer Vernooij
Merge trunk. |
651 |
from ..bzr.groupcompress_repo import RepositoryFormat2a |
6989.2.6
by Jelmer Vernooij
Run tests against brz-git interrepositories. |
652 |
from . import interrepo |
653 |
return [ |
|
7143.15.2
by Jelmer Vernooij
Run autopep8. |
654 |
(interrepo.InterLocalGitNonGitRepository, |
655 |
GitRepositoryFormat(), RepositoryFormat2a()), |
|
656 |
(interrepo.InterLocalGitLocalGitRepository, |
|
657 |
GitRepositoryFormat(), GitRepositoryFormat()), |
|
658 |
(interrepo.InterToLocalGitRepository, |
|
659 |
RepositoryFormat2a(), GitRepositoryFormat()), |
|
6989.2.6
by Jelmer Vernooij
Run tests against brz-git interrepositories. |
660 |
]
|