Rev 1943: Return revision properties. in file:///data/jelmer/bzr-svn/trunk/
Jelmer Vernooij
jelmer at samba.org
Mon Oct 6 19:12:46 BST 2008
At file:///data/jelmer/bzr-svn/trunk/
------------------------------------------------------------
revno: 1943
revision-id: jelmer at samba.org-20081006181245-qx0f3jfuoqykttcy
parent: jelmer at samba.org-20081006180819-xmg0tentjcatnogl
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Mon 2008-10-06 20:12:45 +0200
message:
Return revision properties.
modified:
server.py server.py-20081006150454-t45tvwmbhpesdh7d-1
subvertpy/subvertpy/server.py server.py-20081006143330-f9p0l7eih6izgoct-1
=== modified file 'server.py'
--- a/server.py 2008-10-06 18:08:19 +0000
+++ b/server.py 2008-10-06 18:12:45 +0000
@@ -58,6 +58,9 @@
def get_latest_revnum(self):
return self.branch.revno()
+ def _get_revid(self, revnum):
+ return "/trunk", self.branch.get_rev_id(revnum)
+
def log(self, send_revision, target_path, start_rev, end_rev, report_changed_paths,
strict_node, limit):
i = 0
@@ -74,9 +77,10 @@
if limit != 0 and i == limit:
break
if revno > 0:
- rev = self.branch.repository.get_revision(self.branch.get_rev_id(revno))
+ (path, revid) = self._get_revid(revno)
+ rev = self.branch.repository.get_revision(revid)
if report_changed_paths:
- changes = determine_changed_paths(self.branch.repository, "/trunk", rev, revno)
+ changes = determine_changed_paths(self.branch.repository, path, rev, revno)
else:
changes = None
send_revision(revno,
@@ -86,7 +90,14 @@
self.branch.repository.unlock()
def rev_proplist(self, revnum):
- return {}
+ path, revid = self._get_revid(revnum)
+ rev = self.branch.repository.get_revision(revid)
+ ret = {
+ "svn:author": rev.committer,
+ "svn:date": time.strftime("%Y-%m-%dT%H:%M:%S.00000Z", time.gmtime(rev.timestamp)),
+ "svn:log": rev.message
+ }
+ return ret
def update(self, editor, revnum, target_path, recurse=True):
editor.set_target_revision(revnum)
=== modified file 'subvertpy/subvertpy/server.py'
--- a/subvertpy/subvertpy/server.py 2008-10-06 18:08:19 +0000
+++ b/subvertpy/subvertpy/server.py 2008-10-06 18:12:45 +0000
@@ -168,7 +168,7 @@
self.send_ack()
revprops = self.repo_backend.rev_proplist(revnum)
if name in revprops:
- self.send_success(revprops[name])
+ self.send_success([revprops[name]])
else:
self.send_success()
More information about the bazaar-commits
mailing list