Re: [fossil-users] libfossil + fuse

2014-06-15 Thread Sergei Gavrikov
On Fri, 13 Jun 2014, Richard Hipp wrote:

 This appears to be working now on trunk.  Get the latest code.  Rerun
 ./configure and recompile (on a Linux system with FuseFS support -
 Ubuntu 13.10 works for me after apt-get install fuse).  Then:

  fossil fusefs /tmp/myrepo

 Then you can access files using things like:

  ls /tmp/myrepo/checkins/4bf670e61250

 The 4bf670e61250 part can be replaced by any valid check-in name. 
 See http://www.fossil-scm.org/fossil/doc/tip/www/checkin_names.wiki
 for a discussion of what constitutes a valid check-in name.
  
Thanks for nice Fossil FS! I found one strange thing. One my Fossil
repository has two directories, rootfs and rootfs-earth. After
fossil fuse mount `ls' could not find rootfs directory, but found
rootfs-earth

  % ls /tmp/fusefs/checkins/trunk
  ls: cannot access /tmp/fusefs/checkins/trunk/rootfs: No such file or directory

I found nothing special in my rootfs and I though that rootfs-earth
someway shadows it. The next test canvas does demo the issue, though I do
not known where is the bug, in fuse or fossil. Test on new repo

touch foo;f add foo;f ci -m add foo
touch foo-bar;f add foo-bar;f ci -m add foo-bar
mkdir bar;touch bar/.stick;f add --dotfiles bar;f ci -m add bar
mkdir bar-baz;touch bar-baz/.stick;f add --dotfiles bar-baz; f ci -m add 
bar-baz

Now there are foo, foo-bar files, and bar, bar-baz directories

  % f ls
  bar-baz/.stick
  bar/.stick
  foo
  foo-bar

Expected. Now

  % f fusefs /tmp/fusefs

And

  % ls /tmp/fusefs/checkins/trunk
  ls: cannot access /tmp/fusefs/checkins/trunk/bar: No such file or directory
  bar  bar-baz  foo

  % tree /tmp/fusefs/checkins/trunk
  /tmp/fusefs/checkins/trunk
  |-- bar-baz
  `-- foo

  1 directory, 1 file

  % ls -la  /tmp/fusefs/checkins/trunk
  ls: cannot access /tmp/fusefs/checkins/trunk/bar: No such file or directory
  total 0
  dr-xr-xr-x 2 sg sg 0 1970-01-01 03:00 .
  d--x--x--x 2 sg sg 0 1970-01-01 03:00 ..
  ?? ? ?  ?  ?? bar
  dr-xr-xr-x 2 sg sg 0 2014-06-15 16:07 bar-baz
  -r--r--r-- 1 sg sg 0 2014-06-15 16:07 foo

Can anyone reproduce this?

  % f version
  This is fossil version 1.29 [6b15019765] 2014-06-14 16:19:30 UTC

Thanks for your time.

Sergei___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] libfossil + fuse

2014-06-15 Thread Thomas Schnurrenberger

On 15.06.2014 15:45, Sergei Gavrikov wrote:

 touch foo;f add foo;f ci -m add foo
 touch foo-bar;f add foo-bar;f ci -m add foo-bar
 mkdir bar;touch bar/.stick;f add --dotfiles bar;f ci -m add bar
 mkdir bar-baz;touch bar-baz/.stick;f add --dotfiles bar-baz; f ci -m 
add bar-baz


 Now there are foo, foo-bar files, and bar, bar-baz directories

% f ls
bar-baz/.stick
bar/.stick
foo
foo-bar

 Expected. Now

% f fusefs /tmp/fusefs

 And

% ls /tmp/fusefs/checkins/trunk
ls: cannot access /tmp/fusefs/checkins/trunk/bar: No such file or 
directory

bar  bar-baz  foo

