Live data from Hacker News

Fossil SCM keeps more than just your code

blog.kotur.org

81–90 of 91 posts

Re: Fossil SCM keeps more than just your code

#81
post #21

> Git does not care about history, you can rewrite it as you feel like (git rebase). On the other hand, Fossil is immutable. Audit is possible, every action leaves a trail, and you can not rewrite it. Ehm, That's not a fair assessment. Git is as much immutable as fossil. In fossils case, I can still poke around the sqlite database and delete rows from it. That may be difficult to pull of, because I expect the interna…

> Ehm, That's not a fair assessment. Git is as much immutable as fossil. HA! HAHA! HAHAHA!!!! For any reasonable definition of "immutable," git is most certainly NOT immutable.

A tree with a known hash will never change.

Re: Fossil SCM keeps more than just your code

#82

Fossil is neat and the idea of a tickets tracker and wiki within the repo is very productive. However I got spoiled by the power of Git. So what I do now is to keep a TiddlyWiki[1] on the Git repo, so I have the best of both worlds. [1] http://tiddlywiki.com/

While I am a fan of chains of small cooperating tools, there is something to be said for a single large tool with a well-integrated feature set.

Here are some of the advantages you get when the code repo, bug tracker, and wiki are all part of the same coherent system:

1. When a checkin fixes a bug noted in the ticket tracker, you can reference it in the checkin comment with a subset of the ticket ID: "Fixes [3b52b91fc]" That ticket ID becomes clickable in the web view of the timeline, taking you directly to the referenced ticket. Yes, I know, this is not a unique feature, but the other systems that have this also integrate the ticket tracker and code repo. The point is that you get this feature out of the box with Fossil, for free.

2. Your next step is to close the bug ticket. This modifies the appearance of the checkin comment you created in the previous step in the Fossil UI timeline view, rendering the ticket ID as strikethrough text, so you can see it refers to a closed ticket without clicking on it. The key point here is that the integration is bidirectional.

(It would be even neater if Fossil would recognize the pattern "Fixes [artifact-ID]" in checkin comments and automatically close the ticket for you. It shouldn't be too difficult to add, since it's a unified system.)

3. Anywhere that Fossil accepts regular URLs, it will also accept artifact IDs. So, you can refer to checkins or tickets from the wiki, or from within a Markdown document checked into the code repo.

4. Because Fossil understands Markdown as one of its available wiki article formats, it can render Markdown documents in the code repo inside the Fossil UI when you click on them from the Files tab in the web UI.

