large repository access

Franklin Siler fsiler at gmail.com
Wed Oct 16 04:07:38 UTC 2013


On Oct 14, 2013, at 10:34 , "Kastner Masilko, Friedrich" <kastner-masilko at at.festo.com> wrote:

>> From: Franklin Siler [mailto:fsiler at gmail.com]
>> 
>> Similar in some ways, yes, but it's basically doing file tracking on a
>> working copy.  What I'm looking for is a way to access the files stored
>> in a repository without ever checking out a working copy.
> 
> OK, just to be sure now: does the repository reside physically on the same machine you try to access the files with? And do you mean direct access via standard OS file I/O to the contents of a specific file?
> 
> If the first question is answered with yes, IMHO  the most practical way to achieve access to a subset of a working copy is via the file-system as temporary memory. For this there are various ways, with the two proposals (cat and revert) being perhaps the most prominent ones. If the second question is also a clear yes, I think there is a big problem: no standard OS file I/O takes versions into account. Some exotic file systems may do so, but not over standard commands.
> 
> Would it capture your initial idea, if the workflow would be as follows:
> 
> 1. Get a bare repository in e.g. /repos/test, with the only directory there being the .hg folder.
> 2. Via OS infrastructure and driver (be it kernel- or userspace), mount a specific version from /repos/test under e.g. /repos/rev<HASH> with something like the Linux command "mount /repos/test /repos/rev10 -t hgfs -o revision=<HASH>".
> 3. Every file I/O to a path under /repos/rev<HASH> will directly access the appropriate file/directory in the repository /repos/test at revision <HASH>.

Very close.  I'd propose instead a use case as something like:
% cd hgdir
% ls .* *
.hg
% hgfuse -r tip
% ls
currentfile.txt    test.txt
% cat "blah" > test2.txt
cat: Read-only file system
% hgfuse -r 4
hgfuse: had mounted tip, now mounting revision 4
% ls
currentfile.txt    test.txt     filethatgetsdeletedlater

Does that make sense?

> 4. While for read operations this might be easy, for write an implicit commit would have to be done (at least on a sync). If the later is too hard to do, simply make the mount an implicit read-only.

To start, I want to get reads working.  I think commits could be implemented relatively easily by creating the equivalent of a union filesystem to store changes, then committing those.

> 
>> From: Franklin Siler [mailto:fsiler at gmail.com]
>> 
>> it seems like a possibility; are you aware of any fixed file size
>> limits or anything like that?  A quick search of Bugzilla didn't reveal
>> anything directly on point.
> 
> http://mercurial.selenic.com/wiki/HandlingLargeFiles

I'm very familiar with this page; was wondering more about particularities of hgweb.  None of the files in this case are anywhere near 2GB, but the entire repo is 140212M.

Cheers,

Frank Siler
Siler Industrial Analytics
314.799.9405




More information about the Mercurial mailing list