% tree /tmp/fusefs/checkins/trunk
/tmp/fusefs/checkins/trunk
|-- bar-baz
`-- foo

1 directory, 1 file

% ls -la  /tmp/fusefs/checkins/trunk
ls: cannot access /tmp/fusefs/checkins/trunk/bar: No such file or 
directory

total 0
dr-xr-xr-x 2 sg sg 0 1970-01-01 03:00 .
d--x--x--x 2 sg sg 0 1970-01-01 03:00 ..
?? ? ?  ?  ?? bar
dr-xr-xr-x 2 sg sg 0 2014-06-15 16:07 bar-baz
-r--r--r-- 1 sg sg 0 2014-06-15 16:07 foo

 Can anyone reproduce this?

I can reproduce this on lubuntu 14.04 LTS with Fossil compiled from trunk.

--
tsbg

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] libfossil + fuse

2014-06-15 Thread Sergei Gavrikov
On Sun, 15 Jun 2014, Thomas Schnurrenberger wrote:

 I can reproduce this on lubuntu 14.04 LTS with Fossil compiled from trunk.

Thanks. Mine 10.04. More precision test case

 % for i in a ab abc abcd;do touch $i; f add $i; f ci -m add $i; sleep 1; done
 % for i in a ab abc abcd;do touch subdir/$i; f add subdir/$i; f ci -m add 
subdir/$i; sleep 1; done

Expected

 % f ls
 a
 ab
 abc
 abcd
 subdir/a
 subdir/ab
 subdir/abc
 subdir/abcd

But

 % tree /tmp/fusefs/checkins/trunk
 /tmp/fusefs/checkins/trunk
 |-- a
 `-- subdir
 |-- a
 |-- ab
 |-- abc
 `-- abcd

It seems there is the issue in Fossil fuse readdir for root items only.

Sergei

On Sun, 15 Jun 2014, Thomas Schnurrenberger wrote:

 On 15.06.2014 15:45, Sergei Gavrikov wrote:
 
  touch foo;f add foo;f ci -m add foo
  touch foo-bar;f add foo-bar;f ci -m add foo-bar
  mkdir bar;touch bar/.stick;f add --dotfiles bar;f ci -m add bar
  mkdir bar-baz;touch bar-baz/.stick;f add --dotfiles bar-baz; f ci -m add
 bar-baz
 
  Now there are foo, foo-bar files, and bar, bar-baz directories
 
 % f ls
 bar-baz/.stick
 bar/.stick
 foo
 foo-bar
 
  Expected. Now
 
 % f fusefs /tmp/fusefs
 
  And
 
 % ls /tmp/fusefs/checkins/trunk
 ls: cannot access /tmp/fusefs/checkins/trunk/bar: No such file or
 directory
 bar  bar-baz  foo
 
 % tree /tmp/fusefs/checkins/trunk
 /tmp/fusefs/checkins/trunk
 |-- bar-baz
 `-- foo
 
 1 directory, 1 file
 
 % ls -la  /tmp/fusefs/checkins/trunk
 ls: cannot access /tmp/fusefs/checkins/trunk/bar: No such file or
 directory
 total 0
 dr-xr-xr-x 2 sg sg 0 1970-01-01 03:00 .
 d--x--x--x 2 sg sg 0 1970-01-01 03:00 ..
 ?? ? ?  ?  ?? bar
 dr-xr-xr-x 2 sg sg 0 2014-06-15 16:07 bar-baz
 -r--r--r-- 1 sg sg 0 2014-06-15 16:07 foo
 
  Can anyone reproduce this?
 
 I can reproduce this on lubuntu 14.04 LTS with Fossil compiled from trunk.

 --
 tsbg

 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] libfossil + fuse

2014-06-15 Thread Richard Hipp
On Sun, Jun 15, 2014 at 9:45 AM, Sergei Gavrikov sergei.gavri...@gmail.com
wrote:


 Thanks for nice Fossil FS! I found one strange thing. One my Fossil
 repository has two directories, rootfs and rootfs-earth. After
 fossil fuse mount `ls' could not find rootfs directory,


Should be fixed now.  Please try again with the latest trunk version of
Fossil.


-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] libfossil + fuse

2014-06-15 Thread Sergei Gavrikov
The issue went away. Thanks!

Sergei

On Sun, 15 Jun 2014, Richard Hipp wrote:

 On Sun, Jun 15, 2014 at 9:45 AM, Sergei Gavrikov sergei.gavri...@gmail.com
 wrote:

 Thanks for nice Fossil FS! I found one strange thing. One my Fossil
 repository has two directories, rootfs and rootfs-earth. After
 fossil fuse mount `ls' could not find rootfs directory,


 Should be fixed now.  Please try again with the latest trunk version of
 Fossil.
  

 --
 D. Richard Hipp
 d...@sqlite.org

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] libfossil + fuse

2014-06-14 Thread Stephan Beal
On Sat, Jun 14, 2014 at 5:23 AM, Richard Hipp d...@sqlite.org wrote:

 This appears to be working now on trunk.  Get the latest code.  Rerun
 ./configure and recompile (on a Linux system with FuseFS support - Ubuntu
 13.10 works for me after apt-get install fuse).  Then:


:-D

[odroid@host:~/fossil/cwal]$ uname -a
Linux odroid 3.8.13.16 #1 SMP PREEMPT Tue Feb 11 10:47:21 BRST 2014 armv7l
armv7l armv7l GNU/Linux


 fossil fusefs /tmp/myrepo


