[fossil-users] committing a folder structure without files?

142 views
Skip to first unread message

Jeremy Anderson

unread,
Mar 20, 2012, 11:28:22 AM3/20/12
to Fossil SCM user's discussion
I know Fossil is a file versioning system, but when first establishing a repository for a working group, it is useful to create a straw-man folder structure to guide growth. But, one can't (by default?) commit an empty folder to a fossil repository, as there's nothing to 'version'.

For example, when developing games with UDK, they recommend a folder structure like this:

├───official_game_assets
│   ├───alpha
│   ├───beta
│   │   ├───Binaries
│   │   ├───Development
│   │   ├───Engine
│   │   │   ├───Config
│   │   │   ├───Content
│   │   │   │   ├───Functions
│   │   │   │   └───Maps
│   │   │   │       └───Template
│   │   │   ├───Extras
│   │   │   ├───Localization
│   │   │   ├───Shaders
│   │   │   └───Stats
│   │   └───UDKGame
│   │       ├───Autosaves
│   │       ├───Build
│   │       ├───Config
│   │       ├───Content
│   │       │   ├───Maps
│   │       │   ├───Mobile
│   │       │   ├───Private
│   │       │   ├───Shared
│   │       │   ├───Showcases
│   │       │   └───TestPackages
│   │       ├───Flash
│   │       ├───Localization
│   │       ├───Logs
│   │       ├───Movies
│   │       ├───Scripts
│   │       └───Splash

Is there a way around this? Can you commit an empty folder somehow?

(I'd prefer to not have to go generate a placeholder "readme.txt" or ".purpose" file for each folder, just to get Fossil to recognize that it should exist... but I will if i must.)

Just curious...

-jer


Pascal J. Bourguignon

unread,
Mar 20, 2012, 11:49:57 AM3/20/12
to Fossil SCM user's discussion, Fossil SCM user's discussion




On 20/03/2012, at 16:28, Jeremy Anderson <jer...@gmail.com> wrote:

I know Fossil is a file versioning system, but when first establishing a repository for a working group, it is useful to create a straw-man folder structure to guide growth. But, one can't (by default?) commit an empty folder to a fossil repository, as there's nothing to 'version'.

Is there a way around this? Can you commit an empty folder somehow?

(I'd prefer to not have to go generate a placeholder "readme.txt" or ".purpose" file for each folder, just to get Fossil to recognize that it should exist... but I will if i must.)

One way is to have indeed place holder files.  Often named '.keep'. 
Another way, is to write a Makefile that will create the directories.  Works to create symlinks too for cvs that dont keep symlinks.
-- 
__Pascal Bourguignon__

Benoit Mortgat

unread,
Mar 20, 2012, 11:51:26 AM3/20/12
to Fossil SCM user's discussion
On Tue, Mar 20, 2012 at 16:28, Jeremy Anderson <jer...@gmail.com> wrote:
> I know Fossil is a file versioning system, but when first establishing a
> repository for a working group, it is useful to create a straw-man folder
> structure to guide growth. But, one can't (by default?) commit an empty
> folder to a fossil repository, as there's nothing to 'version'.
>
> For example, when developing games with UDK, they recommend a folder
> structure like this:
>
> ├───official_game_assets
> │   ├───alpha
> │   ├───beta
> │   │   ├───Binaries

You can use the versionable setting “empty-dirs”. Create a file named
.fossil-settings/empty-dirs in your checkout, and fill it with:

/official_game_assets/alpha
/official_game_assets/beta/Binaries
...

Add that file to the fossil repository, this will maintain a versionable
list of empty directories.


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

Benoit Mortgat

unread,
Mar 20, 2012, 11:54:52 AM3/20/12
to Fossil SCM user's discussion
On Tue, Mar 20, 2012 at 16:51, Benoit Mortgat <mor...@gmail.com> wrote:
> On Tue, Mar 20, 2012 at 16:28, Jeremy Anderson <jer...@gmail.com> wrote:
>> I know Fossil is a file versioning system, but when first establishing a
>> repository for a working group, it is useful to create a straw-man folder
>> structure to guide growth. But, one can't (by default?) commit an empty
>> folder to a fossil repository, as there's nothing to 'version'.
>>
>> For example, when developing games with UDK, they recommend a folder
>> structure like this:
>>
>> ├───official_game_assets
>> │   ├───alpha
>> │   ├───beta
>> │   │   ├───Binaries
>
> You can use the versionable setting “empty-dirs”. Create a file named
> .fossil-settings/empty-dirs in your checkout, and fill it with:
>
> /official_game_assets/alpha
> /official_game_assets/beta/Binaries
> ...
>
> Add that file to the fossil repository, this will maintain a versionable
> list of empty directories.

I've answered a bit fast.
You actually need to declare all sublevels:

/official_game_assets
/official_game_assets/alpha
/official_game_assets/beta
/official_game_assets/beta/Binaries
...

In order to create the dirs, just run “fossil update”.

Jeremy Anderson

unread,
Mar 20, 2012, 12:16:03 PM3/20/12
to Fossil SCM user's discussion
Sounds like a winning suggestion. Having issues with it though.

specifying \developer\jer results in:
c:\fossil\fossil.exe: couldn't create directory \developer\jer as required by empty-dirs setting

specifying /developer/jer results in:
c:\fossil\fossil.exe: couldn't create directory /developer/jer as required by empty-dirs setting

specifying developer/jer results in:
c:\fossil\fossil.exe: couldn't create directory developer/jer as required by empty-dirs setting

Any ideas?

Jeremy Anderson

unread,
Mar 20, 2012, 12:18:36 PM3/20/12
to Fossil SCM user's discussion
Brilliant. that did it. Disregard my last. :)
Reply all
Reply to author
Forward
0 new messages