5. That feature extends to other document types, too. This leads to the embedded documentation feature (http://fossil-scm.org/xfer/doc/trunk/www/embeddeddoc.wiki) which is a versioned alternative to the wiki. You use the wiki for articles that apply to all versions of the repository, or at least to the current trunk version. Where you instead need a given doc article to roll back to its historical content when you roll back the code, you want to use embedded documentation instead. You can use the wiki and embedded docs interchangeably, linking from one to the other, as needed.

Re: Fossil SCM keeps more than just your code

#83
post #27

Earlier quoted context omitted.

We don't know how many people are using SSH git but you surely know they are much less than 3 million. Have you heard about Dunning-Kruger effect?

Yes, I assume you are indicating that I think my skill is greater than it actually is? Which skill are you referring to? Or whose skill are you referring to?

You are too sure of your conclusion without a justification.

Neither I nor you know 3 million people and their habits. Yet you are certain there is no such a group of 3 million people that will contradict your conclusion.

It's not about your skills. It's about your confidence based on nothing.

Re: Fossil SCM keeps more than just your code

#84
post #68

Earlier quoted context omitted.

> What is the value in having history be static? Because you can trust it. Rewritable history is like maintaining your business ledger on a whiteboard. > I find that rebase comes in handy as I'm working locally This idea that local development is a good thing is one of the biggest differences between Git and Fossil. Git was created to serve the needs of the Linux kernel, where the development effort is not only distr…

> Because you can trust it. Rewritable history is like maintaining your business ledger on a whiteboard. You can trust a git commit to never change. > You will make mistakes, but Git encourages you to hide them in the stash, in private branches, in changed checkin comments (git commit --amend), and in history rewrites. In its default working mode, That is not the purpose of any of those things, nor is the purpose to…

> While you shouldn't be working on multiple things, I and most other people I met, end up doing so

Fossil solves that with branches. Merging a branch into the trunk is equivalent to what Git calls pushing. The difference is that everyone can see your branch, unless you use a private branch, which is more like Git. I've argued the advantages of working on a public branch already, though, so I won't repeat that here.

That reminds me of another big difference between Fossil and Git. With Git, the checkout tree and the local repo clone are tied up in a single directory tree. The normal way to switch branches is to check all of your local changes in, then switch the current working directory over to the other branch.

While you can do that in Fossil, too, because the repository is a separate file, when working with long-lived branches, it is easier to have separate checkout trees, one for each such branch. The advantage is that switching branches doesn't change all the timestamps for changed files, invalidating build artifacts and such.

To get the same effect with Git, you have to clone the whole repo for each long-lived branch, which complicates things greatly, and wastes a bunch of disk space.

> It's not protectionist or perfectionist to keep non-working code out of the main branch

So check it in on a feature branch or a private branch. Once the new feature in the branch functions as intended, merge it into the trunk.

> why should everyone else have a non-working version of it for the duration of the rewrite?

If it's a public branch, their Fossil pulls will indeed give them a copy of your branch, but they will only be able to see your checkin comments in the Timeline view, by default. That tells your team members what you're working on, which, as I've already argued, is a good thing. If they have concerns about your direction, they can switch to your branch (a la Git) or check it out into a separate working tree. Or, they can just ignore it, and let you get about your business.

> often you _can't_ consult them

I already stated it above: if you're working on a project where you're not really collaborating with people, and where haring off in your own direction is a normal thing, then Git may well be the correct tool for you.

Fossil is for coherent projects, where people are expected to work together. The SQLite project, which Fossil was created for, is an example of this: to join the project, you have to first impress someone enough to get a commit bit, then you sign the contributor agreement. You are expected to participate on the developer mailing list once accepted.

Fossil is also good for traditional corporate development, where those with commit bits are your coworkers.

> I don't see how private branches encourage of facilitate [rewriting other people's code]

Git's normal working model is that your checkins are local first, then only optionally pushed back to the repo you cloned from. I'd bet a whole lot of the forks on GitHub will no longer integrate back into the parent project. You can see this in the language they use: forking.

This is not necessarily a bad thing. If you need federated development, Git's your tool.

But if instead you're after collaborators, contributors, and coworkers, you don't want forking the repo to be the normal first step.

> I'm not seeing why your model is inherently any better than make sure tests pass after a merge.

The "guy in the room" spends days or weeks working on code without showing anyone what he's up to. Then there is a big-bang merge event, which may or may not succeed, and may wreck his coworkers plans.

If you ignore private branches in Fossil, you end up either working on the trunk, where your coworkers will immediately see your changes, or working on a public branch, where they're likely to at least see your checkin comments, and can look at your changes if they become concerned about your direction. If you're working on a public branch, you still have the merge event, but your coworkers can't really say they're surprised when it happens, since they've been seeing your work as it progresses.

On the Fossil mailing list, you frequently see one of the core developers claiming to have finished a feature, asking for comment on their feature branch before merging it. The "guy in the room" doesn't ask for comment; he just drops his magnum opus into the trunk and says "deal with it."

> Fossil does not, your build and project environments do.

You've misunderstood my point.

