Fossil

Timeline
Login

Timeline

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

About branch andygoth-enhanced-symlink

It's been a few years since I've looked at it, so pardon me if I misremember the details.

The purpose of this branch is to expose handling of symlinks on platforms that don't have native symlinks. I absolutely needed this capability because my cross-platform project made heavy use of symlinks. In my project I created my own implementation of symlinks. On Windows, my build scripts would read the symlink list files and know to treat them as such, even though literally reading them actually just gives the name of their target. This worked very well for me.

What I didn't want to have to do was directly check in the symlink list files, which I was generating on Linux by searching the directory tree for actual symlinks. I wanted Fossil to automatically generate the symlink list in the same manner it generated the other manifest files. Furthermore, Fossil had an option to configure which manifest files were being generated, so it made sense to me to add the symlink list as a type of manifest that could be generated.

I know that I could also have scraped the manifest for F cards marked "l", but I was a little lazy and wanted the symlink list format to match what my scripts were already reading. Furthermore, I wanted the ability to add or remove symlinks while on Windows, something I otherwise could not do.

Thinking about it now, I realize having a writable manifest file of any sort is a bit dangerous and is a departure from how Fossil expects users to interact with the checkout. The user is expected to edit files that are controlled as artifacts in the repository. The manifest files are not (necessarily) so, especially when baseline manifests are used. To do anything other than edit the contents of existing files, the user is expected to tell Fossil what's going on. In other words: add, delete, move.

Unix makes it possible to edit more than the contents. Unix provides execute and symlink bits, which Fossil also recognizes and honors. Windows doesn't have these bits, but at least Fossil preserves them through the manifest, even if it can't expose them directly to the filesystem.

In conclusion, what I now think I should have done is give Fossil a command which can change a file to be a symlink, executable file, or regular file. On Unix, its use would be optional, since chmod or ln can do the same job. On Windows, its use would be required, since the OS provides no analog.

As for generating the symlink manifest, it's a terribly niche feature. Like I said before, any project needing it can get the data from the F cards in the regular manifest. Keep it or lose it, it makes no difference.

Someday I will revive this branch to make the file type command so that Windows can play along without having to introduce the dangerous new concept of a writable manifest file.

16 check-ins related to "andygoth-enhanced-symlink"
2017-10-14
22:49
Remove unnecessary double NUL-termination from blob ... (Closed-Leaf check-in: 95b6fad9 user: andygoth tags: andygoth-enhanced-symlink)
22:22
Update change log to describe Windows behavior of "l" flag to "manifest" setting ... (check-in: 810370cd user: andygoth tags: andygoth-enhanced-symlink)
22:19
Correct sense of _WIN32 conditional compilation ... (check-in: 1226e3ef user: andygoth tags: andygoth-enhanced-symlink)
22:03
Use transactions while creating symlink_perm table ... (check-in: f42ee09a user: andygoth tags: andygoth-enhanced-symlink)
22:03
Additional corrections to Windows symlink permissions logic ... (check-in: f29c8a44 user: andygoth tags: andygoth-enhanced-symlink)
21:48
Tweak comment style for consistency within functions ... (check-in: 364d0431 user: andygoth tags: andygoth-enhanced-symlink)
21:44
Correct vfile_check_signature() handling of manifest.symlinks not existing or manifest setting not containing the l flag ... (check-in: de50c496 user: andygoth tags: andygoth-enhanced-symlink)
21:43
Update Windows version of vfile_check_signature() to get symlink status from manifest.symlinks ... (check-in: 23e67f67 user: andygoth tags: andygoth-enhanced-symlink)
21:37
Protect against symlink_perm table already existing, should get_checkout_symlink_table() have already been called ... (check-in: 03ba3d9c user: andygoth tags: andygoth-enhanced-symlink)
21:32
Move manifest.symlinks read functionality into the new get_checkout_symlink_table() function in checkout.c ... (check-in: 7a4bd5cf user: andygoth tags: andygoth-enhanced-symlink)
21:13
When committing on Windows with the "l" manifest flag set, update the symlink permission for selected files from the manifest.symlinks file if it exists ... (check-in: 2808e225 user: andygoth tags: andygoth-enhanced-symlink)
19:32
Correct help text for open command ... (check-in: 109c956f user: andygoth tags: andygoth-enhanced-symlink)
19:28
Merge trunk ... (check-in: 057645a9 user: andygoth tags: andygoth-enhanced-symlink)
2017-10-12
13:37
Rewrote the autoreconfigure explanation comment. It was confusing and contained errors. ... (check-in: 50844e5c user: wyoung tags: trunk)
2017-09-29
00:53
Add support for the "l" flag to the "manifest" setting to enable creation of a file "manifest.symlinks" which lists the names of all symlinks ... (check-in: 8d6bdd1e user: andygoth tags: andygoth-enhanced-symlink)
2017-09-28
18:18
Fix indentation of unanalyzed lines on /annotate and /blame screens. ... (check-in: 00ced6df user: drh tags: trunk)