Discussion:
'fossil open' and existing local 'manifest' and 'manifest.uuid' files
(too old to reply)
Artur Shepilko
2018-08-08 02:51:39 UTC
Permalink
By chance, just stumbled upon a curious issue: When executing 'fossil
open' for a newly created repo, if there're any existing local files
named "manifest" and "manifest.uuid" these get deleted.
-----------
$ mkdir x
$ cd x
$ ls

$ fossil new ../x.fossil
$ touch manifest manifest.uuid
$ ls
manifest manifest.uuid

$ fossil open ../x.fossil
project-name: <unnamed>
repository: /home/developer/test/../x.fossil
local-root: /home/developer/test/x/
config-db: /home/developer/.fossil
project-code: 675a3d32b3ea9a69b6e96449c4394589ff084c7a
checkout: fa1ef0afb6f8c4c3533b9508684527ca5603e2ca 2018-08-08 02:29:41 UTC
tags: trunk
comment: initial empty check-in (user: developer)
check-ins: 1

$ ls
-----------

This is applicable to both Linux and Windows.

Is this by design or that's a bug?
Warren Young
2018-08-08 12:18:17 UTC
Permalink
Post by Artur Shepilko
When executing 'fossil
open' for a newly created repo, if there're any existing local files
named "manifest" and "manifest.uuid" these get deleted.
Those files are generated by Fossil when you have the default-off setting “manifest” enabled.

I’m guessing that Fossil sees the files there, sees that “manifest” is disabled, so it assumes they were left by a previous run with the setting enabled and cleans them up.

Maybe it should only delete these files when you say “fossil set manifest 0”?
Artur Shepilko
2018-08-08 17:58:23 UTC
Permalink
Post by Warren Young
Maybe it should only delete these files when you say “fossil set manifest 0”?
Thanks for the info.
I also looked up where this happens in the code (manifest_to_disk() in
checkout.c [http://fossil-scm.org/index.html/artifact?udc=1&name=30d687f7642ce389&ln=136])

One way to get around this automatic deletion (when creating a new
repo with files already in the work directory) is to use 'fossil open
--empty' flag, though such use is somewhat non-intuitive.

I wonder if before deleting the local manifest files we should test if
the repo is freshly created and is empty (How?).
This would at least give the user a chance to decide what to do about
these manifest files and the "manifest" setting.
Otherwise the manifest files just surprisingly disappear.

BTW, I discovered this behavior while trying to populate a new repo
with the contents of a downloaded current Fossil master tarball. It
would add all files without any warnings, then it would just fail to
build due to missing 'manifest.uuid' needed to gen the VERSION.h. Yet
the 'manifest.uuid' is included in the tarball.

Loading...