4 ms·
Seems to be popular at Facebook.[1] Where I work Mercurial has been an option for some time now (no Git unfortunately) and coming from Git I must say I really
by d1zzy 6y ago
Seems to be popular at Facebook.[1]
Where I work Mercurial has been an option for some time now (no Git unfortunately) and coming from Git I must say I really love how it does some of its things:
- hg split: split a commit into as many different commits as you like using an interactive patch editor (you can fold/collapse hunks, can edit them textually, can select which lines of the hunk should be applied). It will automatically rebase all the commits on top of the commit being split, ofc
- hg histedit: a sort of "git rebase -i" where you get a list of commits that you can manipulate by reordering them, merging, dropping
- hg amend -i/commit -i: interactive commit or amending of a commit, it's using that awesome interactive patch editor I mentioned earlier to select what exactly gets committed/amended
- same for "hg shelve -i" (a sort of "git stash")
The closest thing in Git to that interactive patch editor was doing "git add -p" which is not as good.
[1] https://engineering.fb.com/2014/01/07/core-data/scaling-mercurial-at-facebook/ https://engineering.fb.com/2014/01/07/core-data/scaling-merc...
- livvelupp 6y agoWhat's the other options besides hg if it ain't git?
- Shorel 6y agoSQLite uses Fossil.
- jen20 6y agoBitKeeper is one, Fossil is another. Then there are non-DVCS systems like Subversion, Perforce, VSTS etc.
- pdw 6y agodarcs is still actively developed and it has a niche in the Haskell community. Ubuntu might still use Bazaar.
- jimbob45 6y agoSVN still works well for our company.
- MayeulC 6y agoBazaar used to be an option: http://bazaar.canonical.com/en/ http://bazaar.canonical.com/en/ Pijul is very promising: https://pijul.org/ https://pijul.org/ and https://pijul.org/manual/why_pijul.html https://pijul.org/manual/why_pijul.html Merging A in B should yield the same result as the opposite with Pijul, etc.
- klodolph 6y agoMercurial is used at Facebook, but it is heavily customized and goes through Phabricator. Just like Google uses Piper, which is “like Perforce” and goes through Critique.
- throwaway3699 6y agoNot quite. Google also has an internal mercurial tool (layered over perforce/piper), and I think it's the more popular tool at this point.
- truncate 6y agoI heavily use Magit on Emacs to edit my patches interactively. It is my favorite way to interact with Git. I think Visual Studio Code has something of its own. Would be great to have that part of the Git command line, but I guess shouldn't be hard to make one, considering its already out there on so many IDEs.
- zests 6y agoI do this using magit. I’ve never split a commit directly (I’m sure its possible) but manipulate commits at the file/hunk/line granularity which I did not think was possible with git. Same with histedit, that’s in magit as well.
- infogulch 6y agoOf course, you could do these same things with git if you just recite this or that obscure sequence of ~~shell commands~~ demonic rituals. These are common and reasonable things for vcs users to want to do, and gits ux for them is a steaming pile.
- dceddia 6y agoI've been using lazygit [0] for a lot of use cases like this and it's been great. It's a terminal UI with a bunch of shortcuts. In particular, the partial commit is awesome, as is the ease of amending. A couple others mentioned Magit which I think is similar. FWIW I learned Mercurial before I learned Git, and SVN before that. Mercurial was great. I still think its commands made more sense than the Git ones, especially coming from SVN. 0: https://github.com/jesseduffield/lazygit https://github.com/jesseduffield/lazygit
- talhah 6y agoI'm sure they use a custom version of mercurial and still probably use git as well. But that's really interesting, never knew about this. Like another other commenter mentioned I also use magit in interactive mode but I'm going to give mercurial a try now.