~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to services/svnlogservice

  • Committer: chadnickbok
  • Date: 2009-01-13 05:33:58 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:1108
Updated the settings page to require the old password
when updating the password. Note that this field
is not shown when using ldap authentication

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
import cgi
29
29
import pysvn
30
30
 
31
 
import ivle.cgirequest
32
 
import ivle.util
33
 
import ivle.date
34
 
import ivle.svn
 
31
import common.cgirequest
 
32
import common.util
 
33
import common.date
 
34
import common.svn
35
35
 
36
 
req = ivle.cgirequest.CGIRequest()
 
36
req = common.cgirequest.CGIRequest()
37
37
req.install_error_handler()
38
38
req.content_type = "text/html"
39
39
 
40
40
req.write('<h1>Subversion Log</h1>\n')
41
41
 
42
42
r_str = req.get_fieldstorage().getfirst("r")
43
 
sr = ivle.svn.revision_from_string(r_str)
 
43
sr = common.svn.revision_from_string(r_str)
44
44
 
45
45
def pretty_path(cpath, revno=None):
46
46
    path = cpath['path']
47
47
    # XXX: We can't assume that the repository root is always equivalent to
48
48
    #      the current user's home directory, although it does work for our
49
49
    #      current setup.
50
 
    url = ivle.util.make_path(os.path.join('files',
51
 
                              ivle.util.split_path(req.path)[0],
52
 
                              path[1:]))
 
50
    url = common.util.make_path(os.path.join('files',
 
51
                                    common.util.split_path(req.path)[0],
 
52
                                    path[1:]))
53
53
    if revno:
54
54
        url += '?r=%d' % revno
55
55
    return '%s <a href="%s">%s</a>' % (cpath['action'], cgi.escape(url, True),
71
71
        <div class="svnloginfo">
72
72
                Revision <a href="%s?r=%d" style="font-weight: bold">%d</a>
73
73
                by <strong>%s</strong> on <strong>%s</strong>
74
 
''' % (cgi.escape(ivle.util.make_path(os.path.join('files', req.path))),
75
 
       revno, revno, author, ivle.date.make_date_nice(log.date))
 
74
''' % (cgi.escape(common.util.make_path(os.path.join('files', req.path))),
 
75
       revno, revno, author, common.date.make_date_nice(log.date))
76
76
 
77
77
    # Now we get ugly. We need to sometimes present [select] and [diff] links.
78
78
    if sr and sr.kind == pysvn.opt_revision_kind.number and sr.number == revno:
79
79
        result += '[selected]'
80
80
    else:
81
81
        result += '<a href="%s?r=%d">[select]</a>' % (
82
 
              cgi.escape(ivle.util.make_path(os.path.join('svnlog', req.path))),
 
82
              cgi.escape(common.util.make_path(os.path.join('svnlog', req.path))),
83
83
              revno)
84
84
    if sr and sr.kind == pysvn.opt_revision_kind.number:
85
85
        result += ' <a href="%s?r=%d&r=%d">[diff]</a>' % (
86
 
              cgi.escape(ivle.util.make_path(os.path.join('diff', req.path))),
 
86
              cgi.escape(common.util.make_path(os.path.join('diff', req.path))),
87
87
              sr.number, revno)
88
88
 
89
89
    result += '''