Rev 1284: Cope with new include_merged_revisions argument. in http://people.samba.org/bzr/jelmer/bzr-svn/0.4
Jelmer Vernooij
jelmer at samba.org
Sun Jun 22 23:19:12 BST 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/0.4
------------------------------------------------------------
revno: 1284
revision-id: jelmer at samba.org-20080622221911-w7vdp5nvsijyud6a
parent: jelmer at samba.org-20080622220850-rmzes5etysi5bupc
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Mon 2008-06-23 00:19:11 +0200
message:
Cope with new include_merged_revisions argument.
modified:
logwalker.py logwalker.py-20060621215743-c13fhfnyzh1xzwh2-1
ra.c ra.pyx-20080313140933-qybkqaxe3m4mcll7-1
transport.py transport.py-20060406231150-b3472d06b3a0818d
=== modified file 'logwalker.py'
--- a/logwalker.py 2008-06-22 13:43:01 +0000
+++ b/logwalker.py 2008-06-22 22:19:11 +0000
@@ -262,7 +262,7 @@
pb = ui.ui_factory.nested_progress_bar()
- def rcvr(orig_paths, revision, revprops):
+ def rcvr(orig_paths, revision, revprops, has_children):
pb.update('fetching svn revision info', revision, to_revnum)
if orig_paths is None:
orig_paths = {}
@@ -280,7 +280,7 @@
try:
try:
- self.actual._transport.get_log(rcvr, None, self.saved_revnum, to_revnum, 0, True, True, [])
+ self.actual._transport.get_log(rcvr, None, self.saved_revnum, to_revnum, 0, True, True, False, [])
except SubversionException, (_, num):
if num == ERR_FS_NO_SUCH_REVISION:
raise NoSuchRevision(branch=self,
@@ -324,7 +324,7 @@
assert isinstance(revnum, int) and revnum >= 0
try:
- return self._transport.iter_log([path], revnum, 0, 2, True, False, []).next()[1]
+ return self._transport.iter_log([path], revnum, 0, 2, True, False, False, []).next()[1]
except SubversionException, (_, num):
if num == ERR_FS_NO_SUCH_REVISION:
raise NoSuchRevision(branch=self,
@@ -345,7 +345,16 @@
assert from_revnum >= 0 and to_revnum >= 0
try:
- for (changed_paths, revnum, known_revprops) in self._transport.iter_log(paths, from_revnum, to_revnum, limit, True, False, []):
+ try:
+ iterator = self._transport.iter_log(paths, from_revnum, to_revnum, limit,
+ True, False, False, revprops=None)
+ has_all_revprops = True
+ except NotImplementedError:
+ iterator = self._transport.iter_log(paths, from_revnum, to_revnum, limit,
+ True, False, False, revprops=["svn:author", "svn:log", "svn:date"])
+ has_all_revprops = False
+
+ for (changed_paths, revnum, known_revprops, has_children) in iterator:
if pb is not None:
pb.update("determining changes", from_revnum-revnum, from_revnum)
if revnum == 0 and changed_paths is None:
@@ -353,7 +362,10 @@
else:
assert isinstance(changed_paths, dict), "invalid paths %r in %r" % (changed_paths, revnum)
revpaths = struct_revpaths_to_tuples(changed_paths)
- revprops = lazy_dict(known_revprops, self._transport.revprop_list, revnum)
+ if has_all_revprops:
+ revprops = known_revprops
+ else:
+ revprops = lazy_dict(known_revprops, self._transport.revprop_list, revnum)
yield (revpaths, revnum, revprops)
except SubversionException, (_, num):
if num == ERR_FS_NO_SUCH_REVISION:
@@ -374,7 +386,7 @@
try:
return struct_revpaths_to_tuples(
- self._transport.iter_log(None, revnum, revnum, 1, True, True, []).next()[0])
+ self._transport.iter_log(None, revnum, revnum, 1, True, True, False, []).next()[0])
except SubversionException, (_, num):
if num == ERR_FS_NO_SUCH_REVISION:
raise NoSuchRevision(branch=self,
@@ -421,7 +433,7 @@
return (None, -1)
try:
- paths = struct_revpaths_to_tuples(self._transport.iter_log([path], revnum, revnum, 1, True, False, []).next()[0])
+ paths = struct_revpaths_to_tuples(self._transport.iter_log([path], revnum, revnum, 1, True, False, False, []).next()[0])
except SubversionException, (_, num):
if num == ERR_FS_NO_SUCH_REVISION:
raise NoSuchRevision(branch=self,
=== modified file 'ra.c'
--- a/ra.c 2008-06-22 22:08:50 +0000
+++ b/ra.c 2008-06-22 22:19:11 +0000
@@ -721,7 +721,7 @@
static PyObject *ra_get_log(PyObject *self, PyObject *args, PyObject *kwargs)
{
char *kwnames[] = { "callback", "paths", "start", "end", "limit",
- "discover_changed_paths", "strict_node_history", "revprops", NULL };
+ "discover_changed_paths", "strict_node_history", "include_merged_revisions", "revprops", NULL };
PyObject *callback, *paths;
svn_revnum_t start = 0, end = 0;
int limit=0;
=== modified file 'transport.py'
--- a/transport.py 2008-06-22 13:35:17 +0000
+++ b/transport.py 2008-06-22 22:19:11 +0000
@@ -217,7 +217,7 @@
return conn.do_switch(switch_rev, path, recurse, switch_url, editor)
def iter_log(self, paths, from_revnum, to_revnum, limit, discover_changed_paths,
- strict_node_history, revprops):
+ strict_node_history, include_merged_revisions, revprops):
assert paths is None or isinstance(paths, list)
assert paths is None or all([isinstance(x, str) for x in paths])
assert isinstance(from_revnum, int) and isinstance(to_revnum, int)
@@ -263,12 +263,12 @@
else:
newpaths = [self._request_path(path) for path in paths]
- fetcher = logfetcher(self, paths=newpaths, start=from_revnum, end=to_revnum, limit=limit, discover_changed_paths=discover_changed_paths, strict_node_history=strict_node_history, revprops=revprops)
+ fetcher = logfetcher(self, paths=newpaths, start=from_revnum, end=to_revnum, limit=limit, discover_changed_paths=discover_changed_paths, strict_node_history=strict_node_history, include_merged_revisions=include_merged_revisions,revprops=revprops)
fetcher.start()
return iter(fetcher.next, None)
def get_log(self, rcvr, paths, from_revnum, to_revnum, limit, discover_changed_paths,
- strict_node_history, revprops):
+ strict_node_history, include_merged_revisions, revprops):
assert paths is None or isinstance(paths, list), "Invalid paths"
assert paths is None or all([isinstance(x, str) for x in paths])
@@ -284,6 +284,7 @@
return conn.get_log(rcvr, newpaths,
from_revnum, to_revnum,
limit, discover_changed_paths, strict_node_history,
+ include_merged_revisions,
revprops)
finally:
self.add_connection(conn)
More information about the bazaar-commits
mailing list