[fossil-users] How to avoid 'touching' the fossil repo for read-only operation?

2014-08-09 Thread Tony Papadimitriou

Hi,

Every time I open a fossil repo, even if I simply open it to just get a copy 
of the files in some directory, I end up with a 'touched' repo file, as if 
some 'write' operation has occurred in the database.  And a binary compare 
of before and after shows that some bytes actually change.  However, if 
there are no commits, or any of the other operation that would normally 
write into the SQLite database, why is the database file updated at all?  Is 
this 'writing' a necessity for fossil's normal operation, or is it something 
that could be avoided by improving fossil?


Why is this a nuisance?  Because software that automatically backs up files 
based on their having been touched since last time will backup those files 
even when they haven't changed at all (from a logical point of view, even if 
something is actually written in them, it seems to be irrelevant as they 
will behave the same as the version before the 'write' occurred.)


Thanks. 


___
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] How to avoid 'touching' the fossil repo for read-only operation?

2014-08-09 Thread Andy Bradford
Thus said Tony Papadimitriou on Sat, 09 Aug 2014 20:01:30 +0300:

 Every time I open a fossil repo, even  if I simply open it to just get
 a copy of the files in some  directory, I end up with a 'touched' repo
 file, as if some 'write' operation has occurred in the database.

Every  time  fossil opens  a  repository  it  records  the path  in  the
repository:

$ pwd
/tmp/new
$ echo SELECT * FROM config WHERE name LIKE 'ckout:%'; | fossil sql
ckout:/tmp/new/|1|1407604257
ckout:/tmp/another/|1|1407604319

Andy
-- 
TAI64 timestamp: 400053e65971


___
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] How to avoid 'touching' the fossil repo for read-only operation?

2014-08-09 Thread Tony Papadimitriou

Hmm, I may not know the internals of how fossil works, but I have these
observations:

* this seems kind of pointless,  given I can open the same repo in multiple
locations at the same time.  Are you sure you're not referring to the
separate _FOSSIL_ database, instead, or some special operation that changes
that table?
* it doesn't seem to be the actual reason as I ran your query on my various
fossils, and many of them return zero rows or very few rows compared to the
number of opens it went through so far.
* please note that opening the repo using the UI interface, looking around,
and even downloading single files, does not change the database at all.  How
can this interface manage to do all this work without a single write to the
database?

-Original Message- 
From: Andy Bradford

Sent: Saturday, August 09, 2014 8:24 PM
To: Tony Papadimitriou
Cc: Fossil SCM user's discussion
Subject: Re: [fossil-users] How to avoid 'touching' the fossil repo for
read-only operation?

Thus said Tony Papadimitriou on Sat, 09 Aug 2014 20:01:30 +0300:


Every time I open a fossil repo, even  if I simply open it to just get
a copy of the files in some  directory, I end up with a 'touched' repo
file, as if some 'write' operation has occurred in the database.


Every  time  fossil opens  a  repository  it  records  the path  in  the
repository:

$ pwd
/tmp/new
$ echo SELECT * FROM config WHERE name LIKE 'ckout:%'; | fossil sql
ckout:/tmp/new/|1|1407604257
ckout:/tmp/another/|1|1407604319

Andy
--
TAI64 timestamp: 400053e65971 


___
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] How to avoid 'touching' the fossil repo for read-only operation?

2014-08-09 Thread Stephan Beal
On Sat, Aug 9, 2014 at 7:58 PM, Tony Papadimitriou to...@acm.org wrote:

 * this seems kind of pointless,  given I can open the same repo in multiple
 locations at the same time.  Are you sure you're not referring to the
 separate _FOSSIL_ database, instead, or some special operation that changes
 that table?


It records each one, so that fossil all knows what all is.


 * please note that opening the repo using the UI interface, looking around,
 and even downloading single files, does not change the database at all.
  How
 can this interface manage to do all this work without a single write to the
 database?


The culprit is the CLI interface. All checkouts opened via the CLI
interface record that fact in both the repo db and the global config db.
Without doing so, the all family of commands cannot work.

-- 
- 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] How to avoid 'touching' the fossil repo for read-only operation?

2014-08-09 Thread Andy Bradford
Thus said Tony Papadimitriou on Sat, 09 Aug 2014 20:58:41 +0300:

 * it doesn't  seem to be the actual  reason as I ran your  query on my
 various fossils,  and many of them  return zero rows or  very few rows
 compared to the number of opens it went through so far.

If  you  close  the  repository,  the path  will  be  removed  from  the
repository database.

 * please  note that opening the  repo using the UI  interface, looking
 around,  and  even  downloading  single files,  does  not  change  the
 database at  all. How can  this interface manage  to do all  this work
 without a single write to the database?

The web  UI does  not ``open'' the  repository. If you  want you  can do
similar things  from the  command line  without opening  the repository.
e.g. fossil cat,  fossil artifact, fossil info, fossil  timeline. All of
these use  the -R  to specify the  path to the  repository and  will not
modify the repository.

It  looks like  fossil  ls does  not honor  the  -R option---perhaps  it
should?

Andy
-- 
TAI64 timestamp: 400053e667ec


___
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] How to avoid 'touching' the fossil repo for read-only operation?

2014-08-09 Thread Stephan Beal
On Sat, Aug 9, 2014 at 8:26 PM, Andy Bradford amb-fos...@bradfords.org
wrote:

 It  looks like  fossil  ls does  not honor  the  -R option---perhaps  it
 should?


Mine does ;)

[stephan@host:~/cvs/fossil/libfossil/s2]$ f-ls -R ../../cwal.fsl | head
File list from manifest version 'trunk' [e4088e92c12b] (RID 5551)...
This is a delta manifest from baseline [0d3daff3cd58].
UUID P Name
96aa6450818f - JSON_parser/JSON_parser.c
d07e00f5c8db - JSON_parser/JSON_parser.h
7eb1c50d3b2f - JSON_parser/main.c
2f8718905d78 - Makefile
6c70942eb523 - common.make
d91a1e7daf3d - config.make
ce2f11972c05 - cwal.c


-- 
- 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