(Arne Babenhauserheide)
2014-03-14: merge changes from kav. merge changes from kav.
diff --git a/.bugs/bugs b/.bugs/bugs --- a/.bugs/bugs +++ b/.bugs/bugs @@ -34,6 +34,7 @@ clone/<pathname>/ → incoming log (comm only write bug files if their content differs from the content on disk to avoid reuploading them without need | owner:, open:False, id:c7b2cf5fdbc68160530a08e1d651c23a1f49fc01, time:1365865229.49 incoming commits have no diffstat | owner:, open:True, id:cf36e24ae03073dd92827cbd151e3ca0a6d1dd52, time:1365872088.99 no longer create raw files, since they can’t be served by all webservers and waste bandwidth and space (they are no longer linked anyway). | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:d1010e1933648f65af37d969bfb45f8d834fc8bb, time:1319148721.49 +breaks on inaccessible forks | owner:, open:True, id:e2126b8705a1f08d3cac6d4d0738272756ae957c, time:1392022327.75 add a footer which links back to hgsite | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:ed55d92709329e81b8d619c4d2a9aa97361fefd8, time:1365863559.31 check the hgweb templating for parsing the site. | owner:Arne Babenhauserheide <bab@draketo.de>, open:True, id:ef17f01dbe8ee58536fa8b345eb18d1efc639f15, time:1319208643.38 maybe more advanced bookmarks pushing. | owner:Arne Babenhauserheide <bab@draketo.de>, open:True, id:ef8c12bfcc99686efc1f685a9be0be0c78922ca5, time:1322115049.48 diff --git a/README.txt b/README.txt --- a/README.txt +++ b/README.txt @@ -6,14 +6,54 @@ Get it via `hg clone http://draketo.de/p With hg site you can say goodbye to vendor lock-in. -Description ------------ +Mission Statement +----------------- -The goal of hg site is sharing code over commodity servers which only -offer FTP access and statically served files, while providing the same -information as hg serve and full solutions like bitbucket and -gitorious (naturally without the interactivity, but you can always -clone the repo to interact). +The goal of hg site is to enable convenient sharing of code over +commodity servers which only offer FTP access and statically served +files, while providing the same information as hg serve and full +solutions like bitbucket and gitorious (naturally without the +interactivity, but you can always clone the repo to interact). + + +Installation +------------ + +* Clone this repo. + `hg clone http://draketo.de/proj/hgsite/` +* add this to the `[extensions]` section in your `~/.hgrc` + `site = path/to/staticsite.py` + if you have no such section, just add a line with content `[extensions]`. The extensions-section is below that line. + + +Usage +----- + +Create and Upload your Site: `hg push [-f] --sitename "sitename" ftps://user:password@ftp.host.tld/path/to/dir` + +That’s how this site gets created. With -f it is reuploaded +completely, otherwise only the changes get uploaded. + +If you want to make this more convenient, add the following path and alias to your .hg/hgrc: + + [paths] + ftp = ftps://user:password@ftp.host.tld/path/to/dir + [alias] + pushsite = push --sitename "sitename" ftp + +Then just use `hg pushsite` to upload. + + +Features +-------- + +- shows the history, branches, tags and bookmarks. +- shows bugs tracked via the [b-extension][]. +- shows the readme. +- shows forks which are defined as paths in `.hg/hgrc` - from any source hg supports. +- uploads only hanged files (based on the time they were last modified), so uploads can be reasonably fast. +- Supports FTP and FTPS. Use the latter if you can (just use URLs starting with `ftps://`). +- static site (no vulnerabilities, little dependencies, high performance). Thanks to the static http support of [Mercurial][], the clone and browse URLs are the same, so you can look at the site with your webbrowser or @@ -26,56 +66,9 @@ tracks repositories from any source for incoming and outgoing changes. And since the bugtracking happens via the b-extension, your bugtracking follows your code wherever you go. - -Features --------- - -- shows the history, branches, tags and bookmarks. -- shows bugs tracked via the [b-extension][]. -- shows the readme. -- shows forks which are defined as paths in `.hg/hgrc` - from any source hg supports. -- uploads only changed files (based on the time they were last modified), so uploads can be reasonably fast. -- Supports FTP and FTPS. Use the latter if you can (just use URLs starting with `ftps://`). -- static site (no vulnerabilities, little dependencies, high performance). - [b-extension]: http://mercurial.selenic.com/wiki/bExtension "Distributed Bug Tracking: Get bugs resolved, not organized" -Installation ------------- - -* Clone this repo. - hg clone http://draketo.de/proj/hgsite/ -* add this to the [extensions] section in your ~/.hgrc - site = path/to/staticsite.py - if you have no [extensions] section, add it. - - -Usage ------ - - $ hg push [-f] --sitename "sitename" ftps://user:password@ftp.host.tld/path/to/dir - -→ that’s how this site gets created. - With -f it is reuploaded completely, - otherwise only the changes get uploaded. - defining the ftp://… or ftps://… in [paths] in .hg/hgrc works. - -If you want to make this easier, add an alias to your .hg/hgrc: - - [paths] - ftp = ftps://user:password@ftp.host.tld/path/to/dir - [alias] - pushsite = push --sitename "sitename" ftp - -Then just use `hg pushsite` to upload. - -To upload the site when you push it anywhere, you can use a hook in .hg/hgrc. This is what I use: - - [hooks] - post-push = hg site -n site -u user:password@ftp.host.tld/path/to/dir - - Basic Options ------------- @@ -103,7 +96,7 @@ Basic Options Customization ------------- -To change the appearance of your site, create it once and then copy style.css and print.css from `._site/`. Adapt them and use -s path/to/your/screen.css and -p path/to/your/print.css to use your adaptions. +To change the appearance of your site, create it once and then copy style.css and print.css from `._site/`. Adapt them and use `-s path/to/your/screen.css` and `-p path/to/your/print.css` to use your adaptions. diff --git a/staticsite.py b/staticsite.py --- a/staticsite.py +++ b/staticsite.py @@ -1690,7 +1690,9 @@ class FTPRepository(peerrepository): def findoutgoing(self, remote, base=None, heads=None, force=False): raise util.Abort('command findoutgoing unavailable for FTP repositories') - + + def _capabilities(self): + return self.capabilities class FTPRepoContainer(object): def __init__(self):