~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to serve-branches

  • Committer: Martin Albisetti
  • Date: 2008-09-16 20:12:28 UTC
  • mfrom: (221 trunk)
  • mto: This revision was merged to the branch mainline in revision 233.
  • Revision ID: argentina@gmail.com-20080916201228-gxia35tdila945wu
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
from loggerhead import __version__
29
29
from loggerhead.apps.filesystem import (
30
30
    BranchesFromFileSystemRoot, UserBranchesFromFileSystemRoot)
 
31
from loggerhead.util import Reloader
31
32
 
32
33
 
33
34
def command_line_parser():
46
47
                      help="Host Loggerhead should listen on.")
47
48
    parser.add_option("--prefix", dest="user_prefix",
48
49
                      help="Specify host prefix.")
 
50
    parser.add_option("--reload", action="store_true", dest="reload",
 
51
                      help="Restarts the application when changing python"
 
52
                           " files. Only used for development purposes.")
49
53
    parser.add_option("--version", action="store_true", dest="show_version",
50
54
                      help="Print the software version and exit")
51
55
    return parser
77
81
    if options.trunk_dir and not options.user_dirs:
78
82
        print "--trunk-dir is only valid with --user-dirs"
79
83
        sys.exit(1)
 
84
        
 
85
    if options.reload:
 
86
        if Reloader.is_installed():
 
87
            Reloader.install()
 
88
        else:
 
89
            return Reloader.restart_with_reloader()
80
90
 
81
91
    if options.user_dirs:
82
92
        if not options.trunk_dir: