Search code examples
dvcsfossil

Fossil: recognise changes while repo closed


I know, I should only change files in a project, when the repository is opened. But I now tried to see what happens when I change a file when the repo is closed, because I will often do that, because I'm going to forget to open repos. It's inconvenient ...

Now I see what happens: changes are not recognised. Doing a commit, I get the message "nothing has changed" ... which is not true.

What can I do to make fossil recognise missed changes?


Solution

  • Why did you close the repository? When you do fossil open, fossil will try to deploy the latest version. Maybe it has overwritten your files…

    You should use open .... --keep if you don't want to harm your working directory.

    As a comparison with git (seems that it's your background):

    • in git, each working directory has its own .git folder. Multiple working directories for the same repository are typically hardlinked.
    • in fossil, each working directory contains a file named _FOSSIL_ or maybe .fossil depending on your version. It contains both a pointer to the repository (the object database) plus workingdir-specific data (what you'd call HEAD, stash, uncommitted additions/deletions/renames). close will delete that file. So, in git terms, it's like if you did git clone --bare . some_other_folder.git and then recursive rmdir .git. You still have the project history somewhere, but all information about your working tree is lost.