information about this package can be found in the README. here is a html-version of the README:
hg/fs can be used (reads repositories). the other tools, that write to the repository, are not yet safe to use.
hgfs serves the contents of a mercurial repository over styx. see the manual page hgfs(4) for more details. the code for parsing the mercurial repositories is in a separate library (though undocumented), and there are a few more small programs that read various information from the repositories (also undocumented).
first, make sure you have "util", "http", "filtertool", "web" installed.
change mkconfig if you do not have $ROOT set. create the directory $ROOT/dis/hg. now "mk install" to compile and install the files.
when building from within inferno, insert SYSHOST=Inferno and ROOT= in the mk invocations to override the values in the mkconfig.
the latest version can be found at:
http://www.ueber.net/code/r/hgfs
all files are in the public domain. this code has been written by mechiel lukkien, reachable at mechiel@ueber.net or mechiel@xs4all.nl.
hg/update: for local modifications (as returned by hg/status), only refuse to update if their state is actually different from that in new revision. i.e. for "add", don't complain if new revision has that file and it has the same contents. for "remove", don't complain if new revision has that file removed. for "update", check if new revision has same data for file.
for dirstate, handle needmerge more like modified? i.e. verify that it really changed, especially during commit.
hg/diff: allow only a single revision on command-line too. should be easy with a sort & uniq on output from hg/status & hg/manifestdiff combined.
hg/verify: verify that list of modified files in changelog entry matches with the files changed in the manifest.
read up on all the formats. dirstate, undo.dirstate undo.branch (for rollback), journal.dirstate, journal.branch, wlock; lock, journal, fncache, etc.; http://mercurial.selenic.com/wiki/FileFormats
hg/fs: fix (revert) sizes of files in hg/fs when they have meta-data (cannot use entry.uncsize for that reason, i forgot).
library: think about caching of revlogs per repo, caching of entries in repo's and perhaps try reading less to become up to date.
hg/fs: "default" in the listings is ugly. it would make sense to name "default-tip" just "tip", but that's confusing with standard mercurial practice. better solution?
more cpu & memory efficient:
currently a big repository uses too much memory and is slow. e.g. the inferno-os hg tree. the manifest uses lots of memory. perhaps hg/fs shouldn't create a Revtree in memory, but fulfil readdirs/walks from the manifest file on the fly. i think the paths in the manifest are sorted. so we can do a binary search for the current path. then it's a matter of returning a proper qid. with current gens (increase with each path), we would need to do some trick (some offsets with known gens) to start counting from.
perhaps we should cache Group's for revlog's? seems more useful than storing raw delta's. does require one base in memory...
see how memory usage of list of int vs array of int compare. might be part of the high mem usage for hgfs File's.
do we keep Manifest & Manifestfile in memory? perhaps we can do without and save memory.
should not have fixed number of rev's cached data, but one base+delta's? or perhaps not the base as it's pretty big (half the size of the delta's i think) and can be read quickly?
in hgwire, when making changegroup with changes with big manifests, it will help to only look at manifest changes. now we process all path+nodeid's in the whole manifest. all unchanged path+nodeid's don't even need looking at. if we can make sequential manifest fetching faster that would help as well.
real fncache support. have to figure out why the fncache file exists (not sure why repo files are listed, they can be derived and you normally don't need this). windows special files may be more useful to escape.
to clone & pull:
hg clone http://www.ueber.net/hgsrv/hgfs/
hg clone static-http://www.ueber.net/who/mjl/hg/hgfs/
download a snapshot of the latest version: hgfs-76.tgz.
the files in the latest revision can be found at /hg/hgfs/files/tip/. a specific revision can be access by replacing "tip" with the revision number, (partial) nodeid or tag name. a few direct links to useful files in the latest revision:
| rev | nodeid | when | diff | why |
|---|---|---|---|---|
| 76 | 3350c055cd4c | 2 years | diff | improve/fix path handling. ... |
| 75 | 6abb99fabd02 | 2 years | diff | varous small improvements & fixes. ... |
| 74 | dd584403065d | 2 years | diff | various. ... |
| 73 | 1ccd756c3d81 | 2 years | diff | hg/update: update to branch head when no args specified, refuse up... |
| 72 | 1e0449bfea93 | 2 years | diff | calculate diffs. ... |
| 71 | e771a84d3ad6 | 2 years | diff | many small changes & fixes. ... |
| 70 | edcff3d51320 | 2 years | diff | implement the ssh wire protocol. ... |
| 69 | ccafbafafe9d | 2 years | diff | move code for "streaming in" changes from hg/pull to library. ... |
| 68 | f64ee3ac0f9a | 2 years | diff | many changes ... |
| 67 | ad75df000c02 | 2 years | diff | more fixes for hg/pull. rename hg/remove to hg/rm, various others. ... |
| 66 | cf86de950326 | 2 years | diff | add hg/diff & hg/manifestdiff. add directory "manifestfull" to hg... |
| 65 | 3661d065cbec | 2 years | diff | improve usage of dirstate. ... |
| 64 | a77328a950f4 | 2 years | diff | remove redundant functions from library adts. improve tag handling. ... |
| 63 | ddf4a6a9b65e | 2 years | diff | small improvements. ... |
| 62 | ef65033fb7a4 | 2 years | diff | make hg/pull do something useful. ... |
| 61 | c3eeed01758b | 2 years | diff | lots of changes. first very rough tools for creating/cloning/comm... |
| 60 | 4978e1f9b8ff | 2 years | diff | give mercurial lib's Repo and Revlog functions that do not return ... |
| 59 | 3c9b33dc8fa4 | 2 years | diff | some cleanup. |
| 58 | 1e67e12f5063 | 2 years | diff | welcome hg/update and hg/identify. update hg/status. and other c... |
| 57 | 3bd78d6b8635 | 2 years | diff | add another file tree to hg/fs: for each tracked file in the repo... |
| 56 | e8ff4d939b20 | 2 years | diff | change synopsis from "X" to "mount {X} mtpt". |