Tip: doesn't seem to work (shows an empty dir) if the mount point is itself
on an external mount point. e.g. doesn't work when i mount under /home, as
home is an external usb drive here.



 Then you can access files using things like:

  ls /tmp/myrepo/checkins/4bf670e61250


[odroid@host:~/fossil/cwal]$ f fusefs /tmp/fuse
...

[odroid@host:~/tmp/fuse]$ ls /tmp/fuse/
checkins
[odroid@host:~/tmp/fuse]$ ls /tmp/fuse/checkins/trunk
common.make  config.make  cwal.c  cwal_format.c  cwal_internal.h
 cwal_json.c  cwal_printf.c  cwal_utf.c  doc  include JSON_parser  Makefile
 s2  test.c  th1ish  vgLastFewVersions.sh
[odroid@host:~/tmp/fuse]$ ls -la /tmp/fuse/checkins/trunk
total 0
dr-xr-xr-x 2 odroid odroid  0 Jan  1  1970 .
d--x--x--x 2 odroid odroid  0 Jan  1  1970 ..
-r--r--r-- 1 odroid odroid  11365 Jun 14 01:54 common.make
-r--r--r-- 1 odroid odroid   3505 Jun 14 01:54 config.make
-r--r--r-- 1 odroid odroid 335400 Jun 14 01:54 cwal.c
-r--r--r-- 1 odroid odroid  24902 Jun 14 01:54 cwal_format.c
-r--r--r-- 1 odroid odroid  40414 Jun 14 01:54 cwal_internal.h
-r--r--r-- 1 odroid odroid  30819 Jun 14 01:54 cwal_json.c
-r--r--r-- 1 odroid odroid  46808 Jun 14 01:54 cwal_printf.c
-r--r--r-- 1 odroid odroid  73668 Jun 14 01:54 cwal_utf.c
dr-xr-xr-x 2 odroid odroid  0 Jun 14 01:54 doc
dr-xr-xr-x 2 odroid odroid  0 Jun 14 01:54 include
dr-xr-xr-x 2 odroid odroid  0 Jun 14 01:54 JSON_parser
-r--r--r-- 1 odroid odroid   2680 Jun 14 01:54 Makefile
dr-xr-xr-x 2 odroid odroid  0 Jun 14 01:54 s2
-r--r--r-- 1 odroid odroid  41761 Jun 14 01:54 test.c
dr-xr-xr-x 2 odroid odroid  0 Jun 14 01:54 th1ish
-r-xr-xr-x 1 odroid odroid   2059 Jun 14 01:54 vgLastFewVersions.sh

:-D



-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do. -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] libfossil + fuse

2014-06-14 Thread Andy Bradford
Thus said Richard Hipp on Fri, 13 Jun 2014 23:23:10 -0400:

 This appears  to be working now  on trunk. Get the  latest code. Rerun
 ./configure and recompile  (on a Linux system with  FuseFS support -
 Ubuntu 13.10 works for me after apt-get install fuse). Then:

Nice work!  It almost works on OpenBSD (5.5) too:

$ fossil fuse /tmp/fused
$ ls /tmp/fused/
checkins
$ ls /tmp/fused/checkins/
ls: /tmp/fused/checkins/: Permission denied
$ ls -l /tmp/fused 
total 4
d--x--x--x  2 amb  amb  0 Dec 31  1969 checkins

This is the first time I've used fuse for anything, so I'm not sure what
might be wrong here---it might just  be the OS (fusefs is relatively new
in  OpenBSD). Does  Fossil have  to explicitly  set the  permissions and
timestamps on the files and directories?

Andy
-- 
TAI64 timestamp: 4000539c8282


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] libfossil + fuse

2014-06-14 Thread Andy Bradford
Thus said Richard Hipp on Sat, 14 Jun 2014 13:14:10 -0400:

 That is correct behavior. You cannot list the /checkins/ folder.

As I discovered after I read the ``fossil help fuse'' document.

 I'm probably not setting an mtime on the checkins folder either.

The both the mount point and the checkins folder are missing mtime.

What time would make sense on the mount point? Perhaps the time that the
fossil  fuse command  was issued?  What about  the checkins  folder? The
current time? Does it make sense to set atime/ctime?

Thanks,

Andy
-- 
TAI64 timestamp: 4000539c8cfd


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] libfossil + fuse

2014-04-24 Thread Stephan Beal
On Thu, Apr 24, 2014 at 9:47 PM, Andy Goth andrew.m.g...@gmail.com wrote:

 I'd like something similar with Fossil, though completion of libfossil is
 an obvious prerequisite.  Putting libfossil and fuse together could be the
 way to go.


