Re: [fossil-users] basic usage question - empty directories

2016-08-02 Thread Donny Ward
I'm surprised no one has mentioned the approach of placing empty files in
the directory. If I had an empty folder (e.g. bin) I would:

touch bin/PlaceExecutablesHere
fossil add bin/PlaceExecutablesHere

and the empty file would keep that folder in the repository.
___
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] basic usage question - empty directories

2016-08-02 Thread Adam Jensen
On 08/02/2016 02:17 PM, Joe Mistachkin wrote:
> 
> Adam Jensen wrote:
>>
>> So neither the TH1 or the embedded Tcl engine have typical shell-like
>> access the OS?
>>
> 
> If the Tcl integration features of Fossil are enabled, the Tcl interpreter
> will have full access to the Tcl command set, including any packages that
> happen to be installed.
> 
> By default, Fossil will attempt to load the "best" Tcl library found in the
> PATH; however, this behavior can be overridden using the FOSSIL_TCL_PATH
> environment variable (which can point to a file or directory).  Supported
> versions of Tcl are 8.4, 8.5, and 8.6.
> 

If I've connected the dots correctly, then it seems that repository
events could potentially trigger the execution of Tcl scripts (of
arbitrary complexity), and this could effectively be used in a fashion
similar to Subversion's "Repository Hooks". Nifty! (Or did I drop the
ball somewhere?)
___
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] basic usage question - empty directories

2016-08-02 Thread Joe Mistachkin

Adam Jensen wrote:
>
> So neither the TH1 or the embedded Tcl engine have typical shell-like
> access the OS?
>

If the Tcl integration features of Fossil are enabled, the Tcl interpreter
will have full access to the Tcl command set, including any packages that
happen to be installed.

By default, Fossil will attempt to load the "best" Tcl library found in the
PATH; however, this behavior can be overridden using the FOSSIL_TCL_PATH
environment variable (which can point to a file or directory).  Supported
versions of Tcl are 8.4, 8.5, and 8.6.

--
Joe Mistachkin

___
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] basic usage question - empty directories

2016-08-02 Thread Adam Jensen
On 08/02/2016 10:57 AM, Ron W wrote:
> On Tue, Aug 2, 2016 at 12:26 AM, Adam Jensen  > wrote:
> 
> 
> Subversion has "Repository Hooks" (a program triggered by some
> repository event); Fossil might have had a similar capability ...
> worth asking.
> 
> 
> With all the right things enabled during build, Fossil can run TH1/TCL
> scripts on certain events. But, aside from updating Fossil metadata, can
> only notify the "outsife world" by sending an HTTP request to a
> specified URL. I am pretty sure the scripts can construct the URL used,
> so some information can be encoded in the URL.
> 
> Otherwise, the main mechanism for automated publication of notices is RSS.
> 

So neither the TH1 or the embedded Tcl engine have typical shell-like
access the OS?
___
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] basic usage question - empty directories

2016-08-02 Thread Ron W
On Tue, Aug 2, 2016 at 12:26 AM, Adam Jensen  wrote:

>
> Subversion has "Repository Hooks" (a program triggered by some
> repository event); Fossil might have had a similar capability ...
> worth asking.


With all the right things enabled during build, Fossil can run TH1/TCL
scripts on certain events. But, aside from updating Fossil metadata, can
only notify the "outsife world" by sending an HTTP request to a specified
URL. I am pretty sure the scripts can construct the URL used, so some
information can be encoded in the URL.

Otherwise, the main mechanism for automated publication of notices is RSS.
___
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] basic usage question - empty directories

2016-08-01 Thread Adam Jensen
On 08/01/2016 11:01 PM, Ron W wrote:
> On Mon, Aug 1, 2016 at 8:22 PM, Adam Jensen  Is there a way to run these scripts automatically after each checkout?
> 
> 
> My team and I do this as part of the build procedure. Basically, we
> treat those as part of the "product" being built, so when we do a "clean
> check out", the first run of make will create those directories. We
> don't need them before that.
> 

Cool. I've looked at the Fossil project a few times during the last
couple of years but I haven't used it before now (now means *today*) so
I don't really have a grip on all of its capabilities yet.

Subversion has "Repository Hooks" (a program triggered by some
repository event); Fossil might have had a similar capability ...
worth asking.
___
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] basic usage question - empty directories

2016-08-01 Thread Adam Jensen
On 08/01/2016 10:25 PM, Steve Stefanovich wrote:
> At the end, you didn't add the empty-dirs file. You need to do 'fossil add * 
> --dotfiles' or explicitly do 'f add .fossil-settings/empty-dirs', then 
> commit. Then a subsequent checkout will create the directories.
> 

