On Thu, 1 Feb 2018 14:59:21 -0500 Martin Gagnon <eme...@gmail.com> wrote:
> On Thu, Feb 01, 2018 at 08:13:54PM +0200, John Found wrote: > > On Thu, 1 Feb 2018 12:03:13 -0500 > > Richard Hipp <d...@sqlite.org> wrote: > > > > > On 2/1/18, Martin Gagnon <eme...@gmail.com> wrote: > > > > > > > > I could reproduce it. I didn't have much time to investigate it for now > > > > but I have attached a simple shell script that reproduce the problem > > > > starting from scratch. > > > > > > > > Just put the shell script on an empty directory and execute it. > > > > > > Thanks for the repro script. > > > > > > If found that it does work if your break up the operation into two > > > distinct steps. > > > > > > (1) "fossil rm" the old files that will be changed into symlinks. > > > Then "fossil commit". > > > > > > (2) "fossil add" the new symlinks. Then "fossil commit" again. > > > > > > The revised script that works is attached. > > > > > > It would be great if it worked in a single step. But this is an > > > obscure case for which there is (now) a work-around, so it is of lower > > > priority for the moment. > > > > > > -- > > > D. Richard Hipp > > > d...@sqlite.org > > > > Yes, thanks, I was able to commit this way. Hope, the bug will not be hard > > to fix. > > > > Anyway, another obscure case is when the symlink points to a directory. In > > this > > case fossil adds the files of the directory twice - from the original > > directory and from > > the symlink. I was not able to make fossil to add to the repository only > > the symlink itself. > > If you do: "fossil set allow-symlink 1" on the opened checkout, it > should works and add only the symlink. I set "allow-symlink" through the UI, so it was 1 when I added the files. For me the logic is simple, but fossil (obviously) use something more complex: if allow_symlink == 1 then never follow symlinks, process them as usual files else always follow symlinks, process the file they point to. > > But you will have same problem as with the symlink to file if you try to > replace the directory by a symlink in one single step. You need to do it > in 2 commits. > > So the same work around apply: > > 0. be sure allow-symlink is ON > $ fossil set allow-symlink 1 > > 1. remove directory and all it content: > $ fossil rm a_dir > $ rm -rf a_dir > > 2. commit the change (remove real dir and it's content) > $ fossil commit -m "remove dir a_dir and it's content" > > 3. create the symlink, add the symlink and commit. > $ ln -s another_dir a_dir > $ fossil add a_dir > > 4. commit the change (add symlink) > $ fossil commit -m "add symlink a_dir" > > > Regards, > > -- > Martin G. > _______________________________________________ > fossil-users mailing list > fossil-users@lists.fossil-scm.org > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users -- http://fresh.flatassembler.net http://asm32.info John Found <johnfo...@asm32.info> _______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users