View Ticket
Not logged in
Ticket UUID: c7b35be884420016fcf35fd6d4e81d9d3ed943a1
Title: Fossil fails to recognize its repository db as a known file.
Status: Fixed Type: Incident
Severity: Severe Priority: Immediate
Subsystem: one Resolution: Fixed
Last Modified: 2008-07-23 13:03:24
Version Found In: 6ecc392f1c
Description & Comments:
Sometimes one want to create a repository db within the directory that also will hold the checkout. Especially if you are com from other VCSs like e.g. Git or Darcs. I do the same, if I have a whole worktree for that I want to create an one-shot repository within.

But if I ask Fossil to remove all unknown files via clean --all, it will remove its own database that the current checkout was taken from. For example:

  mkdir test1
  cd test1
  fossil new myrepos
  fossil open myrepos
  fossil add ...
  fossil commit
  :
  :
  fossil clean --all
Oops, my repository is gone!

I would expect, that -- at least -- every repository, that the current checkout was taken from, should be considered as a known file and should not be subject to 'clean'. Perhaps -- as a kind of loyality -- fossil should overlook all fossil repository db it ever encounter during its traversal?


drh added on 2008-07-23 13:03:24:
Since fossil repository files have no naming conventions, it is not clear how fossil could avoid "cleaning" other repositories without opening and checking each file prior to cleaning it - which would be expensive. But I have added the feature that the current repository is not "cleaned". Nor does the current repository appear in the list of "extra" files.