Fossil Forum

Git --> Fossil creates "The repository database has been replaced by a clone..." warning
Login

Git --> Fossil creates "The repository database has been replaced by a clone..." warning

Git --> Fossil creates "The repository database has been replaced by a clone..." warning

(1.1) By Gour (gour) on 2019-06-22 11:05:00 edited from 1.0 [source]

Hello,

today when I was converting some old repos from Git to Fossil, one repo produces:

WARNING: The repository database has been replaced by a clone. Bisect history and undo have been lost.

so I wonder if there is any known way to get rid of it, iow. how to fix it?

Sincerely,
Gour

(2) By Stephan Beal (stephan) on 2019-06-22 11:34:05 in reply to 1.1 [link] [source]

This happens when fossil detects that the "RIDs" (transient record IDs) between the checkout db and repo it was opened from no longer align. This can happen for a number of reasons, most commonly the one reported in the message.

The easiest way to resolve it is doing this from the checkout directory:

fossil close --force
fossil open --keep /path/to/repo

That will retain any local changes you have made.

(3) By Gour (gour) on 2019-06-22 12:02:11 in reply to 2 [link] [source]

This can happen for a number of reasons, most commonly the one reported in the > message.

It is a bit strange considering it is a pristine repo just converted from Git.

The easiest way to resolve it is doing this from the checkout directory:

That did not help.

Moreover, I've tried with fossil all rebuild and got the same warning for every Fossil repo I have??

(4) By Stephan Beal (stephan) on 2019-06-22 12:14:35 in reply to 3 [link] [source]

It is a bit strange considering it is a pristine repo just converted from Git.

Importing from git can change the RIDs. You apparently did something like this:

  • open the repo (creating a checkout)
  • import git into the repo (which can potentially change the RIDs)

Those steps may invalidate any opened checkouts of that repo. A rebuild can also hypothetically change the RIDs but historically has never been known to do so (though i honestly have no idea why it doesn't happen on nearly every rebuild).

If you close the repo and then open it then that error "must" go away. If it's not then that's definitely a bug but i've currently got no idea about what might be causing it.

Worst case, try doing a clean checkout, rather than a close/open.

(5) By Gour (gour) on 2019-06-23 13:36:25 in reply to 4 [link] [source]

Importing from git can change the RIDs. You apparently did something like this:

Well I just converted pristine Git repo and then opened Fossil repository.

However, when trying to fix the problem, I did, by accident, removed all my finances-related repository - both Git and Fossil ones and the last backup was from 2 weeks ago. :-(

Fortunately, Fossil has helped me since doing "rm -rf some-folder" does not destroy repository, but only checkout which is not the case with Git, so I was able to restore my repos by re-opened them and the problematic one I did restore from the Git repo, the backup was covering last entries and the problem went away.

If you close the repo and then open it then that error "must" go away. If it's not then that's definitely a bug but i've currently got no idea about what might be causing it.

Still, I wonder why did it happen and will report again if/when it does re-appear.

Long live Fossil!

Sincerely,
Gour

(11) By anonymous on 2019-10-04 16:54:16 in reply to 4 [link] [source]

A rebuild can also hypothetically change the RIDs but historically has never been known to do so (though i honestly have no idea why it doesn't happen on nearly every rebuild).

Just a thought...

If RID is the index into the BLOB table, then I would think that when fossil rebuild "walks" through the BLOB table, wouldn't it be in RID order?

(12) By Stephan Beal (stephan) on 2019-10-04 17:04:54 in reply to 11 [link] [source]

A quick glance at rebuild.c:rebuild_db() (which i'm not familiar with) suggests that most of the work is done without ORDER BY clauses, so ordering is unspecified. It seems that rebuild is mostly doing UPDATEs, though, which would explain the stable RIDs.

(6) By seeg on 2019-08-16 16:27:05 in reply to 1.1 [link] [source]

I can confirm getting the same error message for a freshly migrated Git repository.

Closing and reopening doesn't work.

Also, after adding an untracked file I get this:

WARNING: The repository database has been replaced by a clone.
Bisect history and undo have been lost.
ADDED  sshd-minissh/sshd.scm
Unresolved RID values: 0 
and basic commands don't work (like fossil status for example).

(7) By Samuel (Ssamm) on 2019-08-22 05:17:51 in reply to 6 [link] [source]

I am also getting the same issue. I am using fossil version 2.9 and git version 2.23.0

(8.1) By seeg on 2019-10-04 10:55:01 edited from 8.0 in reply to 7 [link] [source]

Deleted

(9) By anonymous on 2019-10-04 10:15:34 in reply to 8.0 [link] [source]

Yep also happens here - bit nervous now! I'll hang on before adding any files :)

(10) By ckennedy on 2019-10-04 15:52:31 in reply to 6 [link] [source]

The "Unresolved RID values: 0" might be related to what I reported earlier. Take a look and see if the sequence of steps sounds similar. Since it only affected new repositories with no check-ins I don't think it was much of a priority.

Thanks.

(13) By seeg on 2019-10-05 06:57:46 in reply to 10 [link] [source]

The git repository I migrated is not empty but does contain commits. In fact fossil timeline works initially before the RID gets broken:

WARNING: The repository database has been replaced by a clone.
Bisect history and undo have been lost.
=== 2018-04-07 ===
16:19:59 [9018e032f8] *CURRENT* rtos_led_control: fixes (user: <user> tags: master, trunk)
16:19:52 [cee2cd7814] traffic_lights (user: <user> tags: master, trunk)
=== 2018-04-06 ===
13:43:39 [b4484b349f] Initial commit (user: <user> tags: master, trunk)
+++ no more data (3) +++

(14) By seeg on 2019-10-07 04:13:32 in reply to 13 [link] [source]

Also, I just tested and I get the same behavior in 2.10.

(15) By Jan Nijtmans (jan.nijtmans) on 2019-10-09 12:16:10 in reply to 6 [link] [source]

This should be fixed now, after this commit:

https://www.fossil-scm.org/home/info/fd8816ecf6eeea11

Regards, Jan Nijtmans

(16) By seeg on 2019-10-12 06:08:27 in reply to 15 [link] [source]

The error remains, however fossil add works now and after comitting the error goes away. Thank you :)