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

« back to all changes in this revision

Viewing changes to lib/fileservice_lib/action.py

  • Committer: matt.giuca
  • Date: 2009-01-11 11:27:56 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:1069
setup.py: Updated copyright (2009).
setup/configure.py: Changed default database user name from "postgres" to
    "ivleuser".
    (postgres is the admin user, we shouldn't be using it).

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
#       to:     The path of the target filename. Error if the file already
42
42
#               exists.
43
43
#
44
 
# action=putfile: Upload a file to the student workspace, and optionally
45
 
#               accept zip files which will be unpacked.
46
 
#       path:   The path to the file to be written. If it exists, will
47
 
#               overwrite. Error if the target file is a directory.
 
44
# action=putfile: Upload a file to the student workspace.
 
45
#       path:   The path to the file to be written. Error if the target
 
46
#               file is a directory.
48
47
#       data:   Bytes to be written to the file verbatim. May either be
49
48
#               a string variable or a file upload.
50
 
#       unpack: Optional. If "true", and the data is a valid ZIP file,
51
 
#               will create a directory instead and unpack the ZIP file
52
 
#               into it.
 
49
#       overwrite: Optional. If supplied, the file will be overwritten.
 
50
#               Otherwise, error if path already exists.
53
51
#
54
52
# action=putfiles: Upload multiple files to the student workspace, and
55
53
#                 optionally accept zip files which will be unpacked.
58
56
#       data:   A file upload (may not be a simple string). The filename
59
57
#               will be used to determine the target filename within
60
58
#               the given path.
61
 
#       unpack: Optional. If "true", if any data is a valid ZIP file,
 
59
#       unpack: Optional. If supplied, if any data is a valid ZIP file,
62
60
#               will create a directory instead and unpack the ZIP file
63
61
#               into it.
64
62
#
 
63
# action=mkdir: Create a directory. The parent dir must exist.
 
64
#       path:   The path to a file which does not exist, but whose parent
 
65
#               does. The dir will be made with this name.
 
66
#
65
67
# The differences between putfile and putfiles are:
66
 
# * putfile can only accept a single file.
 
68
# * putfile can only accept a single file, and can't unpack zipfiles.
67
69
# * putfile can accept string data, doesn't have to be a file upload.
68
70
# * putfile ignores the upload filename, the entire filename is specified on
69
71
#       path. putfiles calls files after the name on the user's machine.
70
72
#
71
 
# Clipboard-based actions. Cut/copy/paste work in the same way as modern
72
 
# file browsers, by keeping a server-side clipboard of files that have been
73
 
# cut and copied. The clipboard is stored in the session data, so it persists
74
 
# across navigation, tabs and browser windows, but not across browser
75
 
# sessions.
76
 
77
 
# action=copy: Write file(s) to the session-based clipboard. Overrides any
78
 
#               existing clipboard data. Does not actually copy the file.
79
 
#               The files are physically copied when the clipboard is pasted.
80
 
#       path:   The path to the file or directory to copy. Can be specified
81
 
#               multiple times.
82
 
83
 
# action=cut: Write file(s) to the session-based clipboard. Overrides any
84
 
#               existing clipboard data. Does not actually move the file.
85
 
#               The files are physically moved when the clipboard is pasted.
86
 
#       path:   The path to the file or directory to cut. Can be specified
87
 
#               multiple times.
88
 
89
 
# action=paste: Copy or move the files stored in the clipboard. Clears the
90
 
#               clipboard. The files are copied or moved to a specified dir.
91
 
#       path:   The path to the DIRECTORY to paste the files to. Must not
 
73
# action=paste: Copy or move the files to a specified dir.
 
74
#       src:    The path to the DIRECTORY to get the files from (relative).
 
75
#       dst:    The path to the DIRECTORY to paste the files to. Must not
92
76
#               be a file.
 
77
#       mode:   'copy' or 'move'
 
78
#       file:   File to be copied or moved, relative to src, to a destination
 
79
#               relative to dst. Can be specified multiple times.
93
80
#
94
81
# Subversion actions.
95
82
# action=svnadd: Add an existing file(s) to version control.
119
106
#               recursively.
120
107
#       logmsg: Text of the log message. Optional. There is a default log
121
108
#               message if unspecified.
122
 
 
109
# action=svncheckout: Checkout a file/directory from the repository.
 
110
#       path:   The [repository] path to the file or directory to be
 
111
#               checked out.
 
112
 
113
# action=svnrepomkdir: Create a directory in a repository (not WC).
 
114
#       path:   The path to the directory to be created (under the IVLE
 
115
#               repository base).
 
116
#       logmsg: Text of the log message.
 
117
 
118
# action=svnrepostat: Check if a path exists in a repository (not WC).
 
119
#       path:   The path to the directory to be checked (under the IVLE
 
120
#               repository base).
 
121
#
123
122
# TODO: Implement the following actions:
124
 
#   putfiles, svnrevert, svnupdate, svncommit
125
 
# TODO: Implement ZIP unpacking in putfile and putfiles.
 
123
#   svnupdate (done?)
 
124
# TODO: Implement ZIP unpacking in putfiles (done?).
126
125
# TODO: svnupdate needs a digest to tell the user the files that were updated.
127
126
#   This can be implemented by some message passing between action and
128
127
#   listing, and having the digest included in the listing. (Problem if
136
135
import pysvn
137
136
 
138
137
from common import (util, studpath, zip)
 
138
import conf
 
139
 
 
140
def get_login(_realm, existing_login, _may_save):
 
141
    """Callback function used by pysvn for authentication.
 
142
    realm, existing_login, _may_save: The 3 arguments passed by pysvn to
 
143
        callback_get_login.
 
144
        The following has been determined empirically, not from docs:
 
145
        existing_login will be the name of the user who owns the process on
 
146
        the first attempt, "" on subsequent attempts. We use this fact.
 
147
    """
 
148
    # Only provide credentials on the _first_ attempt.
 
149
    # If we're being asked again, then it means the credentials failed for
 
150
    # some reason and we should just fail. (This is not desirable, but it's
 
151
    # better than being asked an infinite number of times).
 
152
    return (existing_login != "", conf.login, conf.svn_pass, True)
139
153
 
140
154
# Make a Subversion client object
141
155
svnclient = pysvn.Client()
 
156
svnclient.callback_get_login = get_login
 
157
svnclient.exception_style = 0               # Simple (string) exceptions
142
158
 
143
159
DEFAULT_LOGMESSAGE = "No log message supplied."
144
160
 
232
248
    if os.path.exists(topath):
233
249
        if frompath == topath:
234
250
            raise ActionError("Source and destination are the same")
235
 
        raise ActionError("Another file already exists with that name")
 
251
        raise ActionError("A file already exists with that name")
236
252
 
237
253
    try:
238
254
        if copy:
249
265
 
250
266
### ACTIONS ###
251
267
 
252
 
def action_remove(req, fields):
253
 
    # TODO: Do an SVN rm if the file is versioned.
 
268
def action_delete(req, fields):
254
269
    # TODO: Disallow removal of student's home directory
255
270
    """Removes a list of files or directories.
256
271
 
287
302
    topath = fields.getfirst('to')
288
303
    movefile(req, frompath, topath)
289
304
 
 
305
def action_mkdir(req, fields):
 
306
    """Creates a directory with the given path.
 
307
    Reads fields: 'path'
 
308
    """
 
309
    path = fields.getfirst('path')
 
310
    if path is None:
 
311
        raise ActionError("Required field missing")
 
312
    path = actionpath_to_local(req, path)
 
313
 
 
314
    if os.path.exists(path):
 
315
        raise ActionError("A file already exists with that name")
 
316
 
 
317
    # Create the directory
 
318
    try:
 
319
        os.mkdir(path)
 
320
    except OSError:
 
321
        raise ActionError("Could not create directory")
 
322
 
290
323
def action_putfile(req, fields):
291
324
    """Writes data to a file, overwriting it if it exists and creating it if
292
325
    it doesn't.
293
326
 
294
 
    Reads fields: 'path', 'data' (file upload)
 
327
    Reads fields: 'path', 'data' (file upload), 'overwrite'
295
328
    """
296
329
    # TODO: Read field "unpack".
297
330
    # Important: Data is "None" if the file submitted is empty.
298
331
    path = fields.getfirst('path')
299
332
    data = fields.getfirst('data')
300
 
    if path is None or data is None:
 
333
    if path is None:
301
334
        raise ActionError("Required field missing")
 
335
    if data is None:
 
336
        # Workaround - field reader treats "" as None, so this is the only
 
337
        # way to allow blank file uploads
 
338
        data = ""
302
339
    path = actionpath_to_local(req, path)
303
340
 
304
341
    if data is not None:
305
342
        data = cStringIO.StringIO(data)
306
343
 
 
344
    overwrite = fields.getfirst('overwrite')
 
345
    if overwrite is None:
 
346
        overwrite = False
 
347
    else:
 
348
        overwrite = True
 
349
 
 
350
    if overwrite:
 
351
        # Overwrite files; but can't if it's a directory
 
352
        if os.path.isdir(path):
 
353
            raise ActionError("A directory already exists "
 
354
                    + "with that name")
 
355
    else:
 
356
        if os.path.exists(path):
 
357
            raise ActionError("A file already exists with that name")
 
358
 
307
359
    # Copy the contents of file object 'data' to the path 'path'
308
360
    try:
309
361
        dest = open(path, 'wb')
310
362
        if data is not None:
311
363
            shutil.copyfileobj(data, dest)
312
 
    except OSError:
313
 
        raise ActionError("Could not write to target file")
 
364
    except (IOError, OSError), e:
 
365
        raise ActionError("Could not write to target file: %s" % e.strerror)
314
366
 
315
367
def action_putfiles(req, fields):
316
368
    """Writes data to one or more files in a directory, overwriting them if
334
386
    path = actionpath_to_urlpath(req, path)
335
387
    goterror = False
336
388
 
337
 
 
338
389
    for datum in data:
339
390
        # Each of the uploaded files
340
391
        filepath = os.path.join(path, datum.filename)
341
 
        filedata = datum.value
 
392
        filedata = datum.file
342
393
 
343
394
        if unpack and datum.filename.lower().endswith(".zip"):
344
395
            # A zip file - unpack it instead of just copying
346
397
            # Note: Just unzip into the current directory (ignore the
347
398
            # filename)
348
399
            try:
349
 
                zip.unzip(path, filedata)
 
400
                # First get the entire path (within jail)
 
401
                _, _, abspath = studpath.url_to_jailpaths(path)
 
402
                abspath = os.path.join(os.sep, abspath)
 
403
                zip.unzip(abspath, filedata)
350
404
            except (OSError, IOError):
351
405
                goterror = True
352
406
        else:
359
413
            try:
360
414
                dest = open(filepath_local, 'wb')
361
415
                if data is not None:
362
 
                    shutil.copyfileobj(cStringIO.StringIO(filedata), dest)
363
 
            except OSError:
 
416
                    shutil.copyfileobj(filedata, dest)
 
417
            except (OSError, IOError):
 
418
                # TODO: Be more descriptive.
364
419
                goterror = True
365
420
 
366
421
    if goterror:
370
425
            raise ActionError(
371
426
                "Could not write to one or more of the target files")
372
427
 
373
 
def action_copy_or_cut(req, fields, mode):
374
 
    """Marks specified files on the clipboard, stored in the
375
 
    browser session. Sets clipboard for either a cut or copy operation
376
 
    as specified.
377
 
 
378
 
    Reads fields: 'path'
379
 
    """
380
 
    # The clipboard object created conforms to the JSON clipboard
381
 
    # specification given at the top of listing.py.
382
 
    # Note that we do not check for the existence of files here. That is done
383
 
    # in the paste operation.
384
 
    files = fields.getlist('path')
385
 
    clipboard = { "mode" : mode, "base" : req.path, "files" : files }
386
 
    session = req.get_session()
387
 
    session['clipboard'] = clipboard
388
 
    session.save()
389
 
 
390
 
def action_copy(req, fields):
391
 
    """Marks specified files on the clipboard, stored in the
392
 
    browser session. Sets clipboard for a "copy" action.
393
 
 
394
 
    Reads fields: 'path'
395
 
    """
396
 
    action_copy_or_cut(req, fields, "copy")
397
 
 
398
 
def action_cut(req, fields):
399
 
    """Marks specified files on the clipboard, stored in the
400
 
    browser session. Sets clipboard for a "cut" action.
401
 
 
402
 
    Reads fields: 'path'
403
 
    """
404
 
    action_copy_or_cut(req, fields, "cut")
405
 
 
406
428
def action_paste(req, fields):
407
 
    """Performs the copy or move action with the files stored on
408
 
    the clipboard in the browser session. Copies/moves the files
409
 
    to the specified directory. Clears the clipboard.
 
429
    """Performs the copy or move action with the files specified.
 
430
    Copies/moves the files to the specified directory.
410
431
 
411
 
    Reads fields: 'path'
 
432
    Reads fields: 'src', 'dst', 'mode', 'file' (multiple).
 
433
    src: Base path that all the files are relative to (source).
 
434
    dst: Destination path to paste into.
 
435
    mode: 'copy' or 'move'.
 
436
    file: (Multiple) Files relative to base, which will be copied
 
437
        or moved to new locations relative to path.
412
438
    """
413
439
    errormsg = None
414
440
 
415
 
    todir = fields.getfirst('path')
416
 
    if todir is None:
 
441
    dst = fields.getfirst('dst')
 
442
    src = fields.getfirst('src')
 
443
    mode = fields.getfirst('mode')
 
444
    files = fields.getlist('file')
 
445
    if dst is None or src is None or mode is None:
417
446
        raise ActionError("Required field missing")
418
 
    todir_local = actionpath_to_local(req, todir)
419
 
    if not os.path.isdir(todir_local):
420
 
        raise ActionError("Target is not a directory")
421
 
 
422
 
    session = req.get_session()
423
 
    try:
424
 
        clipboard = session['clipboard']
425
 
        files = clipboard['files']
426
 
        base = clipboard['base']
427
 
        if clipboard['mode'] == "copy":
428
 
            copy = True
429
 
        else:
430
 
            copy = False
431
 
    except KeyError:
432
 
        raise ActionError("Clipboard was empty")
 
447
    if mode == "copy":
 
448
        copy = True
 
449
    elif mode == "move":
 
450
        copy = False
 
451
    else:
 
452
        raise ActionError("Invalid mode (must be 'copy' or 'move')")
 
453
    dst_local = actionpath_to_local(req, dst)
 
454
    if not os.path.isdir(dst_local):
 
455
        raise ActionError("dst is not a directory")
433
456
 
434
457
    errorfiles = []
435
458
    for file in files:
436
459
        # The source must not be interpreted as relative to req.path
437
460
        # Add a slash (relative to top-level)
438
 
        frompath = os.sep + os.path.join(base, file)
 
461
        if src[:1] != '/':
 
462
            src = '/' + src
 
463
        frompath = os.path.join(src, file)
439
464
        # The destination is found by taking just the basename of the file
440
 
        topath = os.path.join(todir, os.path.basename(file))
 
465
        topath = os.path.join(dst, os.path.basename(file))
441
466
        try:
442
467
            movefile(req, frompath, topath, copy)
443
468
        except ActionError, message:
450
475
            # Add this file to errorfiles; it will be put back on the
451
476
            # clipboard for possible future pasting.
452
477
            errorfiles.append(file)
453
 
    # If errors occured, augment the clipboard and raise ActionError
454
 
    if len(errorfiles) > 0:
455
 
        clipboard['files'] = errorfiles
456
 
        session['clipboard'] = clipboard
457
 
        session.save()
 
478
    if errormsg is not None:
458
479
        raise ActionError(errormsg)
459
480
 
460
 
    # Success: Clear the clipboard
461
 
    del session['clipboard']
462
 
    session.save()
 
481
    # XXX errorfiles contains a list of files that couldn't be pasted.
 
482
    # we currently do nothing with this.
 
483
 
 
484
def action_publish(req,fields):
 
485
    """Marks the folder as published by adding a '.published' file to the 
 
486
    directory and ensuring that the parent directory permissions are correct
 
487
 
 
488
    Reads fields: 'path'
 
489
    """
 
490
    paths = fields.getlist('path')
 
491
    user = studpath.url_to_local(req.path)[0]
 
492
    homedir = "/home/%s" % user
 
493
    if len(paths):
 
494
        paths = map(lambda path: actionpath_to_local(req, path), paths)
 
495
    else:
 
496
        paths = [studpath.url_to_jailpaths(req.path)[2]]
 
497
 
 
498
    # Set all the dirs in home dir world browsable (o+r,o+x)
 
499
    #FIXME: Should really only do those in the direct path not all of the 
 
500
    # folders in a students home directory
 
501
    for root,dirs,files in os.walk(homedir):
 
502
        os.chmod(root, os.stat(root).st_mode|0005)
 
503
 
 
504
    try:
 
505
        for path in paths:
 
506
            if os.path.isdir(path):
 
507
                pubfile = open(os.path.join(path,'.published'),'w')
 
508
                pubfile.write("This directory is published\n")
 
509
                pubfile.close()
 
510
            else:
 
511
                raise ActionError("Can only publish directories")
 
512
    except OSError, e:
 
513
        raise ActionError("Directory could not be published")
 
514
 
 
515
def action_unpublish(req,fields):
 
516
    """Marks the folder as unpublished by removing a '.published' file in the 
 
517
    directory (if it exits). It does not change the permissions of the parent 
 
518
    directories.
 
519
 
 
520
    Reads fields: 'path'
 
521
    """
 
522
    paths = fields.getlist('path')
 
523
    if len(paths):
 
524
        paths = map(lambda path: actionpath_to_local(req, path), paths)
 
525
    else:
 
526
        paths = [studpath.url_to_jailpaths(req.path)[2]]
 
527
 
 
528
    try:
 
529
        for path in paths:
 
530
            if os.path.isdir(path):
 
531
                pubfile = os.path.join(path,'.published')
 
532
                if os.path.isfile(pubfile):
 
533
                    os.remove(pubfile)
 
534
            else:
 
535
                raise ActionError("Can only unpublish directories")
 
536
    except OSError, e:
 
537
        raise ActionError("Directory could not be unpublished")
 
538
 
463
539
 
464
540
def action_svnadd(req, fields):
465
541
    """Performs a "svn add" to each file specified.
471
547
 
472
548
    try:
473
549
        svnclient.add(paths, recurse=True, force=True)
474
 
    except pysvn.ClientError:
475
 
        raise ActionError("One or more files could not be added")
 
550
    except pysvn.ClientError, e:
 
551
        raise ActionError(str(e))
 
552
 
 
553
def action_svnremove(req, fields):
 
554
    """Performs a "svn remove" on each file specified.
 
555
 
 
556
    Reads fields: 'path' (multiple)
 
557
    """
 
558
    paths = fields.getlist('path')
 
559
    paths = map(lambda path: actionpath_to_local(req, path), paths)
 
560
 
 
561
    try:
 
562
        svnclient.remove(paths, force=True)
 
563
    except pysvn.ClientError, e:
 
564
        raise ActionError(str(e))
476
565
 
477
566
def action_svnupdate(req, fields):
478
567
    """Performs a "svn update" to each file specified.
486
575
 
487
576
    try:
488
577
        svnclient.update(path, recurse=True)
489
 
    except pysvn.ClientError:
490
 
        raise ActionError("One or more files could not be updated")
 
578
    except pysvn.ClientError, e:
 
579
        raise ActionError(str(e))
 
580
 
 
581
def action_svnresolved(req, fields):
 
582
    """Performs a "svn resolved" to each file specified.
 
583
 
 
584
    Reads fields: 'path'
 
585
    """
 
586
    path = fields.getfirst('path')
 
587
    if path is None:
 
588
        raise ActionError("Required field missing")
 
589
    path = actionpath_to_local(req, path)
 
590
 
 
591
    try:
 
592
        svnclient.resolved(path, recurse=True)
 
593
    except pysvn.ClientError, e:
 
594
        raise ActionError(str(e))
491
595
 
492
596
def action_svnrevert(req, fields):
493
597
    """Performs a "svn revert" to each file specified.
499
603
 
500
604
    try:
501
605
        svnclient.revert(paths, recurse=True)
502
 
    except pysvn.ClientError:
503
 
        raise ActionError("One or more files could not be reverted")
 
606
    except pysvn.ClientError, e:
 
607
        raise ActionError(str(e))
504
608
 
505
609
def action_svnpublish(req, fields):
506
610
    """Sets svn property "ivle:published" on each file specified.
508
612
    anyway).
509
613
 
510
614
    Reads fields: 'path'
 
615
 
 
616
    XXX Currently unused by the client (calls action_publish instead, which
 
617
    has a completely different publishing model).
511
618
    """
512
619
    paths = fields.getlist('path')
513
 
    paths = map(lambda path: actionpath_to_local(req, path), paths)
 
620
    if len(paths):
 
621
        paths = map(lambda path: actionpath_to_local(req, path), paths)
 
622
    else:
 
623
        paths = [studpath.url_to_jailpaths(req.path)[2]]
514
624
 
515
625
    try:
516
626
        for path in paths:
523
633
    """Deletes svn property "ivle:published" on each file specified.
524
634
 
525
635
    Reads fields: 'path'
 
636
 
 
637
    XXX Currently unused by the client (calls action_unpublish instead, which
 
638
    has a completely different publishing model).
526
639
    """
527
640
    paths = fields.getlist('path')
528
641
    paths = map(lambda path: actionpath_to_local(req, path), paths)
530
643
    try:
531
644
        for path in paths:
532
645
            svnclient.propdel("ivle:published", path, recurse=False)
533
 
    except pysvn.ClientError:
 
646
    except pysvn.ClientError, e:
534
647
        raise ActionError("Directory could not be unpublished")
535
648
 
536
649
def action_svncommit(req, fields):
545
658
 
546
659
    try:
547
660
        svnclient.checkin(paths, logmsg, recurse=True)
548
 
    except pysvn.ClientError:
549
 
        raise ActionError("One or more files could not be committed")
 
661
    except pysvn.ClientError, e:
 
662
        raise ActionError(str(e))
 
663
 
 
664
def action_svncheckout(req, fields):
 
665
    """Performs a "svn checkout" of the first path into the second path.
 
666
 
 
667
    Reads fields: 'path'    (multiple)
 
668
    """
 
669
    paths = fields.getlist('path')
 
670
    if len(paths) != 2:
 
671
        raise ActionError("usage: svncheckout url local-path")
 
672
    url = conf.svn_addr + "/" + paths[0]
 
673
    local_path = actionpath_to_local(req, str(paths[1]))
 
674
    try:
 
675
        svnclient.callback_get_login = get_login
 
676
        svnclient.checkout(url, local_path, recurse=True)
 
677
    except pysvn.ClientError, e:
 
678
        raise ActionError(str(e))
 
679
 
 
680
def action_svnrepomkdir(req, fields):
 
681
    """Performs a "svn mkdir" on a path under the IVLE SVN root.
 
682
 
 
683
    Reads fields: 'path'
 
684
    """
 
685
    path = fields.getfirst('path')
 
686
    logmsg = fields.getfirst('logmsg')
 
687
    url = conf.svn_addr + "/" + path
 
688
    try:
 
689
        svnclient.callback_get_login = get_login
 
690
        svnclient.mkdir(url, log_message=logmsg)
 
691
    except pysvn.ClientError, e:
 
692
        raise ActionError(str(e))
 
693
 
 
694
def action_svnrepostat(req, fields):
 
695
    """Discovers whether a path exists in a repo under the IVLE SVN root.
 
696
 
 
697
    Reads fields: 'path'
 
698
    """
 
699
    path = fields.getfirst('path')
 
700
    url = conf.svn_addr + "/" + path
 
701
    svnclient.exception_style = 1 
 
702
 
 
703
    try:
 
704
        svnclient.callback_get_login = get_login
 
705
        svnclient.info2(url)
 
706
    except pysvn.ClientError, e:
 
707
        # Error code 170000 means ENOENT in this revision.
 
708
        if e[1][0][1] == 170000:
 
709
            raise util.IVLEError(404, 'The specified repository path does not exist')
 
710
        else:
 
711
            raise ActionError(str(e[0]))
550
712
 
551
713
# Table of all action functions #
552
714
# Each function has the interface f(req, fields).
553
715
 
554
716
actions_table = {
555
 
    "remove" : action_remove,
 
717
    "delete" : action_delete,
556
718
    "move" : action_move,
 
719
    "mkdir" : action_mkdir,
557
720
    "putfile" : action_putfile,
558
721
    "putfiles" : action_putfiles,
559
 
 
560
 
    "copy" : action_copy,
561
 
    "cut" : action_cut,
562
722
    "paste" : action_paste,
 
723
    "publish" : action_publish,
 
724
    "unpublish" : action_unpublish,
563
725
 
564
726
    "svnadd" : action_svnadd,
 
727
    "svnremove" : action_svnremove,
565
728
    "svnupdate" : action_svnupdate,
 
729
    "svnresolved" : action_svnresolved,
566
730
    "svnrevert" : action_svnrevert,
567
731
    "svnpublish" : action_svnpublish,
568
732
    "svnunpublish" : action_svnunpublish,
569
733
    "svncommit" : action_svncommit,
 
734
    "svncheckout" : action_svncheckout,
 
735
    "svnrepomkdir" : action_svnrepomkdir,
 
736
    "svnrepostat" : action_svnrepostat,
570
737
}