Merge lp:~maxb/bzr-svn/unused into lp:bzr-svn/1.0

Proposed by Max Bowsher on 2010-08-16
Status: Merged
Merged at revision: 3470
Proposed branch: lp:~maxb/bzr-svn/unused
Merge into: lp:bzr-svn/1.0
Diff against target: 81 lines (+6/-12)
3 files modified
mapping4.py (+1/-4)
repository.py (+1/-2)
revmeta.py (+4/-6)
To merge this branch: bzr merge lp:~maxb/bzr-svn/unused
Reviewer Review Type Date Requested Status
Max Bowsher (community) Resubmit on 2010-09-17
Jelmer Vernooij (community) 2010-08-16 Needs Fixing on 2010-09-15
Review via email: mp+32822@code.launchpad.net

Description of the Change

As I was reading bzr-svn code recently, I found some pieces of code which, AFAICS, are unused / redundant. At least, I couldn't find anything using them by grepping the bzr and bzr-svn code.

To post a comment you must log in.
Jelmer Vernooij (jelmer) wrote :

As discussed on IRC, I'd like to keep get_rhs_ancestors().

review: Needs Fixing
Max Bowsher (maxb) wrote :

> As discussed on IRC, I'd like to keep get_rhs_ancestors().

Accordingly, I have replayed the revisions that were still applicable on top of tip of trunk.

Please excuse the noise in the MP - Launchpad has listed every trunk revision since my initial branch in the MP comment trail.

review: Resubmit
Max Bowsher (maxb) wrote :

> Please excuse the noise in the MP - Launchpad has listed every trunk revision
> since my initial branch in the MP comment trail.

Huh. Except now it has removed them again.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mapping4.py'
2--- mapping4.py 2009-11-26 20:57:57 +0000
3+++ mapping4.py 2010-09-17 21:42:45 +0000
4@@ -59,10 +59,7 @@
5
6 @classmethod
7 def from_repository(cls, repository, _hinted_branch_path=None):
8- if _hinted_branch_path == "":
9- return cls()
10- else:
11- return cls()
12+ return cls()
13
14 @classmethod
15 def from_revprops(cls, revprops):
16
17=== modified file 'repository.py'
18--- repository.py 2010-09-15 00:07:26 +0000
19+++ repository.py 2010-09-17 21:42:45 +0000
20@@ -443,8 +443,7 @@
21 self.branchprop_list = PathPropertyProvider(self._log)
22
23 self._revmeta_provider = revmeta.RevisionMetadataProvider(self,
24- self.revinfo_cache is not None,
25- self.transport.has_capability("commit-revprops") in (True, None))
26+ self.revinfo_cache is not None)
27
28 def get_transaction(self):
29 """See Repository.get_transaction()."""
30
31=== modified file 'revmeta.py'
32--- revmeta.py 2010-09-15 00:07:26 +0000
33+++ revmeta.py 2010-09-17 21:42:45 +0000
34@@ -189,14 +189,14 @@
35 from other known data before contacting the Subversions server.
36 """
37
38- __slots__ = ('check_revprops', '_get_fileprops_fn',
39+ __slots__ = ('_get_fileprops_fn',
40 '_changed_fileprops', '_fileprops',
41 '_direct_lhs_parent_known', '_consider_bzr_fileprops',
42 '_consider_bzr_revprops', '_estimated_fileprop_ancestors',
43 'metaiterators', 'children',
44 '_direct_lhs_parent_revmeta', '_revprop_redirect_revnum')
45
46- def __init__(self, repository, check_revprops, get_fileprops_fn,
47+ def __init__(self, repository, get_fileprops_fn,
48 branch_path, logwalker, revnum, paths, revprops,
49 changed_fileprops=None, fileprops=None,
50 metaiterator=None):
51@@ -204,7 +204,6 @@
52 repository.uuid, branch_path, revnum, paths=paths,
53 revprops=revprops)
54 self.repository = repository
55- self.check_revprops = check_revprops
56 self._get_fileprops_fn = get_fileprops_fn
57 self._changed_fileprops = changed_fileprops
58 self._fileprops = fileprops
59@@ -1274,12 +1273,11 @@
60 class RevisionMetadataProvider(object):
61 """A RevisionMetadata provider."""
62
63- def __init__(self, repository, cache, check_revprops):
64+ def __init__(self, repository, cache):
65 self._revmeta_cache = {}
66 self.repository = repository
67 self._get_fileprops_fn = self.repository.branchprop_list.get_properties
68 self._log = repository._log
69- self.check_revprops = check_revprops
70 self._open_metaiterators = []
71 if cache:
72 self._revmeta_cls = CachingBzrRevisionMetadata
73@@ -1292,7 +1290,7 @@
74 """Create a new RevisionMetadata instance, assuming this
75 revision isn't cached yet.
76 """
77- return self._revmeta_cls(self.repository, self.check_revprops,
78+ return self._revmeta_cls(self.repository,
79 self._get_fileprops_fn,
80 path, self._log, revnum, changes, revprops,
81 changed_fileprops=changed_fileprops,

Subscribers

People subscribed via source and target branches