(Arne Babenhauserheide)
2012-06-24: hg push now recognizes --name, --screenstyle and --printstyle hg push now recognizes --name, --screenstyle and --printstyle Also: Fix: No longer spouts out ui, repo and path on every run.
diff --git a/staticsite.py b/staticsite.py --- a/staticsite.py +++ b/staticsite.py @@ -723,7 +723,6 @@ wrapcmds = { # cmd: generic, target, fix # explicitely wrap commands in case the remote repo is an FTP repo. def ftppush(orig, *args, **opts): - print args, opts ui, repo, path = args # only act differently, if the target is an FTP repo. if not path.startswith("ftp"): @@ -731,16 +730,17 @@ def ftppush(orig, *args, **opts): # first create the site at ._site target = "._site" ftpstring = path.replace("ftp://", "") - if not "name" in opts: - opts["name"] = None - opts["screenstyle"] = "" - opts["printstyle"] = "" - opts["upload"] = ftpstring - opts["force"] = False + # fix the options to fit those of the site command + opts["name"] = opts["sitetitle"] + opts["upload"] = ftpstring staticsite(ui, repo, target, **opts) # really wrap the command +siteopts = [('', 'sitetitle', "", 'staticsite: the title of the site. Default: folder or last segment of the repo-path.'), + ('', 'screenstyle', "", 'use a custom stylesheet for display on screen'), + ('', 'printstyle', "", 'use a custom stylesheet for printing')] entry = extensions.wrapcommand(commands.table, "push", ftppush) +entry[1].extend(siteopts) # Starting an FTP repo. Not yet used, except for throwing errors for missing commands and faking the lock.