Live data from Hacker News

Sapling: A new source control system with Git-compatible client

engineering.fb.com

461–470 of 543 posts

Re: Sapling: A new source control system with Git-compatible client

#461

Earlier quoted context omitted.

Just to clarify, I meant that I've already cloned it via git. Can I just start using sapling with it or do I need to delete the local repo and re-clone it with sapling?

You cannot just start using sl in a git repo. You need to make a Sapling clone of it. But you can make a Sapling clone of your local git repository, so you don't have to clone from the server again and you would get all your local work from your git repo. That might be the easiest way to try Sapling, so you don't have to delete your git checkout at all.

> But you can make a Sapling clone of your local git repository

Whoa I didn't even know you could do that in git. I always considered clone to mean "download stuff from this location" but now it makes more sense. Thanks I'll give that a try.

Re: Sapling: A new source control system with Git-compatible client

#462
post #50

Phabricator[0]: code review/CI solution from Facebook. My company uses it, open development has since been halted by Facebook and we're effectively on abandonware. Flow[1]: JavaScript typing system from Facebook. My company uses it, open development has since been halted by Facebook so we're effectively on abandonware. EDIT: React: Javascript framework from Facebook, my company uses it, and while it has its warts it…

Does Facebook/Meta still use Phabricator internally?

Yes

Re: Sapling: A new source control system with Git-compatible client

#463
post #439

Earlier quoted context omitted.

Not my experience. As it happens, Mercurial and Git are very similar in terms of the "mental model" required to use them: history is just a DAG, and common operations consist of navigating the history and creating/editing/re-organizing commits. But where mercurial shines with a clean, consistent and simple UX, git is a mess where storage-layer abstractions leak to the user and where single commands serve multiple unr…

I really love git for the way it has taught me so many things by being so exposed. I love that you can easily use it as p2p, via email as a server or client, as a ci/cd solution. I love that you can easily inspect its model with cat. I love that while “branches” and “tags” seem special, you could just as easily use its “notes” or even just tack on your own ref system willy-nilly. All this to say, I love git, and as a…

heh, I'm highly sympathetic of what you say :) . I also got to use git after being told how awesome it was, by people who themselves were told how awesome it was, and so on and so forth. And for many years, I was a believer, too, and probably heightened the bar of what I found acceptable as a result.

That's not to downplay git qualities, but as a social experiment in soft peer-pressure and group-thinking, I think it has value (though that's beyond my field of expertise).

I came to mercurial when, after shooting myself in the foot with git for the N-th time and going on a rant about it, someone on IRC told me to give mercurial a shot and move on with my life. I confess that TortoiseHG helped me translate my git habits into the equivalent hg commands, and the kind of history exploration that I was doing then set me up to speed with the revset way.

Then, what I found formidable was that all the knowledge about git intricacies that I had accrued and internalized with pride over the years became absolute no-brainers and irrelevant in the hg world: I remember a famous stackoverflow thread in 10 steps for merging two unrelated repos (including arcane git commands, shelling-out to sed, and non-transactional storage-level ops that would warrant a backup, as was the norm back then). How do you get history from a repo in hg? `hg pull`. How would you go about getting history from a repo (unrelated) in hg? `hg pull` as well. And thinking about it, would have git been nicely designed, it wouldn't have had to care about the difference and even less so had to expose it to the user.

Mercurial, although not perfect, really opened my eyes on what good UX design should look like.

Re: Sapling: A new source control system with Git-compatible client

#464
post #317

Earlier quoted context omitted.

I can see the behavior being useful in some cases (and not a _super_ common cause of mistakes once you learn it), but the issue for me is mainly that it's surprising and easy to get bitten by before you learn it. This describes git entire UX as well in my opinion: the underlying model is very powerful and generally pretty sound, but the API for it does a poor job of making it clear, and generally you have to make a l…

Yes, this makes sense mostly. Git is conceptually very sane and logical. But the UX is indeed (still) terrible. But a lot of people seem to complain about the complexity of the underlying concepts. That makes no sense to me as the concepts are complex because the problem at hand is complex. Also it makes no sense to me that people are constantly crying for a new tool even they have obviously issues with understanding…

I think the only potential improvement I can think of to the underlying model is that a patch-based system does seem like it would alleviate some of my pain points, but the UX for that hasn't exactly been fully figured out either; last time I tried pijul, it certainly seemed compelling feature-wise, but I wasn't able to figure out everything I wanted to do with it easily. It also would mostly just be a quality of life improvement for me at this point too; git is fully capable of doing everything I need it to, but sometimes I might have to google a bit to figure out how exactly to tell it what I want.

Re: Sapling: A new source control system with Git-compatible client

#465
post #27

To use a similar featureset but in the same Git repository you normally use, you can try my https://github.com/arxanas/git-branchless . Then, you can use your usual staging workflows if desired, or use regular Git commands directly. Its design is inspired by Sapling, and, in fact, it uses some of the same code, such as the segmented changelog implementation. Possibly some of its ideas made their way back to Meta, suc…

