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

« back to all changes in this revision

Viewing changes to ivle/fileservice_lib/action.py

  • Committer: Matt Giuca
  • Date: 2010-02-23 05:27:07 UTC
  • Revision ID: matt.giuca@gmail.com-20100223052707-3a76wo23r2z503t8
browser.js: Adjusted condition for enabling "Commit" action; now allowed if
    no files are selected AND current directory is versioned (as well as if
    all selected files are versioned). Committing with 0 files selected will
    commit the current directory.
ivle.fileservice_lib.action: Fixed to allow commit to contain 0 paths. This
    will commit the current directory instead.
This fixes Launchpad bug #526161.

Show diffs side-by-side

added added

removed removed

Lines of Context:
653
653
    Reads fields: 'path' (multiple), 'logmsg' (optional)
654
654
    """
655
655
    paths = fields.getlist('path')
656
 
    paths = map(lambda path: actionpath_to_local(req, path).decode('utf-8'),
657
 
                paths)
 
656
    if len(paths):
 
657
        paths = map(lambda path:actionpath_to_local(req,path).decode('utf-8'),
 
658
                    paths)
 
659
    else:
 
660
        paths = [studpath.to_home_path(req.path).decode('utf-8')]
658
661
    logmsg = str(fields.getfirst('logmsg',
659
662
                 DEFAULT_LOGMESSAGE)).decode('utf-8')
660
663
    if logmsg == '': logmsg = DEFAULT_LOGMESSAGE