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

« back to all changes in this revision

Viewing changes to ivle/fileservice_lib/action.py

  • Committer: William Grant
  • Date: 2009-03-26 10:12:18 UTC
  • mto: (1165.3.1 submissions)
  • mto: This revision was merged to the branch mainline in revision 1174.
  • Revision ID: grantw@unimelb.edu.au-20090326101218-ilh28dl5o1i7kt76
Disable project radio buttons if they are closed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
197
197
    except KeyError:
198
198
        # Default, just send an error but then continue
199
199
        raise ActionError("Unknown action")
200
 
    return action(req, fields)
 
200
    action(req, fields)
201
201
 
202
202
def actionpath_to_urlpath(req, path):
203
203
    """Determines the URL path (relative to the student home) upon which the
738
738
def action_svnrepostat(req, fields):
739
739
    """Discovers whether a path exists in a repo under the IVLE SVN root.
740
740
 
741
 
    If it does exist, returns a dict containing its metadata.
742
 
 
743
741
    Reads fields: 'path'
744
742
    """
745
743
    path = fields.getfirst('path')
746
744
    url = ivle.conf.svn_addr + "/" + path
747
 
    svnclient.exception_style = 1
 
745
    svnclient.exception_style = 1 
748
746
 
749
747
    try:
750
748
        svnclient.callback_get_login = get_login
751
 
        info = svnclient.info2(url,
752
 
            revision=pysvn.Revision(pysvn.opt_revision_kind.head))[0][1]
753
 
        return {'svnrevision': info['rev'].number
754
 
                  if info['rev'] and
755
 
                     info['rev'].kind == pysvn.opt_revision_kind.number
756
 
                  else None}
 
749
        svnclient.info2(url)
757
750
    except pysvn.ClientError, e:
758
751
        # Error code 170000 means ENOENT in this revision.
759
752
        if e[1][0][1] == 170000: