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

« back to all changes in this revision

Viewing changes to www/apps/fileservice/listing.py

  • Committer: mattgiuca
  • Date: 2008-01-22 22:28:27 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:266
Added Publishing feature. This feature is complete except it currently isn't
available in the JavaScript interface.

fileservice: Added new JSON property "published", for each file under revision
control. Added new actions svnpublish and svnunpublish.
common/studpath: Added "published" function (to check if a file is published),
and "authorize_public" to authorize in public mode.
server: Now calls studpath.authorize_public for public mode (instead of just
authorizing everything).

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
#   - incomplete - a directory doesn't contain a complete entries list
61
61
#   (From pysvn)
62
62
#   If svnstatus is "Missing" then the file has no other attributes.
 
63
#   * published: Boolean. True if the file has ivle:published property in
 
64
#   Subversion.
63
65
#   * isdir: Boolean. True if the file is a directory. Always present unless
64
66
#   svnstatus is "missing".
65
67
#   * size: Number. Size of the file in bytes. Present for non-directory
263
265
        d["mtime"] = file_stat.st_mtime
264
266
        d["mtime_nice"] = make_date_nice(file_stat.st_mtime)
265
267
        d["mtime_short"] = make_date_nice_short(file_stat.st_mtime)
 
268
        d["published"] = studpath.published(fullpath)
266
269
    except OSError:
267
270
        # Here if, eg, the file is missing.
268
271
        # Can't get any more information so just return d