#!/usr/bin/python

import svnlib

root_url = svnlib.get_svn_root_url()
print 'update cache', root_url, '...'
svnlib.init_log_db(root_url)
print 'ok.'
예제 #2
0
#!/usr/bin/python

import Tkinter # sudo apt-get install python-tk
import svnlib

url = svnlib.get_svn_url()
print 'update cache', url, '...'
svnlib.init_log_db(url)
print 'ok.'

root = Tkinter.Tk()

def layout_root(root):
    keyword = Tkinter.StringVar()
    keyword_entry = Tkinter.Entry(root, textvariable=keyword)
    keyword_entry.pack(side = Tkinter.TOP)

    text = Tkinter.Text(root)
    text.pack(side = Tkinter.BOTTOM)

    return [keyword, keyword_entry, text]

[keyword, keyword_entry, text] = layout_root(root)

def enter_key(event):
    logs = svnlib.search_from_db(url, keyword.get())
    set_logs(logs)

def set_logs(logs):
    text.delete("1.0", "end-1c")
    if logs is None: