Fossil Forum

Sebito 1 month ago

Post: Fossil does not move file

So I did a little oopsie. I moved some files around and then notified fossil of the rename but gave it the wrong place. Basically this was the starting point:

content
├── pages
│   ├── index.md
│   └── ...
└── posts
    ├── post1.md
    └── ...

And I did something like fossil mv content/posts content/pages/blog since I wanted the blog post pages to be available like this:

content
└── pages
    ├── index.md
    └── blog
        └── posts
            ├── post1.md
            └── ...

but fossil moved it to content/pages/blog/post1.md (so not into the posts subdirectory I wanted). Since I already tracked the new content/pages/blog/posts directory because I did fossil addremove earlier it now looks like this:

$ fossil changes --differ
MISSING    content/posts/post1.md  ->  content/pages/blog/post1.md
EXTRA      content/pages/blog/posts/post1.md
...

I tried fossil removing the now gone files under content/posts/* and the files that were wrongly tracked und content/pages/blog/*.md and tried

fossil mv content/posts/post1.md content/pages/blog/posts/post1.md

As to tell fossil that the file that I originally deleted in content/posts now lives in content/pages/blog/posts but fossil does not change anything in it's tracking behavior. It's not a huge issue since the outcome of the commit (even if the tracking is a little weird) will still result in a repository state that matches my desired state but I wish that I could track the moving of files correctly here.

What am I missing? :T Z 831af2dc493e4e204f8bb1d4c4e14a8d

Sebito 1 month ago

Ah I got it thanks to https://fossil-scm.org/forum/forumpost/70ee5c0742d3cb18 :D

If I get in this state I have to:

  1. fossil revert content/posts as to undo the fossil mv
  2. fossil mv content/posts content/pages/blog/
  3. rm -rf content/posts

Now my fossil changes --differ shows me the correct changes :)

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button