4 ms·
the main reason i'm not all-in on Fossil is because you cannot squash commits; my WIP branch history is very messy, e.g. "looks to be working", "refactor", "typ
by leeoniya 4y ago
the main reason i'm not all-in on Fossil is because you cannot squash commits; my WIP branch history is very messy, e.g. "looks to be working", "refactor", "typo", "optimize", "undo checkpoint". i don't need any of that junk on the `main` branch once the feature branch is merged.
it's really too bad, everything else in Fossil looks very compelling.
- zie 4y agoYou can hide those commits, you just can't delete/squash them. It's really not as big of a deal as everyone claims.
- mdaniel 4y agoIt sounds like you have experience with Fossil; is it that "YOU can hide those commits" meaning you can omit them if you don't get value from them, or is it that "you can HIDE those commits" meaning "UPDATE commit SET hidden = true" so everyone in this "git push --mirror" world also benefits from you declaring the commits to be "of little value"?
- zie 4y agoFirst, it's discouraged in Fossil, because the right way to do it is to just hide stuff in your "select" view(generally the dashboard in the web UI), so it only shows the stuff you want anyway, i.e. everything is visible, but you select your view to only show the stuff you care about at the time. I.e. don't change the back-end data, change the query you use to view it. If you are bound and determined to hide it by default, then, it's just a flag attached to a commit or a branch(by default in the CLI, it can only apply to branches): fossil amend --hide <branchname> If you want to hide individual commits, you have to work a touch harder: fossil tag add --raw hidden <COMMIT_ID> This thread in the Fossil forums might prove interesting: https://fossil-scm.org/forum/forumpost/333117081652bf3db6dc6f92ccf6682fd1fcd21f205672c2aad253a5fea6e30a https://fossil-scm.org/forum/forumpost/333117081652bf3db6dc6...
- mdaniel 4y agoGreat, thank you for taking the time. That flag must be exclusively for the web timeline view because it did the opposite of what I was hoping This is fossil version 2.20 [210e89a059] 2022-11-16 18:46:32 UTC $ fossil timeline === 2022-12-13 === 22:27:34 [dcb81ebb44] *CURRENT* paragraph (user: mdaniel tags: main, trunk) 22:27:09 [3a2c469dae] better readme (user: mdaniel tags: main, trunk) 22:26:46 [3fd12e216a] readme (user: mdaniel tags: main, trunk) 22:26:24 [222d705331] initial (user: mdaniel tags: main, trunk) +++ no more data (4) +++ $ fossil tag add --raw hidden 3a2c469dae $ fossil timeline === 2022-12-13 === 22:30:39 [e54ead5c08] Edit [3a2c469dae6d6490|3a2c469dae]: Add "hidden". (user: mdaniel) 22:27:34 [dcb81ebb44] *CURRENT* paragraph (user: mdaniel tags: main, trunk) 22:27:09 [3a2c469dae] better readme (user: mdaniel tags: main, trunk) 22:26:46 [3fd12e216a] readme (user: mdaniel tags: main, trunk) 22:26:24 [222d705331] initial (user: mdaniel tags: main, trunk) +++ no more data (5) +++ And yes, I believe the "it's discouraged in Fossil" was the whole point of the exercise in pointing out the cultural mismatches
- zie 4y agoYes, the ability hasn't made it to the CLI (yet?), but the web GUI does honour the hidden flag. If you run `fossil timeline --sql`, you can then change the sql to skip the hidden flag, though I'm not sure where in the commit that is, one would have to do some digging.
- adql 4y agoOr maybe plainly just not a big deal for you, but still problem for others
- zie 4y agoFossil's perspective is deleting/altering and tampering with history is a terrible idea. Some code shops have legal or policy mandates that disallow them from altering history anyway. My employer is such a place. Yes we have a few 'typo' commits that get through, but whatever. In practice it's a non-issue, since Fossil is just a sqlite DB, you can do what amounts to a select * from commits where 'typo' not in commit_msg, and never see them, without doing anything in the second paragraph, which shows you how to do all of this if you are bound and determined. Regardless, if you REALLY want to delete and/or hide history, one can do this in Fossil as well, it's a touch more annoying in Fossil compared to git, but it's not difficult or anything, you can do it all from the CLI. [This thread](https://fossil-scm.org/forum/forumpost/333117081652bf3db6dc6f92ccf6682fd1fcd21f205672c2aad253a5fea6e30a https://fossil-scm.org/forum/forumpost/333117081652bf3db6dc6...) shows hiding branches and commits and [this stackexchange](https://stackoverflow.com/questions/42832992/shun-a-whole-commit-in-fossil https://stackoverflow.com/questions/42832992/shun-a-whole-co...) handles deleting data from the repo.
- CRConrad 4y agoWell, since Fossil stores its stuff in an SQLite database, I'd assume that if you know SQL and the password to your Fossil repo, you can delete and alter history...? After all, SQL consists not only of the SELECT command; it has DELETE and INSERT too.
- zie 4y agoYou can, but your repo would almost certainly not validate well, if it even worked. Just depends on the changes you make I guess.