Because Fossil defaults to "autosync on", you can't check in a change on a branch that has upstream changes. Fossil simply won't allow it. (There's a "force" option, but it creates a special kind of branch called a fork, which has to be resolved at some point.)

This means that if someone else changes the branch in a way that breaks the tests or whatever, Fossil strongly encourages you to pull those changes into your checkout where you can deal with it.

Git, by contrast, lets individual developers do all their checkins on a private branch, then push the whole thing to the repo they cloned from. GitHub embodies this in the pull request. There is no equivalent in Fossil, because Fossil isn't intended for federated development; it's for collaborative development.

> Nothing is stopping me but convention and what I decide to do.

This is why we have social mores and community standards of behavior. It is a good thing if the tools we use support those desirable behaviors.

Re: Fossil SCM keeps more than just your code

#85
post #84

Earlier quoted context omitted.

> Because you can trust it. Rewritable history is like maintaining your business ledger on a whiteboard. You can trust a git commit to never change. > You will make mistakes, but Git encourages you to hide them in the stash, in private branches, in changed checkin comments (git commit --amend), and in history rewrites. In its default working mode, That is not the purpose of any of those things, nor is the purpose to…

> While you shouldn't be working on multiple things, I and most other people I met, end up doing so Fossil solves that with branches. Merging a branch into the trunk is equivalent to what Git calls pushing. The difference is that everyone can see your branch, unless you use a private branch, which is more like Git. I've argued the advantages of working on a public branch already, though, so I won't repeat that here.…

> > While you shouldn't be working on multiple things, I and most other people I met, end up doing so

> Fossil solves that with branches. Merging a branch into the trunk is equivalent to what Git calls pushing.

git does the same thing, though sometimes you're working on two related things, but want to make 2 commits.

> Git's normal working model is that your checkins are local first, then only optionally pushed back to the repo you cloned from.

Because I may not own or be associated with the original repository? Are you saying I shouldn't work on code simply because I can't contact the original author?

> The "guy in the room" doesn't ask for comment; he just drops his magnum opus into the trunk and says "deal with it."

But again, if i'm working on something that necessitates breaking something while it's being fixed, you're saying to use a private branch, so what's the difference?

> Because Fossil defaults to "autosync on", you can't check in a change on a branch that has upstream changes. Fossil simply won't allow it. (There's a "force" option, but it creates a special kind of branch called a fork, which has to be resolved at some point.)

Git has the same ability to prevent forced pushes. I'm still not seeing your point. But also, none of this actually solves the issue that everything you're talking about are environmental and not inherent in the scm, i.e. testing.

> This is why we have social mores and community standards of behavior. It is a good thing if the tools we use support those desirable behaviors.

The tools shouldn't stand in your way when you want to make a coherent idea a single idea instead of multiple little, sometimes conflicting ideas.

It seems to come down to if you believe you own your code and everyone should be "allowed" to work on your code, or if you believe that anyone should be able to work on code. (centralized vs federated).

Re: Fossil SCM keeps more than just your code

#86

I'm a long time git, hg and svn user who has been using fossil every day for over a year now and find it to be reliable, quick and easy to use. It is also very hackable and I've customized the "fossil ui" to my liking. However, fossil does lacks some important features that svn, hg and git have: * Fossil does not support versioning directories. In fossil only files are first class objects. It is not possible to commi…

> Cannot perform a "fossil diff" for just a directory and its descendants

Thanks for the suggestion. I just checked in an enhancements so that this works now. https://www.fossil-scm.org/fossil/info/c46f98055cf49687

As for your other short-comings, please mention them on the fossil-users@lists.fossil-scm.org mailing list

Re: Fossil SCM keeps more than just your code

#87
post #84

Earlier quoted context omitted.

> While you shouldn't be working on multiple things, I and most other people I met, end up doing so Fossil solves that with branches. Merging a branch into the trunk is equivalent to what Git calls pushing. The difference is that everyone can see your branch, unless you use a private branch, which is more like Git. I've argued the advantages of working on a public branch already, though, so I won't repeat that here.…

> > While you shouldn't be working on multiple things, I and most other people I met, end up doing so > Fossil solves that with branches. Merging a branch into the trunk is equivalent to what Git calls pushing. git does the same thing, though sometimes you're working on two related things, but want to make 2 commits. > Git's normal working model is that your checkins are local first, then only optionally pushed back…

> I may not own or be associated with the original repository?

Then you're doing federated development, and you should continue to use Git or another tool that supports that style of development as a first-class activity.

Many years ago, I read that > 90% of all software development is in-house private stuff. (Billing systems, custom workflow management software, etc.) A big chunk of the rest is software for sale by a company. If you have federated development going on within the bounds of a single company, you've probably also got organizational silos, which is a problem.

I suspect open source and SAAS have shifted that statistic in recent years, but I'd bet most software is still developed by a group of developers who all at least know each others' names, and can at least email each other, if not buttonhole each other at the water cooler.

Other shifts in the market, such as from boxed software on retail shelves to app stores is a net zero in this discussion, since the software is still developed the same way.

> It seems to come down to...centralized vs federated

Yes. The popularity of Git has associated "DVCS" with federated development, but one of the points I'm trying to make is that you don't have to give up on the benefits of a centralized repository if you need a DVCS.

Re: Fossil SCM keeps more than just your code

#88

Earlier quoted context omitted.

Nobody wants to correct published history. Yet it still happens. Not that long ago at my office I pulled updates via git to what is to me a read only repo. I never make changes to it. Yet after pulling updates, my repo was in a state claiming I had changes to commit. The whole problem was someone who did rewrite published history. In my case the 'fix' was easy. Delete my clone and reclone. If it had been a project I…

Doing a pull like that would force a merge and would be very noticeable. Also, there are other, many other, options beyond the nuclear delete and clone.

Doing an update like that would force a merge, but there was nothing to merge. I made no changes. It was a read only (to me) repository. It should have just worked, and would have had someone else on the team not rewritten history.

I'm aware there are more options than delete and clone. My options were to spend time trying to fix my clone to which I had made no changes, or I could delete and reclone from the origin. The pragmatic solution was obvious and got me back to work more quickly than I would have otherwise been able to.

The fact that there are more options to allow fixing a broken clone are nice, but irrelevant. Had git not allowed removing published history, it would not have been an issue.

I'm all for the ability to amend history, which fossil does allow (to an extent). What it doesn't support deletion of old history followed by the creation of new history.

Re: Fossil SCM keeps more than just your code

#89

Earlier quoted context omitted.

Nobody wants to correct published history. Yet it still happens. Not that long ago at my office I pulled updates via git to what is to me a read only repo. I never make changes to it. Yet after pulling updates, my repo was in a state claiming I had changes to commit. The whole problem was someone who did rewrite published history. In my case the 'fix' was easy. Delete my clone and reclone. If it had been a project I…

You lay the burden to ensure that you can't make mistakes (rewrite history) on the developers of fossil. If, for some reason, fossil allowed to rewrite the history it would be considered a bug and promptly fixed. Yet, for some reason, you don't expect the same from the sysadmins who set up the git repository (ie. set it up so that non-fast forward updates are rejected). We can debate whether Git's default is sensible…

I'm not sure I understand what you're getting at. Sure I expect sysadmins to configure things properly. I also expect people to be human and make mistakes. My only point was that despite everyone's best intentions, it can still happen and it can be a pain to fix. If the functionality was not there, it would have been a non-issue.

Is fossil perfect? Is any software perfect? Of course not. I was merely describing a single pain point I recently experienced that would not have happened without the ability to make changes to published history.

Re: Fossil SCM keeps more than just your code

#90
post #87

Earlier quoted context omitted.

> > While you shouldn't be working on multiple things, I and most other people I met, end up doing so > Fossil solves that with branches. Merging a branch into the trunk is equivalent to what Git calls pushing. git does the same thing, though sometimes you're working on two related things, but want to make 2 commits. > Git's normal working model is that your checkins are local first, then only optionally pushed back…

> I may not own or be associated with the original repository? Then you're doing federated development, and you should continue to use Git or another tool that supports that style of development as a first-class activity. Many years ago, I read that > 90% of all software development is in-house private stuff. (Billing systems, custom workflow management software, etc.) A big chunk of the rest is software for sale by…

> Then you're doing federated development, and you should continue to use Git or another tool that supports that style of development as a first-class activity.

So, let's say I want to work on an open source project done in fossil. Let's say I don't personally know anyone associated with the project, and kind of just want to play around with it and I'm not even sure I'll be able to fix any bugs or add any useful features, or I just want to hack on an idea I had. How do I do this? Private branches? Isn't that what git offers?

Sure, if there is never an expectation of an outsider looking at or hacking on the code, then a non-federated tool might make sense, but in any situation where the code is suppose to be public, I don't understand where the advantage is (or why I would ever voluntarily learn fossil unless as employer required it).

Post reply on HN