Merge lp:~beuno/loggerhead/deprecate into lp:loggerhead

Proposed by Martin Albisetti
Status: Merged
Merged at revision: not available
Proposed branch: lp:~beuno/loggerhead/deprecate
Merge into: lp:loggerhead
Diff against target: None lines
To merge this branch: bzr merge lp:~beuno/loggerhead/deprecate
Reviewer Review Type Date Requested Status
Michael Hudson-Doyle Approve
Review via email: mp+6929@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Martin Albisetti (beuno) wrote :

This branch removes compatibility glue for older versions of bzr, and bumps the minimum version of bzrlib to 1.13

Revision history for this message
Matt Nordhoff (mnordhoff) wrote :

That's it? There's nothing else that can be cleaned up? Too bad.

You should update the require_any_api() call in /__init__.py (I mean /__init__.py, not /loggerhead/__init__.py).

(This branch works for me, but I'm not qualified to review changes to history.py.)

Revision history for this message
Martin Albisetti (beuno) wrote :

> That's it? There's nothing else that can be cleaned up? Too bad.

I couldn't find anything that jumped at me...

> You should update the require_any_api() call in /__init__.py (I mean
> /__init__.py, not /loggerhead/__init__.py).

Done. Thanks

lp:~beuno/loggerhead/deprecate updated
359. By Martin Albisetti

Update bzrlib API in /__init__.py

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Looks fine, let's land it!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS'
2--- NEWS 2009-05-27 15:57:20 +0000
3+++ NEWS 2009-05-29 13:40:17 +0000
4@@ -118,6 +118,8 @@
5 - Fix serving branches over HTTP. (Matt Nordhoff, Jelmer Vernooij,
6 #380026)
7
8+ - Bumped minimunm bzrlib version to 1.13 (Martin Albisetti)
9+
10 1.10 [22Dec2008]
11 ---------------
12
13
14=== modified file 'loggerhead/__init__.py'
15--- loggerhead/__init__.py 2009-02-10 21:11:43 +0000
16+++ loggerhead/__init__.py 2009-05-29 13:39:28 +0000
17@@ -1,3 +1,6 @@
18+#
19+# Copyright (C) 2008, 2009 Canonical Ltd.
20+#
21 # This program is free software; you can redistribute it and/or modify
22 # it under the terms of the GNU General Public License as published by
23 # the Free Software Foundation; either version 2 of the License, or
24@@ -20,7 +23,7 @@
25 import pkg_resources
26
27 __version__ = '1.10'
28-required_bzrlib = (1, 6)
29+required_bzrlib = (1, 13)
30
31 pkg_resources.get_distribution('Paste>=1.6')
32 try:
33
34=== modified file 'loggerhead/controllers/changelog_ui.py'
35--- loggerhead/controllers/changelog_ui.py 2009-03-17 22:38:57 +0000
36+++ loggerhead/controllers/changelog_ui.py 2009-05-29 13:39:28 +0000
37@@ -1,4 +1,5 @@
38 #
39+# Copyright (C) 2008, 2009 Canonical Ltd.
40 # Copyright (C) 2006 Robey Pointer <robey@lag.net>
41 # Copyright (C) 2006 Goffredo Baroncelli <kreijack@inwind.it>
42 #
43
44=== modified file 'loggerhead/history.py'
45--- loggerhead/history.py 2009-05-18 04:17:11 +0000
46+++ loggerhead/history.py 2009-05-29 13:39:28 +0000
47@@ -1,5 +1,5 @@
48 #
49-# Copyright (C) 2008 Canonical Ltd.
50+# Copyright (C) 2008, 2009 Canonical Ltd.
51 # (Authored by Martin Albisetti <argentina@gmail.com>)
52 # Copyright (C) 2006 Robey Pointer <robey@lag.net>
53 # Copyright (C) 2006 Goffredo Baroncelli <kreijack@inwind.it>
54@@ -108,9 +108,6 @@
55 return path
56
57
58-# from bzrlib
59-
60-
61 class _RevListToTimestamps(object):
62 """This takes a list of revisions, and allows you to bisect by date"""
63
64@@ -342,25 +339,17 @@
65 def get_short_revision_history_by_fileid(self, file_id):
66 # FIXME: would be awesome if we could get, for a folder, the list of
67 # revisions where items within that folder changed.i
68- try:
69- # FIXME: Workaround for bzr versions prior to 1.6b3.
70- # Remove me eventually pretty please :)
71- w = self._branch.repository.weave_store.get_weave(
72- file_id, self._branch.repository.get_transaction())
73- w_revids = w.versions()
74- revids = [r for r in self._rev_indices if r in w_revids]
75- except AttributeError:
76- possible_keys = [(file_id, revid) for revid in self._rev_indices]
77- get_parent_map = self._branch.repository.texts.get_parent_map
78- # We chunk the requests as this works better with GraphIndex.
79- # See _filter_revisions_touching_file_id in bzrlib/log.py
80- # for more information.
81- revids = []
82- chunk_size = 1000
83- for start in xrange(0, len(possible_keys), chunk_size):
84- next_keys = possible_keys[start:start + chunk_size]
85- revids += [k[1] for k in get_parent_map(next_keys)]
86- del possible_keys, next_keys
87+ possible_keys = [(file_id, revid) for revid in self._rev_indices]
88+ get_parent_map = self._branch.repository.texts.get_parent_map
89+ # We chunk the requests as this works better with GraphIndex.
90+ # See _filter_revisions_touching_file_id in bzrlib/log.py
91+ # for more information.
92+ revids = []
93+ chunk_size = 1000
94+ for start in xrange(0, len(possible_keys), chunk_size):
95+ next_keys = possible_keys[start:start + chunk_size]
96+ revids += [k[1] for k in get_parent_map(next_keys)]
97+ del possible_keys, next_keys
98 return revids
99
100 def get_revision_history_since(self, revid_list, date):
101
102=== modified file 'loggerhead/wholehistory.py'
103--- loggerhead/wholehistory.py 2009-05-18 04:17:11 +0000
104+++ loggerhead/wholehistory.py 2009-05-29 13:39:28 +0000
105@@ -1,4 +1,5 @@
106-# Cache the whole history data needed by loggerhead about a branch.
107+#
108+# Copyright (C) 2008, 2009 Canonical Ltd.
109 #
110 # This program is free software; you can redistribute it and/or modify
111 # it under the terms of the GNU General Public License as published by
112@@ -14,6 +15,7 @@
113 # along with this program; if not, write to the Free Software
114 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
115 #
116+"""Cache the whole history data needed by loggerhead about a branch."""
117
118 import logging
119 import time

Subscribers

People subscribed via source and target branches