Feel free to come help out - as a registered Fossil dev you've already got
the licensing prerequisite :).


 Of course, it would also be necessary to devise a mapping between
 filesystem names and Fossil.  ClearCase's method of naming versions fits
 the Unix filesystem reasonably well, but Fossil deviates significantly, and
 for good reason.  I'm not saying it's impossible, only that it will take
 some thought.


/doc/BRANCH/path provides a convention? Where BRANCH can be a version
name/UUID.

Clearly, one way to go (can certainly support multiple simultaneously)
 would be to let artifact IDs, or unambiguous prefixes thereof, map to the
 artifacts.  Whether this is only valid for checked-in files or also for
 stuff like events and wiki and tickets, that's an open question, as is what
 you get when you readdir().  The top level of the repository directory
 should probably contain subdirectories indicating the naming mechanism used
 within, for instance /repo/artifact/01234567 is how you get artifact with
 prefix 01234567 from the repository mounted at /repo.


For this purpose it would probably be useful/speedier to calculate the
top-most paths in advance (the known branch names).


 Ambiguous prefixes probably shouldn't be treated as nonexistent files,
 since nonexistent files ought only to mean there's zero artifacts with that
 prefix.  Instead maybe make them directories containing all the artifacts
 with the prefix.


Once you know the version you want to traverse, you can get the list of all
dirs in that version, and provide a tree based on that. IIRC that list
currently has to be collected in C code, but only because i have not yet
found a query which can do it in one go (maybe a recursive query can do the
equivalent of reading in the list of all files for any given version based
on the mlink table?).


 How should different artifact types be distinguished?  More directory
 hierarchy, I'd imagine.


i wouldn't support anything but files, at least initially. Wikis are
probably simple: wiki:/Name/version (maybe the version should go after
files, too, and assume the tip of the branch: BRANCH/filename[/version]?).
Tickets... maybe ticket:/reportName/[list of entries] ???



  And where would the metadata go?  I dunno.


It could be cached in the repo db. Fossil, when rebuilding, ignores tables
named fx_* for such extensions purposes. They don't get synced (once we
have proof-of-concept extensions, maybe we can extend sync support to
optionally sync extension tables which follow certain conventions (TBD)).

, though perhaps there are better ways to go such as making the contents of
 the file be yet another kind of metadata.  Or we just draw the line and say
 that only file data is exposed.


i would suggest that initially, but plan for a path convention which
supports extension, e.g. a URL: file:, wiki:, ticket:, event:, user:,
timeline:,...


 I should hope knowing the artifact IDs isn't the only way to get around.
  Perhaps also have /repo/commit/VERSION/ be the root of a directory tree
 containing all the files in the commit named by VERSION, which could be an
 artifact ID or tag or date.


That would be relatively easy, i think, because everything under VERSION/
is what is stored in a Manifest, e.g. the list of all files, the checkin
time, the comment, etc. So maybe: VERSION/files is a pseudir containing the
list of files, VERSION/comment and /user are files containing the
checking comment and user name, VERSION/time the checkin time, etc.


 This needs a great deal more thought.  I'm just trying to put out some
 ideas to get us started.


This should possibly be moved to the -dev list?


 This would be a great way to glue Fossil to scripts or diff or vimdiff or
 whatever tools you like so you can simultaneously work with normal files
 and old stuff that would otherwise be buried in the repository.


+1

That's the type of weird case i have been hoping to see someone suggest for
libfossil - i hadn't thought of that one yet.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do. -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] libfossil + fuse

2014-04-24 Thread Stephan Beal
On Thu, Apr 24, 2014 at 10:05 PM, Stephan Beal sgb...@googlemail.comwrote:

 On Thu, Apr 24, 2014 at 9:47 PM, Andy Goth andrew.m.g...@gmail.comwrote:

 I'd like something similar with Fossil, though completion of libfossil is
 an obvious prerequisite.  Putting libfossil and fuse together could be the
 way to go.


 Feel free to come help out - as a registered Fossil dev you've already got
 the licensing prerequisite :).


BTW: libfossil already has all the core features needed for what you're
proposing, or at least has the infrastructure to support them easily. What
it's completely missing, in a nutshell:

- update/merge
- stash: relies on merge
- annotate: waiting on the devs to stop tweaking fossil's annotate so that
i can port it
- anything network related, including sync in any form
- full tickets support: relies heavily on th1, and i want to avoid tying
any given script language to the core lib

and that's the order those are likely to be tackled. Though update is not a
prereq for sync, the core lib will not know anything about networking.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do. -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users