[py-svn] r33179 - in py/dist/py/misc: . testing

hpk at codespeak.net hpk at codespeak.net
Wed Oct 11 19:10:57 CEST 2006


Author: hpk
Date: Wed Oct 11 19:10:56 2006
New Revision: 33179

Modified:
   py/dist/py/misc/svnlook.py
   py/dist/py/misc/testing/test_svnlook.py
Log:
added a method to get at the author of a commit given
local access to a repo


Modified: py/dist/py/misc/svnlook.py
==============================================================================
--- py/dist/py/misc/svnlook.py	(original)
+++ py/dist/py/misc/svnlook.py	Wed Oct 11 19:10:56 2006
@@ -25,6 +25,10 @@
         l.append(ChangeItem(repo, revision, line))
     return l
 
+def author(repo, revision):         
+    out = py.process.cmdexec("svnlook author -r %s %s" %(revision, repo))
+    return out.strip()
+
 def youngest(repo): 
     out = py.process.cmdexec("svnlook youngest %s" %(repo,))
     return int(out) 

Modified: py/dist/py/misc/testing/test_svnlook.py
==============================================================================
--- py/dist/py/misc/testing/test_svnlook.py	(original)
+++ py/dist/py/misc/testing/test_svnlook.py	Wed Oct 11 19:10:56 2006
@@ -15,6 +15,9 @@
     py.process.cmdexec("svnadmin create --fs-type fsfs %s" % repo)
     py.process.cmdexec("svnadmin load %s <%s" %(repo, 
                        data.join("svnlookrepo.dump")))
+
+    author = svnlook.author(repo, 1) 
+    assert author == "hpk"
     
     for item in svnlook.changed(repo, 1): 
         svnurl = item.svnurl()


More information about the py-svn mailing list