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

« back to all changes in this revision

Viewing changes to setup/util.py

  • Committer: chadnickbok
  • Date: 2009-01-19 22:56:46 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:1170
This commit fixes issue #10 and part of issue #9

There are now two options for moving files with their
svn history intact; svn move and svn copy. These
use the svn commands to move the files, allowing students
to move and rename files without their histories being
lost.

This commit also shows the svn status of a dir, if it is
the 'head' of an svn repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
           'action_symlink', 'action_append', 'action_chown',
38
38
           'action_chown_setuid', 'action_chmod_x', 'action_make_private',
39
39
           'query_user', 'filter_mutate', 'get_svn_revision', 'InstallList',
40
 
           'make_install_path', 'wwwuid']
 
40
           'wwwuid']
41
41
 
42
42
# Determine which Python version (2.4 or 2.5, for example) we are running,
43
43
# and use that as the filename to the Python directory.
311
311
            _, pylist[i] = pylist[i].split(os.sep, 1)
312
312
    return pylist
313
313
 
314
 
def make_install_path(rootdir, path):
315
 
    '''Combine an installation root directory and final install path.
316
 
 
317
 
    Normalises path, and joins it to the end of rootdir, removing the leading
318
 
    / to make it relative if required.
319
 
    '''
320
 
    normpath = os.path.normpath(path)
321
 
    if normpath.startswith(os.sep):
322
 
        normpath = normpath[1:]
323
 
    return os.path.join(rootdir, normpath)
324
 
 
325
314
class InstallList(object):
326
315
    # We build two separate lists, by walking www and console
327
316
    list_www = property(lambda self: build_list_py_files('www'))
342
331
        "services/usrmgt-server",
343
332
        "services/diffservice",
344
333
        "services/svnlogservice",
345
 
        "services/usrmgt-server", # XXX: Should be in bin/
346
334
    ]
347
335
 
348
336
    list_user_binaries = [
354
342
        "bin/ivle-mountallusers",
355
343
        "bin/ivle-remakeuser",
356
344
        "bin/ivle-showenrolment",
357
 
        "bin/ivle-buildjail",
358
345
    ]