> conflicts are stored in commits (so rebases always succeed) Is this pushed to the remote when running as a git porcelain?

No, the CLI prevents that because the remote is unlikely to know how to interpret conflicts. In a future where the remote understands conflicts, then you'll be able to push conflicts to a remote and collaborate on the conflict resolution.

Re: Sapling: A new source control system with Git-compatible client

#466

Ah, there it is. I was wondering when this would happen. Facebook used to be involved with the Mercurial community, but it was difficult to work with them. They always wanted to do things their way, had their own intentions, and started to demand that the Mercurial project work the way that Facebook wanted. For example, they demanded that we start using Phabricator and started slowly removing sequential revisions fro…

> I really hope that git is not the final word in version control. common problem in open source. any project that gets big enough effectively stops anyone from wanting to work on an alternative, or use an alternative, due to the momentum of the large project. deviating from it makes it harder to collaborate or be productive because the big project does everything (though often poorly), everyone knows it already, and…

That's true, but that's not the whole story either. I remember not too long ago when it wasn't a big deal to jump from one VCS to another. Devs were proficient in CVS, SVN, HG, BZR, GIT as a standard, would go from mailing patches to a ML on a project to pushing to a repo on another, to zipping code and uploading it on a FTP on a third. It was the project's workflow of choice, and people would respect that.

Things really became one-sided after github started gamifying open-source contributions, and when a new generation who perhaps grew-up in a more competitive academic setting took it as an opportunity to make their resume more impressive.

We peer-pressured ourselves into collectively using a less-than-ideal tech because that was the price to pay to belong.

Re: Sapling: A new source control system with Git-compatible client

#467

Ah, there it is. I was wondering when this would happen. Facebook used to be involved with the Mercurial community, but it was difficult to work with them. They always wanted to do things their way, had their own intentions, and started to demand that the Mercurial project work the way that Facebook wanted. For example, they demanded that we start using Phabricator and started slowly removing sequential revisions fro…

> and there are still those of us who actually use Mercurial I'm certainly in that camp; and it pains me every time I have to use the hggit extension to convert a mercurial repo to git in order to work with everyone else...

Yeah, we should give a shout-out to the octobus folks for making heptapod, a Gitlab fork bringing support for mercurial repos. That brings at least one mainstream hosting option for hg repos.

Re: Sapling: A new source control system with Git-compatible client

#468

Earlier quoted context omitted.

Making committed history disappear isn't something I would call a "simple action". That's something that is almost never needed. The common case it to amend mistakes. Git makes it very easy to accomplish that . The other thing is: Git is conceptually very simple. There are almost no "esoteric" concepts. It's just a Merkle tree and some pointers to nodes on top of a very simple plain-text database. My experience with…

> The main problem with Git is its UX The UX is exactly what we're talking about, yes I have a CS background and I don't even know what a Merkle tree is without looking it up, and I'm sure after looking it up I'd have to do more digging/research before it gave me a clear mental model of how git works. I'm pretty comfortable in git at this point - I know how to navigate the space of normal-ish states - but that came a…

I would not mix up the UX and the underlying concepts.

The concepts are very simple. The UX on the other hand is at least "sub-optimal".

> I have a CS background and I don't even know what a Merkle tree is without looking it up, and I'm sure after looking it up I'd have to do more digging/research before it gave me a clear mental model of how git works. I'm pretty comfortable in git at this point - I know how to navigate the space of normal-ish states - but that came after years of exposure.

That's exactly the point that I've tried to explain: People make their life substantially more difficult because they never learn the basics. This way Git keeps to stay guess work till the end of days.

The theory behind Git may seem off-putting when words like "Merkle tree" come up. I understand that.

But actually it's something that I could explain to a 12 year old in 10 minutes…

Instead of looking things up people chose to struggle for years and years, without ever having any understanding about the "magic" that happens behind the scenes. But without the theoretical knowledge Git is not really intuitive, that's true. Coming up with a "plan" how to accomplish something becomes than a matter of black arts. But it really isn't! Git is very straight forward. Really. Just take the time to look up how it actually works. Everything (besides the weird APIs) will start making sense than.

Re: Sapling: A new source control system with Git-compatible client

#470

Ah, there it is. I was wondering when this would happen. Facebook used to be involved with the Mercurial community, but it was difficult to work with them. They always wanted to do things their way, had their own intentions, and started to demand that the Mercurial project work the way that Facebook wanted. For example, they demanded that we start using Phabricator and started slowly removing sequential revisions fro…

Mercurial has a far better user experience and mental model. The commonly used commands simply do what their names say: hd add, hg commit, hg revert, hg update, and so on.

Git is a twisty maze of operations combined under poor names (e.g. git reset) with dozens of obscure options (e.g. man git-log) and broken abstractions (e.g. what is HEAD and why does Git emit a warning whenever I check out a tag?). I often feel so sad that the entire software industry has fallen to Stockholm syndrome under Git — we think these contortions are normal, when in fact they are arcane.

Post reply on HN