SQLite Forum

How to fix repository stuck with commit mistake
Login

How to fix repository stuck with commit mistake

(1) By Domingo (mingodad) on 2021-01-03 14:01:22 [link] [source]

Hello !

Again I've got stuck in a dead end commit of sqlite repository https://www.sqlite.org/src/info/5774318e7329ca47 it's not the first time and I have some custom changes made to this repo, in past times I did a fresh checkout on a new folder and manually transferred my custom changes but this is not funny.

The thing happen most of the time because I do update it daily and I only noticed that I'm in a dead end commit after several days seem "changes:      None. Already up-to-date" and then I go to https://www.sqlite.org/src/timeline and see that I'm stuck in a commit tagged as "mistake" and there are several commits after that and the command "undo" do not solve the problem because there was several "updates" after the offending update/commit.

Does someone know a way to fix this issue without get into a lot of conflicts ?

Ideally I would like to "revert/undo" the offending update/commit and do an "update" command and stay in sync again without too much headache with my ongoing custom changes.


Cheers !

(2) By Richard Hipp (drh) on 2021-01-03 14:06:15 in reply to 1 [source]

Run:

fossil update trunk

(3) By Domingo (mingodad) on 2021-01-03 14:15:22 in reply to 2 [link] [source]

Hello Richard !

Thank you for reply !

Yes that did the what I was expecting, I think I remember now that I asked this before and got this answer, I searched the fossil forum for "mistake" and found nothing then came back here to ask.

Could somehow fossil detect situations like this and suggest this solution ?

Somehow based on the tag "mistake" or any other flag that could be set on a commit to allow fossil to detect this situation and give a message like:

It seems that you are in a dead state, "fossil update trunk" could fix it if you are following trunk.

Cheers !

(4.1) By Warren Young (wyoung) on 2021-01-03 18:59:37 edited from 4.0 in reply to 3 [link] [source]

detect this situation and give a message

Fossil already does that; you just haven't been paying attention:

$ fossil up
Autosync:  https://sqlite.org/cgi/src/
Round-trips: 4   Artifacts sent: 0  received: 99
Pull done, sent: 5067  received: 67238  ip: 45.33.6.223
-------------------------------------------------------------------------------
checkout:     40c44d38104dfcb688155d1172cb172c1bb1d90d 2020-07-23 20:37:39 UTC
tags:         mistake
comment:      Turns out this is an aliasing bug in SQLite, not a GCC bug. Was: Work-around for
              what appears to be another GCC bug - this one for GCC 8.3.0 on ARM. See the 
              [https://sqlite.org/forum/forumpost/d44eb2fc44|SQLite forum post] for discussion.
              (user: drh)
changes:      None. Already up-to-date

See the line "tags: mistake"? That's your hint that you aren't on trunk any more.

You get much the same result from a fossil status call.

If you just want a one-line answer, then say "fossil branch current".