Thanks. Following John's documentation links (below) led to that basic
understanding a little earlier today. I also discovered some other
fundamentally important configuration options there. In addition to
empty-dirs, my setup also needs ignore-glob and keep-glob to avoid
'add'ing some files and to avoid 'clean'ing some files.

Thanks for the help!

On 08/01/2016 08:12 PM, John P. Rouillard wrote:
> See:
>
>http://fossil-scm.org/index.html/help?cmd=settings
>
>empty-dirs   A comma or newline-separated list of pathnames. On
> (versionable)   update and checkout commands, if no file or directory
> exists with that name, an empty directory will be
> created.
>
> Also see:
>
>
http://fossil-scm.org/index.html/doc/cd58f59a474c7ef773d1/www/settings.wiki
>
> look under "Versionable" settings.
>

___
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] basic usage question - empty directories

2016-08-01 Thread bch
On Aug 1, 2016 8:02 PM, "Ron W"  wrote:
>
> On Mon, Aug 1, 2016 at 8:22 PM, Adam Jensen  wrote:
>>
>> On 08/01/2016 07:40 PM, bch wrote:
>>
>> > in a controlling file. Something like a purpose-built makefile or
>> > script that handles this layout, so that -it- can be versioned in
>> > fossil; fossil wasn't/isn't currently designed to handle that sort of
>> > metadata - which *arguably* should be handled in a script as described
>> > above. Fossil can then handle that script as an artifact.
>> >
>>
>> Is there a way to run these scripts automatically after each checkout?
>
>
> My team and I do this as part of the build procedure. Basically, we treat
those as part of the "product" being built, so when we do a "clean check
out", the first run of make will create those directories. We don't need
them before that.
>

This is indeed the process I would have described. Fossil isn't doing any
*work* with respect to your project - it's just laying out tools +
resources. It's unfortunate that empty directories are a cause for
confusion, but if you accept that and work as Ron's team does, think of
fossil as managing the *content* of files (and limited meta data), and
consider that things like ownership, permissions, empty directories (and
perhaps more) are the responsibility of the project and it's tooling
(build/setup). And to clear what I think might be a small amount of
confusion, when I was talking about executable bits and --x, I was using
those 3 characters ("--x") to stand in for UNIX permissions like rwx - not
as a double-dash switch.

Regards,

-bch

> ___
> 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] basic usage question - empty directories

2016-08-01 Thread Ron W
On Mon, Aug 1, 2016 at 8:22 PM, Adam Jensen  wrote:

> On 08/01/2016 07:40 PM, bch wrote:
>
> > in a controlling file. Something like a purpose-built makefile or
> > script that handles this layout, so that -it- can be versioned in
> > fossil; fossil wasn't/isn't currently designed to handle that sort of
> > metadata - which *arguably* should be handled in a script as described
> > above. Fossil can then handle that script as an artifact.
> >
>
> Is there a way to run these scripts automatically after each checkout?


My team and I do this as part of the build procedure. Basically, we treat
those as part of the "product" being built, so when we do a "clean check
out", the first run of make will create those directories. We don't need
them before that.
___
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] basic usage question - empty directories

2016-08-01 Thread Steve Stefanovich
At the end, you didn't add the empty-dirs file. You need to do 'fossil add * 
--dotfiles' or explicitly do 'f add .fossil-settings/empty-dirs', then commit. 
Then a subsequent checkout will create the directories.

S.

  Original Message
From: Adam Jensen
Sent: Tuesday, 2 August 2016 10:02
To: fossil-users@lists.fossil-scm.org
Reply To: Fossil SCM user's discussion
Subject: Re: [fossil-users] basic usage question - empty directories


On 08/01/2016 07:25 PM, Steve Stefanovich wrote:
>
> ‎Create a .fossil-settings directory in the root of your checkout, and in it 
> add empty-dirs file with relative paths to where you want empty directories 
> created, fossil add/commit.
>

Is there documentation for that approach? I can't seem to get it to
work. Could you provide an example demonstrating the method, or review
my attempt (below) and provide corrections?

mkdir test
cd test/
mkdir repo
mkdir project
cd repo
fossil init test.fossil
cd ../project/
fossil open ../repo/test.fossil
touch README
mkdir empty1
mkdir notempty1
touch notempty1/foo.tcl
tree
.
|-- empty1
|-- notempty1
|   `-- foo.tcl
`-- README

mkdir .fossil-settings
vi .fossil-settings/empty-dirs
cat .fossil-settings/empty-dirs
./empty1

fossil add *
ADDED  README
ADDED  notempty1/foo.tcl

fossil commit -m "Initial checkin"
New_Version: 977b2342d05cd9b04fb6a1963fcbb7a96823fe75
___
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] basic usage question - empty directories

