Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

hgtk: allow serve command to run outside a repository

But only if --webdir-conf is given as a command line option

Changeset 6a8f95f4f30d

Parent a2c367a7aa10

by Steve Borho

Changes to one file · Browse files at 6a8f95f4f30d Showing diff from parent a2c367a7aa10 Diff from another changeset...

Change 1 of 2 Show Entire File hggtk/​hgtk.py Stacked
 
27
28
29
30
 
31
32
33
 
385
386
387
 
 
 
388
389
390
 
27
28
29
 
30
31
32
33
 
385
386
387
388
389
390
391
392
393
@@ -27,7 +27,7 @@
 from thgutil import version as thgversion    nonrepo_commands = '''userconfig clone debugcomplete init about help -version thgstatus''' +version thgstatus serve'''    # Add TortoiseHg signals, hooked to key accelerators in gtklib  for sig in ('copy-clipboard', 'thg-diff', 'thg-parent', 'thg-rename'): @@ -385,6 +385,9 @@
 def serve(ui, *pats, **opts):   """web server"""   from hggtk.serve import run + if paths.find_root() == None and not opts['webdir_conf']: + raise hglib.RepoError(_("There is no Mercurial repository here" + " (.hg not found)"))   gtkrun(run, ui, *pats, **opts)    def status(ui, *pats, **opts):