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

« back to all changes in this revision

Viewing changes to lib/fileservice_lib/listing.py

  • Committer: drtomc
  • Date: 2008-03-06 23:45:47 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:666
fileservice: By default, don't show .files in listings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
# Make a Subversion client object
115
115
svnclient = pysvn.Client()
116
116
 
 
117
# Whether or not to ignore dot files.
 
118
# TODO check settings!
 
119
ignore_dot_files = True
 
120
 
117
121
# For time calculations
118
122
seconds_per_day = 86400 # 60 * 60 * 24
119
123
if time.daylight:
238
242
        mtime = os.path.getmtime(path)
239
243
        listing["."] = file_to_fileinfo(path, "")
240
244
 
 
245
    if ignore_dot_files:
 
246
        for fn in listing.keys():
 
247
            if fn != "." and fn.startswith("."):
 
248
                del listing[fn]
 
249
 
241
250
    # Listing is a nested object inside the top-level JSON.
242
251
    listing = {"listing" : listing}
243
252