http - Mercurial file protocol -
does mercurial have http protocol browse files/folders/branches instead of clone/pull changesets?
i've seen using tortoisehg webserver , access http://localhost:8080/ using browser different html served when use project on https://bitbucket.org/ (at least not find same representation).
update httpcommandprotocol document describes changesets not files/folders. so, task download few files particular revision (for example tip 'stable') , list of files. not want download complete repository this.
non http protocols welcome conditions same: not download complete repository.
update 2 hgweb serves static html , files. same html fromat different hgweb versions? bitbucket.org? there common protocol?
as noticed already, httpcommandprotocol defines exchange of repository information , changesets - ensures can clone/push/pull from/to repo served http. afaik there's no standard how browse repo (e.g. getting single file of revision).
you'll have adapt whatever url scheme hosting system of choice uses (as noticed, hgweb , bitbucket have different schemes). depending on use case define own file access protocol , feed converter.
for instance might want access files scheme:
<repo-url>/<rev>/<path>
where <repo-url>
url use clone/push/pull. in practice use urls that:
https://bitbucket.org/user/repo/<rev>/<path> https://hgwebhost.org/.../repo/<rev>/<path>
obviously these virtual urls not exist. that's converter comes in: check hosting system type , convert urls accordingly:
https://bitbucket.org/user/repo/raw/<rev>/<path> https://hgwebhost.org/.../repo/raw-file/<rev>/<path>
if converter knows bitbucket , hgweb, works deal of repositories out there.
Comments
Post a Comment