2016-08-01 Thread Adam Jensen
On 08/01/2016 07:40 PM, bch wrote:
> There has been lots of discussion about this over the years
> (https://www.google.ca/search?q=fossil-users+empty+directory).
> 
> I personally handle this (and other metadata things like user:group
> ownership or permissions (though we now handle --x (executable bit))

I'm guessing this means that file permissions aren't maintained through
the check-in/check-out process(?) Do you have a link to --x
documentation or can you provide an example?

> in a controlling file. Something like a purpose-built makefile or
> script that handles this layout, so that -it- can be versioned in
> fossil; fossil wasn't/isn't currently designed to handle that sort of
> metadata - which *arguably* should be handled in a script as described
> above. Fossil can then handle that script as an artifact.
> 

Is there a way to run these scripts automatically after each checkout?
___
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] basic usage question - empty directories

2016-08-01 Thread Adam Jensen
On 08/01/2016 07:25 PM, Steve Stefanovich wrote:
> 
> ‎Create a .fossil-settings directory in the root of your checkout, and in it 
> add empty-dirs file with relative paths to where you want empty directories 
> created, fossil add/commit.
> 

Is there documentation for that approach? I can't seem to get it to
work. Could you provide an example demonstrating the method, or review
my attempt (below) and provide corrections?

mkdir test
cd test/
mkdir repo
mkdir project
cd repo
fossil init test.fossil
cd ../project/
fossil open ../repo/test.fossil
touch README
mkdir empty1
mkdir notempty1
touch notempty1/foo.tcl
tree
.
|-- empty1
|-- notempty1
|   `-- foo.tcl
`-- README

mkdir .fossil-settings
vi .fossil-settings/empty-dirs
cat .fossil-settings/empty-dirs
./empty1

fossil add *
ADDED  README
ADDED  notempty1/foo.tcl

fossil commit -m "Initial checkin"
New_Version: 977b2342d05cd9b04fb6a1963fcbb7a96823fe75
___
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] basic usage question - empty directories

2016-08-01 Thread bch
There has been lots of discussion about this over the years
(https://www.google.ca/search?q=fossil-users+empty+directory).

I personally handle this (and other metadata things like user:group
ownership or permissions (though we now handle --x (executable bit))
in a controlling file. Something like a purpose-built makefile or
script that handles this layout, so that -it- can be versioned in
fossil; fossil wasn't/isn't currently designed to handle that sort of
metadata - which *arguably* should be handled in a script as described
above. Fossil can then handle that script as an artifact.

-bch


On 8/1/16, Adam Jensen  wrote:
> Hi,
>
> I haven't before used fossil to manage a project. Is there a way to
> commit empty directories to the repository so the project's directory
> structure can be preserved and reconstructed?
>
> Actually, some of the directories aren't empty but rather their contents
> are ignored:
>
> fsl add --ignore '*.db,*.fossil,*.log,*.mp3' *
> fsl commit -m "Initial checkin"
>
> Is this something simple that I haven't yet discovered in the
> documentation or am I doing something terribly wrong?
>
> Thanks!
> ___
> 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] basic usage question - empty directories

2016-08-01 Thread Steve Stefanovich

‎Create a .fossil-settings directory in the root of your checkout, and in it 
add empty-dirs file with relative paths to where you want empty directories 
created, fossil add/commit.

Cheers,
Steve
---

From: Adam Jensen
Sent: Tuesday, 2 August 2016 09:19
To: fossil-users@lists.fossil-scm.org
Reply To: Fossil SCM user's discussion
Subject: [fossil-users] basic usage question - empty directories


Hi,

I haven't before used fossil to manage a project. Is there a way to
commit empty directories to the repository so the project's directory
structure can be preserved and reconstructed?

Actually, some of the directories aren't empty but rather their contents
are ignored:

fsl add --ignore '*.db,*.fossil,*.log,*.mp3' *
fsl commit -m "Initial checkin"

Is this something simple that I haven't yet discovered in the
documentation or am I doing something terribly wrong?

Thanks!
___
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] basic usage question - empty directories

2016-08-01 Thread Richard Hipp
On 8/1/16, Adam Jensen  wrote:
>  Is there a way to
> commit empty directories to the repository so the project's directory
> structure can be preserved and reconstructed?

No, sadly, there is not.  Fossil versions only files.  Directories
exist only if they contain a file.

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


[fossil-users] basic usage question - empty directories

2016-08-01 Thread Adam Jensen
Hi,

I haven't before used fossil to manage a project. Is there a way to
commit empty directories to the repository so the project's directory
structure can be preserved and reconstructed?

Actually, some of the directories aren't empty but rather their contents
are ignored:

fsl add --ignore '*.db,*.fossil,*.log,*.mp3' *
fsl commit -m "Initial checkin"

Is this something simple that I haven't yet discovered in the
documentation or am I doing something terribly wrong?

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