|
|
Log in / Subscribe / Register

Raymond: bzr is dying; Emacs needs to move

Eric S. Raymond has posted a message to emacs-devel suggesting that the project move from Bazaar (bzr) to Git. It is not the first time the idea has come up, but it would seem that Richard Stallman is not opposed to such a move as he has been in the past. Raymond writes:

The bzr version control system is dying; by most measures it is already moribund. The dev list has flatlined, most of Canonical's in-house projects have abandoned bzr for git, and one of its senior developers has written a remarkably candid assessment of why bzr failed:

http://www.stationary-traveller.eu/pages/bzr-a-retrospective.html

I urge all Emacs developers to read this, then sleep on it, then read it again - not least because I think Emacs development has fallen into some of the same traps the author decribes. But *that* is a discussion for another day; the conversation we need to have now is about escaping the gravitational pull of bzr's failure.



to post comments

Raymond: bzr is dying; Emacs needs to move

Posted Jan 2, 2014 21:45 UTC (Thu) by mdeslaur (subscriber, #55004) [Link] (46 responses)

> most of Canonical's in-house projects have abandoned bzr for git

That's quite inaccurate. Almost all Canonical projects are hosted in Launchpad in bzr trees.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 2, 2014 22:26 UTC (Thu) by rahulsundaram (subscriber, #21946) [Link] (43 responses)

Are you disputing the main point that bzr is dying?

Raymond: bzr is dying; Emacs needs to move

Posted Jan 2, 2014 23:14 UTC (Thu) by mdeslaur (subscriber, #55004) [Link] (38 responses)

It lost the popularity contest to git, as did the others. It's mature, works, and is integrated with Launchpad, which is why it's still the preferred version control software used for Canonical projects.

That being said, development has slowed down as git currently has the overwhelming popular vote. If you require market share and code churn for something to be considered "alive", then yes, I suppose it is dying.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 2, 2014 23:24 UTC (Thu) by rahulsundaram (subscriber, #21946) [Link] (36 responses)

Version control systems are popularized and rely heavily on the network effort of adoption and support by key projects, IDE's etc. This is pretty much a winner takes all game. So yes, market share is a very relevant factor and version control systems require very active maintenance. If bzr doesn't have that, it must be considered dead.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 2, 2014 23:38 UTC (Thu) by Lukehasnoname (guest, #65152) [Link] (35 responses)

The linux desktop is dead!
Windows phone is dead!

*minority product* is dead!

I really do get your point about network effect having and impact on the development and popularity of a VCS, but I think to unconditionally say the project is "dead" is over the top.

Its documentation and syntax are both superior to git, and it's used by one of the major Linux distributions for their public repositories. IIRC it's better cross-platform than git, and were I any longer a software dev I would use it before using git.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 2, 2014 23:58 UTC (Thu) by marduk (guest, #3831) [Link] (34 responses)

And there is still at least one distro still using CVS, although it's been said that this distro is also dying. Of course that's has been said for nearly a decade. Must be one of those slow, painful deaths.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 0:04 UTC (Fri) by nirbheek (subscriber, #54111) [Link] (33 responses)

I believe you're talking about Gentoo? It's not dead or dying, but I'd definitely classify it as stagnating.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 2:04 UTC (Fri) by tshow (subscriber, #6411) [Link] (32 responses)

FreeBSD is CVS, IIRC, with support tools written in Modula 3. I'm not sure which side of the argument that fact contributes to, mind you.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 5:33 UTC (Fri) by rsidd (subscriber, #2582) [Link] (30 responses)

FreeBSD moved to SVN years ago. They also have read-only git repositories, but are unlikely to officially switch over to git.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 5:36 UTC (Fri) by rsidd (subscriber, #2582) [Link]

Also, I believe the modula-3 tool you refer to is cvsup, which was dropped a while ago in favour of csup (an equivalent thing written in C), which in turn has been deprecated in favour of svnup.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 6:00 UTC (Fri) by josh (subscriber, #17465) [Link] (28 responses)

> FreeBSD moved to SVN years ago. They also have read-only git repositories, but are unlikely to officially switch over to git.

Any particular stated reason for that recalcitrance?

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 6:56 UTC (Fri) by Comet (subscriber, #11646) [Link] (27 responses)

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 8:29 UTC (Fri) by tzafrir (subscriber, #11501) [Link] (11 responses)

Odd reasoning.

Regarding the workflow: if this bothers them so much: have they tried Mercurial or (ahem) Bazaar?

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 14:40 UTC (Fri) by khim (subscriber, #9252) [Link] (10 responses)

Workflow is red herring anyway. Chromium uses git and push model, e.g. Work fine for them.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 23:16 UTC (Fri) by marcH (subscriber, #57642) [Link] (9 responses)

To use a "push to central repo" model you need in practice something on top of git like for instance Gerrit. Git alone does not really cut it

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 3:08 UTC (Sat) by tshow (subscriber, #6411) [Link] (8 responses)

We've had a pretty good run treating a bare repo on a server as the central repo with stock git, but we're a fairly small team. Maybe it's a scaling thing? What problem does gerrit solve?

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 4:43 UTC (Sat) by josh (subscriber, #17465) [Link] (7 responses)

When you have a central repository, Gerrit helps greatly with trying to manage patch workflows without having a single repository owner. In particular, Gerrit can help formalize and enforce policies like "at least one other person must approve and there must be no objections". More importantly, Gerrit lets people push to the central repository for review without having their patches merged yet, which is also helpful when enforcing pre-commit continuous integration.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 5, 2014 14:56 UTC (Sun) by tshow (subscriber, #6411) [Link] (6 responses)

Ok, I guess I can see that. For our use case we just do that with branches; people work in their own (or feature-oriented) branches, they push to the devel branch. The devel branch is used to feed the release branch, which technically could be a different repo accessible by only senior staff, but in practice isn't; we just tell everyone who's allowed to commit to release and who isn't. Advantages of a small company dev team.

I can see how gerrit might be better for a larger organization with more varying levels of trust, though I think you could still get away with just using git.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 5, 2014 23:05 UTC (Sun) by marcH (subscriber, #57642) [Link] (4 responses)

> I can see how gerrit might be better for a larger organization with more varying levels of trust, though I think you could still get away with just using git.

But then you end up developing scripts to move code around different clones (with different Unix permissions), and it ain't much fun at all.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 6, 2014 16:09 UTC (Mon) by rvfh (guest, #31018) [Link] (3 responses)

> But then you end up developing scripts to move code around different clones (with different Unix permissions), and it ain't much fun at all.

Why would you do that? You just push *your* branch(es) to the common tree and the integration team then decides which ones to merge. Seems a fairly common model with many VCS, no?

Raymond: bzr is dying; Emacs needs to move

Posted Jan 6, 2014 17:53 UTC (Mon) by marcH (subscriber, #57642) [Link] (2 responses)

Does not work if you want to actually enforce the "varying levels of trust", for instance not allowing any random, read-only guest pushing random stuff by "accident" (no matter how well intentioned it is)

Raymond: bzr is dying; Emacs needs to move

Posted Jan 8, 2014 12:20 UTC (Wed) by Tobu (subscriber, #24111) [Link] (1 responses)

gerrit, gitolite, gitano, or plain git with an update hook are all capable of enforcing per-branch permissions; there is no need to use separate repos. People who do integration can do it with git push whether or not there are multiple remote repositories. Some sites do add a bit of code so you can merge pull requests through the web, but that still works at the branch level. I suspect some git hosters actually get rid of the repo abstraction and share storage between forks.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 18, 2014 13:55 UTC (Sat) by marcH (subscriber, #57642) [Link]

> gerrit, gitolite, gitano, or plain git with an update hook are all capable of enforcing per-branch permissions; there is no need to use separate repos.

Yes of course, these all sound like better solutions (except "hand made" hooks) than separate clones... if you're given the time to set them up.

My initial and main point was and still is: soon enough git alone becomes not enough.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 6, 2014 3:30 UTC (Mon) by josh (subscriber, #17465) [Link]

It's definitely not about the varying levels of trust; Gerrit helps even if everyone has the same permissions. It's more about helping with the process, and not making developers implement that process by hand.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 8:31 UTC (Fri) by josh (subscriber, #17465) [Link] (5 responses)

Sounds like most of the problems come down to two things: a single repo containing all of FreeBSD would be terrible (probably true), and they don't seem to have a concept of how to deal with branches and independent lines of development. For the former, a pile of git repos and something like repo and gerrit would probably help. For the latter, that sounds like a workflow bug best fixed by learning better branching practices.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 14:53 UTC (Fri) by rriggs (guest, #11598) [Link] (4 responses)

Yeah, I read their reasoning and my initial reaction was "WTF? Are you really maintaining software like that?" And then I remember -- they don't teach software maintenance or version control in academia. You have to learn in it in the mean streets, doing real-life software development. And if you don't have really good mentors, you can be lead down a very, very dark path.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 15:16 UTC (Fri) by raven667 (subscriber, #5198) [Link] (3 responses)

Well and *BSD is an old project and has been using CVS for a long time so the fact that CVS/SVN match the projects culture shouldn't be a surprise.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 19:18 UTC (Fri) by dlang (guest, #313) [Link] (2 responses)

more precisely, the project culture has adapted to match the limits of CVS/SVN over a long period of time.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 21:06 UTC (Fri) by b7j0c (guest, #27559) [Link] (1 responses)

freebsd often walks to the beat of a different drummer but i wouldn't be surprised if they also adopted git at some point in the future...switching a vcs really doesn't seem like such a huge deal. most update tools in the bsd community are supported through frontends distributed by the os itself (portupgrade, pkg, etc), i doubt many end-users have any contact directly with the vcs

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 13:06 UTC (Sat) by rsidd (subscriber, #2582) [Link]

Dragonfly BSD, forked from FreeBSD about 10 years ago, does use git. It also has far fewer committers. It has some interesting features, notably the Hammer filesystem. I have used it in the pre-Hammer days and am curious to go back to it at some point.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 10:26 UTC (Fri) by cesarb (subscriber, #6266) [Link] (6 responses)

Perhaps I didn't quite wake up yet, but that page looks quite confused to me.

> Or the tree is locked while somebody is uploading from a 28.8k modem in the back of Nigeria.

Does git lock anything at all during the pack upload? I took a quick look at builtin/receive-pack.c, and it seems to only lock at the end while updating the refs, after the pack has already been fully received.

So both uploads would proceed in parallel, and any conflicts would happen only in the end, while updating the refs. The one to lose would be the slow modem, it would not block the faster users.

> Git connects to the shared repo, [...] and updates all the tags. All the tags. [...] Git then fails because the second person's version of RELENG_9 is stale. So the second person has to stop trying to commit to head [...]

From my experience with git, it will reject the update to the stale ref (not fast-forward) while allowing the update to the non-stale ref. So while you would get an error message, the push would still work. And were not that the case, you can still push a single ref.

That terminology is also non-standard (it calls branches "tags" and master "head"), which shows the writer is not used to git and is thinking in terms of some other VCS (perhaps CVS).

And the workflow:

> They've got a string of local commits that they want to publish. They do a final sync, do a rebase to make their changes relative to top-of-tree as fast as they can (before somebody else commits to head) and do a git push.

Yeah, a rebasing workflow. Instead of a less fragile "topic branch" workflow. And with git-rerere, you can do a pull-merge-push cycle quite fast, if that's what you want, so it's easier to get your topic branch in.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 15:20 UTC (Fri) by jezuch (subscriber, #52988) [Link] (5 responses)

> Perhaps I didn't quite wake up yet, but that page looks quite confused to me.

That's because it is.

> > Git connects to the shared repo, [...] and updates all the tags. All the tags.

First, that's no longer true; second, even when it was true, you could push a single branch by naming it in git push. Simple.

> > They've got a string of local commits that they want to publish. They do a final sync, do a rebase to make their changes relative to top-of-tree as fast as they can (before somebody else commits to head) and do a git push.

And that's different in Subversion how?

No need to mention more. They just don't get it ;)

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 15:44 UTC (Fri) by foom (subscriber, #14868) [Link] (4 responses)

Subversion doesn't enforce tree coherence. You only need to update again before commit if someone else touched the same file you're trying to commit.

In git, it will reject your push if anyone else touched anything at all (in the branch). Of course this is pretty easy to solve with a submit queue or something like gerrit, but it still is an extra issue that needs to be addressed when setting up git for a large number of committees.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 16:49 UTC (Fri) by SEJeff (guest, #51588) [Link] (2 responses)

Everyone makes it out to be so different. svn up != git pull.

svn up is equivalent to:
git pull --rebase

You can set that automatically on a per-repo basis in the .gitconfig:
git config branch.autosetuprebase always

Not saying I recommend that, but it does irk me when people say "git is hard" and don't really know git.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 21:06 UTC (Fri) by foom (subscriber, #14868) [Link] (1 responses)

I'm not sure how your comment is relevant. I didn't say git was hard, just different.

"svn commit" won't fail and require you to "svn up" unless someone touched the same file you're committing since you last updated.

"git push" WILL fail and require you to "git pull --rebase" (or "git pull", if you prefer), when anyone's touched any file on the branch since you've last updated.

Certainly, there is software you can use with git to allow this workflow to work well for users. It's just that you cannot setup a *plain* git repository if you have many files and a high commit rate from many different people; there will be many commit failures and it'll annoy everyone.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 15:11 UTC (Sat) by marcH (subscriber, #57642) [Link]

> "svn commit" won't fail and require you to "svn up" unless someone touched the same file you're committing since you last updated.

By the way this is the counter-part of the SVN ability to perform partial checkouts at any subdirectory level.

SVN is still ingrained with the idea that filenames are of utmost importance. One of Git's strokes of genius is to get rid of this idea. I've been supporting a fairly large team in the last few years and I noticed this is the second hardest thing for people to "un-learn".

The hardest thing to un-learn is how git branches have basically nothing in common with centralized branches - even when they can emulate them.

Un-learning is generally very hard and it's a fascinating process to observe. Of course it would be so much easier to unlearn if a little bit of thought had went into naming git objects and commands better - too late I'm afraid. For instance git branches should have just been named "heads".

If you ever need to become git support or advocate, this is the best page to get prepared:
http://steveko.wordpress.com/2012/02/24/10-things-i-hate-...

Raymond: bzr is dying; Emacs needs to move

Posted Jan 7, 2014 9:00 UTC (Tue) by jezuch (subscriber, #52988) [Link]

> Subversion doesn't enforce tree coherence. You only need to update again before commit if someone else touched the same file you're trying to commit.

Yes, that would make a difference. I was so long since I last used SVN that I completely forgot what it's actually like :)

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 18:11 UTC (Fri) by tshow (subscriber, #6411) [Link]

That "problems with git" page looks a hell of a lot like the kind of justifications I see from engineers when the underlying problem is "Just Don't Wanna Do That".

Well, maybe SVN will work for them; if all they really want is CVS with atomic checkins, it will kind of do the job. Maybe some of the recent releases have fixed the scaling problems, and the SVN ability to check out subtrees is a nice feature I miss in git.

We wound up abandoning SVN in 2010 at the end of a major project. Between frustration at all the times we'd been bitten by misfeatures and the horrible performance scaling as project sizes grow, we were ready for something else. Our repository was ~2G on disk, on a dedicated (decently fast) box running nothing but SVN and FreeBSD, and a fresh checkout over gigabit LAN took two hours. Remote checkouts via cable modem took between eight and twelve *hours*, on a link that could pull a 2G file from the same server via scp in under two hours.

Also, SVN is *really* annoying when it comes to case sensitivity in filenames. A lot of the work we were doing was on Windows (ie: case preserving but not case sensitive filenames), but for consoles (which had case sensitive filesystems), and if someone accidentally checked in an asset with improper casing in the filename it was a Herculean (bordering on Sysyphian) task to fix it. You pretty much had to check the repo out on a linux box to fix the file naming problem, then manually delete the file from every client machine and sync. A couple of times we actually had to blow the repo off all the client machines and do a clean checkout.

Which we also had to do a few times when client repos got corrupted, something that happened with depressing frequency. I can't remember how we were doing it (it's been a few years, but I *think* it involved trying to revert a change by winding a file back to an earlier version and then committing it as head), but there was some simple mis-step you could make during the commit process that would trash your local repo.

We went to git, and haven't looked back. We'd considered git, bzr, mercurial, darcs and a few others at the time, all of them were contenders, but we settled on git at least in part because it seemed like it had momentum and worked (arguably) on all the platforms we needed it to. IIRC we didn't go darcs because it looked too much like one guy's masters thesis with all that implies. We didn't go mercurial because git looked less complex to set up; mercurial required python, which would have been annoying on some of the versions of windows we were forced to run by various console dev environments.

We didn't go bzr partly because of the python thing again, and because it seemed at the time like the project leadership was stuck in a classic relevance death spiral. We see those in games as well; it looks something like this:

while(project_isnt_getting_mindshare)
{
direction = chose_fad(rand());
duration = WEEKS * (rand() % 8);
run_headlong(direction, duration);
lose_faith_but_keep_features(direction);
}

I've never seen a relevance death spiral end well.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 21:53 UTC (Sat) by juliank (guest, #45896) [Link]

Come on, the real reason is that subversion is Apache licensed and git is GPL...

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 5:34 UTC (Fri) by eru (subscriber, #2753) [Link]

FreeBSD is CVS

Actually, nowadays they use Subversion (see http://svnweb.freebsd.org/).

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 0:57 UTC (Fri) by drag (guest, #31333) [Link]

> If you require market share and code churn for something to be considered "alive", then yes, I suppose it is dying.

I think the contention is that people are not choosing to use bzr when git can be used and that development of bzr has largely died off and that is why it's 'dying'.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 7:04 UTC (Fri) by jamesh (guest, #1159) [Link] (1 responses)

Whether you agree or disagree with the main point, saying that most Canonical projects have abandoned bzr is simply not true.

You might argue that it is irrelevant to the discussion, but that is different.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 7:34 UTC (Fri) by rahulsundaram (subscriber, #21946) [Link]

Sure but I don't particularly care about what any one company does so I wanted to focus on the primary aspect of the discussion. The health and sustainability of a project.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 5, 2014 16:17 UTC (Sun) by jzb (editor, #7867) [Link] (1 responses)

We really need a new way to discuss the status of projects/technology. "Dead," "dying," etc. are not really very useful or accurate when applied to these discussions, IMO. As soon as someone declares that "project XYZ is [dead|dying]" it becomes a semantic debate about a project's signs of life rather than a useful discussion about the project's status.

I think it'd be accurate to say that bzr has reached a state of technical maturity but failed to achieve critical mass. Unless/until something new comes along, git has essentially "won" and projects that utilize bzr as primary/only source control are at best making developers' lives more complicated, and at worst discouraging new developers from contributing because they don't want to fuss with a second version control system.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 5, 2014 17:55 UTC (Sun) by rahulsundaram (subscriber, #21946) [Link]

" I think it'd be accurate to say that bzr has reached a state of technical maturity but failed to achieve critical mass. "

I am not sure that is any more accurate since the prior discussion about emacs switching to git happened because bzr had major bugs that were affecting emacs. While those particular issues have been resolved, it doesn't appear that one can honestly say that bzr can be in a low maintenance mode now (ie) no major bugs open. IMO, vcs really requires active maintenance. Otherwise, I wouldn't trust any of my data with it even if the UI is better.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 18:55 UTC (Fri) by b7j0c (guest, #27559) [Link] (1 responses)

are you implying that launchpad is alive? apart from canonical, i see practically no use of launchpad at all

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 5:40 UTC (Sat) by apoelstra (subscriber, #75205) [Link]

The gEDA project uses Launchpad for bug tracking. It's easy enough to use, works with openID, and our git commit hooks are able to fiddle with it. (These were the work of Peter Clifton, I have no idea what was involved.)

At the time of the switch (from Sourceforge :(), IIRC github did not have a bug tracker. At least, I had never seen somebody using github as a bug tracker. It was true then (and probably still is now) that the open source trackers are a PITA to set up.

Switching bug trackers is a nontrivial thing to do, and there was a nontrivial window of time when Launchpad was the best option out there. So I'd guess there are a lot of packages using it.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 0:25 UTC (Fri) by ncm (guest, #165) [Link] (3 responses)

When we find ESR a lone voice of sanity, *something* has gone seriously wrong: maybe even what he says, but likely others, too, that only by being wrong have enabled him to be right.

It's like fixing bugs. If the comment disagrees with the code, both are wrong, and there's another bug or two less than three lines away.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 3:10 UTC (Fri) by coriordan (guest, #7544) [Link] (2 responses)

I think he just has a knack for proposing things that were about to happen anyway :-)

Abandoning Bzr was discussed on emacs-devel a few months ago and RMS's only argument for keeping it was that Bzr is a GNU project, and it is maintained until thoroughly proven otherwise, and so they should give the developers a little more time to show signs of responsiveness to bug reports.

It was predictable that next proposal to abandon Bzr was likely to succeed. And hey presto, ESR appears and proposes it!

Nice of him to offer to do the migration work.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 3:31 UTC (Fri) by rahulsundaram (subscriber, #21946) [Link] (1 responses)

The migration is already done and a git mirror already exists though.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 3:32 UTC (Fri) by rahulsundaram (subscriber, #21946) [Link]

Pressed enter too quickly. The git mirror has to be recognized as the official mirror for the migration to be considered complete however.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 4:03 UTC (Fri) by dfsmith (guest, #20302) [Link] (1 responses)

What baffles me most is that Emacs' VCS is not written in elisp.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 9:35 UTC (Fri) by dakas (guest, #88146) [Link]

PVCS, Emacs version control integration mechanism, is written in Elisp. Emacs is not an application suite, it is a desktop as well as a text-centric rapid prototyping platform. Its main purpose is being glue: one editor to bring them all and in the keymaps bind them.

And yes, its uniform interface into all of the major version control system makes working with VCS quite more pleasant.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 5:00 UTC (Fri) by xnox (subscriber, #63320) [Link] (9 responses)

bzr & launchpad are alive. And the unique integration that those offer and use cases they enable together are still superior to those available via git coupled tools. Unlike Emacs, Canonical's in-house projects and Ubuntu do you use cross-project & distribution bug tracking, associating branches/series/merge-proposals with bugs and blueprints, building packages from bzr branches, merging packaging from debian using bzr (all ubuntu & debian packaging is imported into per-series branches in Launchpad), use embargoed/private features for CVE/Security bugs/branches/merges, automatic translation imports and exports to/from bzr branches, and so on and so forth. All of these features are used on daily basis by Ubuntu Developers, Canonical and related parties. All of these features did grow over time and started from way before git existed. Similarly non-Canonical projects that use bzr with launchpad also rely on the features offered by the integration between the two.

But Emacs is not using Launchpad... and hardly any Emacs developers host their personal branches there.

All should go well, after technical points on converting to git are solved e.g.: converting history to git, finding large enough amounts of RAM to repack repository, and hosting providers that don't timeout with large packs, as well as developers with little RAM (e.g. 512MB) prepared to compensate with disk-space, doing conversion for unmerged branches/patches during transition period, etc.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 5:16 UTC (Fri) by jspaleta (subscriber, #50639) [Link] (5 responses)

Yes, its unfortunate that launchpad is as deeply integrated with bzr as it is. A git enabled launchpad would make for a very interesting service. I wonder if Linaro would have continued to use launchpad for integration work instead of moving to the cards system it uses now if launchpad as a service layered over git instead of bzr.

-jef

Moving off Launchpad

Posted Jan 3, 2014 7:29 UTC (Fri) by alex (subscriber, #1355) [Link]

I suspect the move to JIRA was driven more by the needs of the organisation to better organise and track work from a disparate set of member organisations. AIUI Linaro's use of Launchpad was more driven by the fact that a lot of early Linaro engineers were from Canonical (being one of the early members). As the organisation has grown it's been building out it's own engineering infrastructure.

That said I think a lot of it is driven by what the engineers want. Since I joined I've just been pushing work up onto github because I already had a tree there. My collaborators have been on github and in Linaro's internal git server. Our particular upstream hosts it's own git server. Of course git is the common distributed factor here ;-)

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 9:23 UTC (Fri) by zyga (subscriber, #81533) [Link] (3 responses)

Linaro moved to git simply because having two is worse than having one system and we did use git from day one for many things. Interestingly the only relevant piece of Linaro that really used bzr was LAVA, everything else was in git all the time.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 13:19 UTC (Fri) by jspaleta (subscriber, #50639) [Link] (2 responses)

you missed my point it seems... my point is that I think launchpad would have been a better service if it was not deeply wedded to bzr and could be transitioned to use git repositories internally. I do not believe launchpad benefits on its deep reliance on bzr. And I find it unfortunate that with bzr development, waning, launchpad is going to be stuck relying on it with no way for Canonical or Ubuntu to cleanly transition to using git for its packaging and integration work. Which is a really unfortunate situation for launchpad and Ubuntu really.

Linaro is like a lot of projects that need to touch kernel level or kernel plumbin tooling... git is a primary development tool for them now..regardless of what the ubuntu packaging and build tooling is. Ubuntu kernel team uses git too.... because they need to work with the kernel code. That's not indispute. I'm not even suggesting they used bzr. What I am saying is a lot of Launchpad's value in things like the blueprinting and the bug tracking and code review, are devalued because Launchpad can't integrate directly with git workflows. And I hold up Linaro as a project that could have, and should have been able to leverage Launchpad's valueadd... except for the fact a lot of that valueadd is built on top of bzr instead of being built around git.

What I'm asking people to imagine is the alternative universe where launchpad as a service was architectured around git for its internal processes for dealing with the code and builds and CI and what not...instead of bzr. I think that gitified launchpad would be a much more valuable service and would have maybe had commercial service traction as a business model. Maybe even have seen external groups try to replicate a service using the codebase after it was opened up. I think bzr actually has held launchpad back as service for a lot of development teams.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 13:36 UTC (Fri) by zyga (subscriber, #81533) [Link]

I don't dispute that point, launchpad with git support would be pretty awesome IMHO. What I was trying to say is, that, IMHO Linaro's decision to abandon Launchpad was *probably* not influenced by bzr vs git much. Having no insight into the actual decision I think it's "business factors" that ultimately decided.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 21:11 UTC (Fri) by b7j0c (guest, #27559) [Link]

you're right, but canonical as an organization seems to pride itself on their-way-or-the-highway....they'll be using launchpad long after its sell-by date, mostly because it was internally sourced and promoted as a business solution

the only thing github is missing is a competitive bug-tracker. i'm surprised they don't just hire two or three developers and tell them to spend a year building something competitive (it wouldn't even have to be the best)

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 20:30 UTC (Fri) by nteon (subscriber, #53899) [Link] (2 responses)

It is amusing that you mention RAM. About a year ago I tried to clone/branch a copy of MySQL's bzr repository, and was unable to on my machine with 16GB of RAM [1]. There is a 4(!) year old bug, still open about the issue. A proposed workaround is to add additional swap. I ended up finding a git clone of MySQL somewhere, it cloned like a charm.

It is a shame, because bzr had some nice features like an easily embeddable python API.

https://bugs.launchpad.net/bzr/+bug/367545

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 17:43 UTC (Sat) by xnox (subscriber, #63320) [Link] (1 responses)

I have been in the cases of low RAM operations, and there are ways around it. E.g. incremental branching, lightweight checkouts (no history), bound-checkouts (mixture of the two). It's not so bad when doing incremental checkout (e.g. bzr branch -r1000, bzr pull -r2000, etc.) which is what all the git -> bzr mirroring does on launchpad.

At least there are ways to work with low RAM in bzr.

I've also been in situations with low RAM with Git, and the solution there is more or less, unpack packs into objects and never repack (as it will fail with out of memory), don't use low RAM server for serving git repositories, and if you must repack them on beefy servers and rsync.

Correct me if I'm wrong, but svn is still the most memory efficient VCS of them all, granted it's missing a leading "D" in the VCS =))))

Raymond: bzr is dying; Emacs needs to move

Posted Jan 6, 2014 2:41 UTC (Mon) by daniels (subscriber, #16193) [Link]

16GB really isn't 'low RAM'.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 12:10 UTC (Fri) by mleigh (guest, #94751) [Link] (1 responses)

To me, one of the most telling things about bzr is that there seems to be only a few people who will come out in support of it, either in this thread or the ones on the GNU lists.

And from a quick search it appears that both of the supporters here are Canonical employees[1][2]. Not that it should entirely diminish their arguments, but it definitely feels like it colors them to me.

It often feels like the same thing happens when bzr/launchpad topics are raised anywhere else too. For example, during the Python VCS migration the Python committers pushing for bzr were Canonical employees(such as Barry Warsaw[3]). And when people mention one of the "external" projects hosted on launchpad a cursory glance often shows a Canonical employee is/was maintainer; GNU mailman with Warsaw, Inkscape with Bryce Harrington, &c

Perhaps I can't see the forest for the trees, but beyond Canonical employees I'm not sure that bzr was ever truly alive.

1. Dimitri John Ledkov - https://github.com/xnox
2. Marc Deslauriers - www.linkedin.com/pub/dir/Marc/Deslauriers‎
3. https://wiki.ubuntu.com/BarryWarsaw
4. https://launchpad.net/~bryce

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 17:55 UTC (Sat) by xnox (subscriber, #63320) [Link]

Well, those who have expertise in a particular tool also see its usefulness, and have deeper understanding of its limitations and excellence.

Version control systems, just like all buildsystems, suck and suck a lot. And all of them have unique suckage and unique benefits. Thankfully I don't care that much and still rely on the original linux backup strategy [1].

Professionally I do OS development, thus packaging integration and helpers are of most interest to me. Out of those, i'd rank svn-/git-buildpackage the lowest, bzr-bd/dgit very close to second place, and OpenSuse/OpenBuildService osc tool the highest. Osc really does everything a packager needs, although it's unlikely to be ported/integrated into Debian OS development. dgit does a lot of things right, and closely matches OSC in many key aspects.

And it will be exciting times for Ubuntu Development, if dgit, git, and launchpad get integrated together.

[1] upload tarball to an ftp server and let the world mirror it

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 16:14 UTC (Fri) by FranTaylor (guest, #80190) [Link] (18 responses)

What does the source code control system have to do with the project?

Does the choice of source code control system affect the algorithms or code strategies or debugging or any other part of the actual product?

Will a new source code control system add any quality to the product?

Is there any calculation of the ROI on the effort involved in making any switch?

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 16:51 UTC (Fri) by raven667 (subscriber, #5198) [Link]

While I'm afraid you might be asking these questions sarcastically they are good questions to ask.

> What does the source code control system have to do with the project?

The workflow of the source control system is going to reflect in the workflow of how patches are submitted, reviewed and applied, different source control systems drive different review procedures and there is a difference to contributors on whether there is central control or decentralized control.

> Does the choice of source code control system affect the algorithms or code strategies or debugging or any other part of the actual product?

Ease of branching and merging is going to affect whether people can make and share speculative development branches or whether such branches are too risky and might pollute the change record.

> Will a new source code control system add any quality to the product?

Each source control system has a different ecosystem of tools around it and those tools provide value and can help enhance quality, so picking a source control for the health of its tool ecosystem is a good decision.

> Is there any calculation of the ROI on the effort involved in making any switch?

That seems to be what they are doing on-list by talking about these decisions. The ROI doesn't have to be extremely high as there are a lot of conversion utilities between source control systems so the migration path is often not that difficult. Right now git has a huge ecosystem of tools that have sprung up around it (heck even competing vendors like Apple and Microsoft support git in their development tools), a large number of people who prefer it and are familiar with it, while bzr doesn't have much beyond Launchpad and Canonical projects. You can have the best tool in the world but having a healthy ecosystem is better.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 16:52 UTC (Fri) by tshow (subscriber, #6411) [Link] (10 responses)

I presume the argument here is that potential contributors will take the odd/anachronistic VCS choice as indicative of deeper problems in a project or its management. For a (significantly) more severe example, imagine your reaction if you were considering contributing to a project and the developer page said "step 1: install Microsoft Visual SourceSafe"...

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 18:48 UTC (Fri) by tzafrir (subscriber, #11501) [Link] (3 responses)

What do you think about http://sqlite.org/download.html#cvs ?

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 20:20 UTC (Fri) by tshow (subscriber, #6411) [Link]

Is there an actual cvs link on that page? At the bottom it says they're doing distribution via fossil.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 21:05 UTC (Fri) by jonabbey (guest, #2736) [Link] (1 responses)

Fossil is pretty idiosyncratic, but it's the sort of thing you'd expect the developer of SQLite to come up with. SQLite is an important enough project (and a rigorously managed, centralized project) that it can pull developers to use Fossil when needed.

Emacs is different, as it's extendable by almost anyone, and reducing the barrier to entry as low as possible is worthwhile to get as many single-patch developers to participate.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 17:57 UTC (Sat) by xnox (subscriber, #63320) [Link]

Fossil.... what a telling choice of a project name =)

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 21:03 UTC (Fri) by b7j0c (guest, #27559) [Link] (5 responses)

its a risk with any minority technology

just last night i was interested in learning about apache spark (a potential successor to hadoop)...as soon as i got to the part where they said it was all written in scala, i tuned out. not that scala is necessarily bad (i don't know if it is necessarily good either), but it is a minority language i haven't bothered to learn and probably wouldn't bother learning merely to learn more about spark.

i think launchpad and bzr are probably seen in the same light - minority technologies that add little yet are probably seen as barriers to entry. there are often valid reasons to use minority technologies...but they seem to be rare and difficult to justify

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 22:00 UTC (Sat) by juliank (guest, #45896) [Link]

Scala is much better than Java.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 5, 2014 12:11 UTC (Sun) by simlo (guest, #10866) [Link] (2 responses)

There is a huge difference between basing on "minority technology", which is considered "old fashioned" and is on decline, compared to choosing something, which is new and might (or might not) become main stream.

And if nobody does that later, we will newer see new technology. Somebody have to be first movers.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 5, 2014 12:25 UTC (Sun) by dlang (guest, #313) [Link] (1 responses)

don't forget that all of Linux is the result of ignoring the bashing of "old fashioned" technology, think of Tannenbaum's response to Linus when Linux was announced and bashing it for being "old fashioned" and using a monolithic kernel instead of a "modern" microkernel.

new isn't always better, even if it seems to have some attractive capabilities.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 16, 2014 8:19 UTC (Thu) by dvdeug (guest, #10998) [Link]

New isn't always better, but if no one tries out the new stuff, we'll never get any new stuff. In the case of Linux, had Linux been built as an microkernel, it would probably have followed the course of Windows NT, starting out as a sort-of-microkernel and as it evolved it would have become less micro.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 17, 2014 22:34 UTC (Fri) by dvdeug (guest, #10998) [Link]

How can you say that they're "minority technologies that add little" if you haven't bothered learning about them? At a certain point, you join the ranks of Fortran and Cobol programmers who dismiss all those new-fangled flash in the pan languages.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 19:23 UTC (Fri) by dlang (guest, #313) [Link]

> What does the source code control system have to do with the project?

If you force people to learn a new source code control system to contribute to the project, you significantly raise the bar and the result is a reduction in the number of new contributors that you will get.

When bzr was a fairly common choice for projects, this could be shrugged off. But now that git has become so popular, projects that use other source code control systems are at a disadvantage. The less common their system the more of a disadvantage they have.

And when they are using a system that has a reputation for having failed (even if it's not true), that makes potential developers question the decision making of the project (if they made a bad decision on this, what else are they doing wrong. do I really want to get involved in this mess?)

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 23:29 UTC (Fri) by marcH (subscriber, #57642) [Link] (4 responses)

> Will a new source code control system add any quality to the product?

OMG... when will universities finally catch up with the industry and start teaching not just computer "science" but also basic software _engineering_?

(thanks raven for the effort put in a much more constructive answer)

Software Engineering

Posted Jan 4, 2014 14:33 UTC (Sat) by tialaramex (subscriber, #21167) [Link] (3 responses)

To be fair these are related but separate subjects, and there's no reason why a particular university shouldn't choose to offer one, or the other or both. For years Oxford's "Computer Science" didn't even involve use of a computer much of the time. As with any academic discipline there will be people who feel that the people from the other discipline are just doing the same thing they do, but in a half-arsed manner. It's easy to find Physicists who see Chemistry as a crude approximation of Physics, or say, Modern Language academics who think they're doing a perfectly good job of understanding how language works without any need for Linguists... don't make their mistake.

The university I attended offered both Computer Science and Software Engineering, with some lectures in common. The engineering course, if you took the right options and stayed for four years, could result in a recognised engineering qualification, fast-tracking you to chartered status if, very rarely for our industry, you desired such a charter. I agree that probably the industry could do with a few _more_ actual engineers, but IMHO it'd be a mistake to think the best way to get there is alter the Computer Science courses.

Software Engineering

Posted Jan 4, 2014 14:59 UTC (Sat) by marcH (subscriber, #57642) [Link]

> To be fair these are related but separate subjects, [...] I agree that probably the industry could do with a few _more_ actual engineers, but IMHO it'd be a mistake to think the best way to get there is alter the Computer Science courses.

Sure: there is a dozen of (public...) jobs out there for "pure", Oxford-style computer scientists. Nevertheless there are thousands of "Computer Science" students. Which is why in practice everyone keeps confusing Computer Science and Software Engineering. Professors teach Computer Science because it is more fun for them and does not require them dirtying their hands, deceiving businesses looking for Software Engineers.

By the way: any half-decent software engineer should know some Computer Science while any half-decent computer scientist should know some Engineering, too.

Software Engineering

Posted Jan 6, 2014 10:30 UTC (Mon) by randomguy3 (subscriber, #71063) [Link]

> To be fair these are related but separate subjects, and there's no reason why a particular university shouldn't choose to offer one, or the other or both. For years Oxford's "Computer Science" didn't even involve use of a computer much of the time.

Oxford does, in fact, have a semi-independent Software Engineering group[0] that offers its own courses. It only offers postgrad degrees, rather than undergrad ones, but it reinforces the distinction you noted.

[0] https://www.cs.ox.ac.uk/softeng/

Software Engineering

Posted Jan 13, 2014 23:36 UTC (Mon) by BenHutchings (subscriber, #37955) [Link]

For years Oxford's "Computer Science" didn't even involve use of a computer much of the time.

They also used to call it 'Computation', not 'Computer Science'. When I was there, working on paper was preferable to using the lab with aging Sun workstations, those horrible optical mice and dim fluorescent lights! At least for some courses I could run the language implementation on my own computer.

The university I attended offered both Computer Science and Software Engineering, with some lectures in common.

I seem to remember that Oxford offered Software Engineering as well, possibly as an option in the Engineering degree.

I agree that probably the industry could do with a few _more_ actual engineers, but IMHO it'd be a mistake to think the best way to get there is alter the Computer Science courses.

I feel I would have benefitted from a little engineering tuition before going out into the real world. For example, while I appreciate having been taught how to reason about the correctness of a function, formal proof has never been feasible for whole programs so I still need to know something about writing tests.

Nonstandard version control systems

Posted Jan 3, 2014 18:45 UTC (Fri) by rleigh (guest, #14622) [Link]

Using an uncommon VCS can definitely hinder a project. It imposes both technical and cultural barriers to potential contributors, and can easily make the difference between someone beginning to contribute and deciding that it's not worth the hassle.

If you're a git user who has never used bzr, it's quite an alien experience. I once tried checking out a bzr repo (which was Emacs FWIW), and was quite shocked at the slowness, and also at difficulties such as local branching etc. The latter is purely a familiarity issue, but still a barrier. I had similar problems with hg, but to a lesser extent. I now have the same issues when I need to go back to using CVS or SVN: I might have been quite skilled with them 10 to 6 years ago, respectively, but today after using git pretty much exclusively for everything for the past six years, it does take a while to refamiliarise oneself with their quirks and limitations.

In the case of Emacs, I think Eric is entirely correct that using bzr will make it harder to attract contributors. Mind you, git was in exactly the same situation at the beginning--it took it many years to reach the existing level of penetration and become "the default". But while being used by Canonical has certainly pushed bzr, it just hasn't reached the same point, and at this point it's an also-ran which is certainly something worth migrating away from. I had to do the same for all my GNU Arch repos back in the day, and doubtless something will replace git in years to come!

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 19:02 UTC (Fri) by b7j0c (guest, #27559) [Link] (104 responses)

so much discussion over something that shouldn't even be controversial. git is just better than bzr. i used bzr for years and can't think of a single way it is better than git. git also is more popular. where is the downside to this? better yet, why keep bzr alive at all? its inferior to git and hg and there seems to be practically no downside to bzr going away entirely

at least darcs brought something unique to the table...bzr is just a slower, crappier vcs

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 19:46 UTC (Fri) by kreijack (guest, #43513) [Link] (20 responses)

Disclaimer: in the past I was involved in the bazaar developing.

I don't think that bazaar is so inferior to git. I remember a cleaner interface. It very easy to handle different branches sharing the same repository at the same time (i.e. it is not necessary to switch the working tree).

It tracks the file renaming, instead git tracks the contents moving between files on the basis of some heuristics... I prefer the former method.

I have to agree that it is slow, and not suitable for larger repos. But to be honestly I always thought that are git and mercurial incredibly fast. When bazaar was born, cvs and subversion are the _de_facto_ version control software. Bazaar (as mercurial, bitkeeper and git) were a big leap in the future.

Now I am used to work with git: has a lot of features and it is incredibly fast. But time to time I remember when I was starting to work with bazaar....

GB

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 1:57 UTC (Sat) by mathstuf (subscriber, #69389) [Link] (19 responses)

> It tracks the file renaming, instead git tracks the contents moving between files on the basis of some heuristics... I prefer the former method.

Sure, but then you lose things like `git blame -w -MC -L 20,29 -- moved-file.c` to get the lineage of just 10 lines in the file ignoring whitespace changes. It will even show you if the content was *copied* from somewhere else. At least "cheaply". Git is faster than bzr at doing so (or so I assume) and it can answer these questions using the same techniques. There are multiple mails of Linus explaining why git is doing the right thing here[1].

[1]https://www.mail-archive.com/git@vger.kernel.org/msg03711...

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 4:06 UTC (Sat) by bronson (subscriber, #4806) [Link] (14 responses)

You also lose reasonable behavior when splitting, joining, or copying files. When programming I split source files quite a bit more than I rename them.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 11:40 UTC (Sat) by nix (subscriber, #2304) [Link] (13 responses)

Quite. This does lead to amusing consequences when dealing with a project with lots of small files (e.g. testcases) that are mostly copyright notices, though: git is inclined to say that you have created a new file by copying a random old one and deleting everything but the unvarying copyright notice :)

Curiously, 'git diff --stat' often shows a diff and a diffstat that disagree about the origins of files in this situation. I'm sure there's a reason for this that I haven't bothered to track down, perhaps different rename-detection heuristics or different defaults for them for the diff versus the diffstat.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 13:26 UTC (Sat) by mathstuf (subscriber, #69389) [Link] (4 responses)

I don't see a huge issue with this. Why is it bad to see that a new test case is basically the same as another with a few lines changed?

The diff --stat versus diffstat sounds like a bug. Can you point to an example?

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 15:09 UTC (Sat) by khim (subscriber, #9252) [Link] (1 responses)

He means sutuation where new testcases have nothing to do with old ones at all. If you have 20 lines copyright disclamer at the top and then 5-10 lines of test and you add new, totally unrelated, testcase which have the same disclamer and totally different 5-10 lines of test then git often reports that you've copied file, removed old test and added new one on top of it.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 23:41 UTC (Sat) by dlang (guest, #313) [Link]

well, if you are copying most of the text of the file (all the disclaimer stuff) git's report that you copied a file and changed a few lines is actually closer to correct than the claim that the file was created from scratch.

the only 'error' is that the file you are copying is a file that contains the disclaimer text (and nothing else), but since that's probably not something that you have git tracking, it's finding the best match it can. I'll bet that if you had it tracking a placeholder file that contained only the disclaimer, it would correctly be reporting that you copied that file and added to it.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 22:40 UTC (Sat) by nix (subscriber, #2304) [Link] (1 responses)

As khim points out, the problem is when the testcases are much smaller than their invariant copyright header.

As for the diffstat versus diff issue, I've been meaning to replicate it in a repo I can share. Next time it happens (probably the next time I add a testcase) I'll look into it.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 22:47 UTC (Sat) by mathstuf (subscriber, #69389) [Link]

Ah. I tend to group tests into categories for each file then each function is a single case to avoid an explosion of test binaries (the first argument is the test to run), so my test files tend to dwarf the headers. Test data files are tiny, but I also don't put headers on those.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 21:27 UTC (Sat) by cesarb (subscriber, #6266) [Link] (7 responses)

> git is inclined to say that you have created a new file by copying a random old one and deleting everything but the unvarying copyright notice :)

You mean you don't create a new file by opening a random old one and copying the unvarying lines at the top? :)

(Things like the copyright notice, common includes, "from __future__ import", vim/emacs modelines...)

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 22:45 UTC (Sat) by nix (subscriber, #2304) [Link] (6 responses)

Nah, Emacs has better ways than crude copy-and-paste :) that sort of invariant stuff comes from skeletons, not from some random other file. (This also means I never get e.g. the copyright date wrong, nor forget to update it.)

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 23:48 UTC (Sat) by dlang (guest, #313) [Link] (5 responses)

so you really are copying this data from another file.

It's just that this other file is a EMACS config file that you don't tell git anything about instead of a file that git knows about.

so since you didn't tell git everything, it's guess is wrong. GIGO

however, even if git does guess the wrong source of the data and claims that something is a copy of the wrong file, does this really hurt anything? the resulting file still has the correct content. The only thing that can be misleading is if you are looking for the real source of the disclaimer text, and since that's something you have't told git about, it's going to give you the wrong answer no matter what.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 6, 2014 13:23 UTC (Mon) by nix (subscriber, #2304) [Link] (4 responses)

Of course it doesn't hurt anything: it's not like git's guess as to the source of this file is used for anything (other than merges, and this guess doesn't harm merges). It's just amusingly wrong. :)

Raymond: bzr is dying; Emacs needs to move

Posted Jan 6, 2014 13:40 UTC (Mon) by dlang (guest, #313) [Link]

the reason that I was pushing on the 'what does it hurt' viewpoint is that a lot of people seem to get really hung up on this point.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 6, 2014 14:00 UTC (Mon) by andresfreund (subscriber, #69562) [Link] (2 responses)

Doesn't the "moved content" heuristic only trigger if you actually also remove content from a file in the same changeset you add it to some other file?
So with the example used somewhere upthread, you'd also need to delete a test at the same time.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 6, 2014 14:13 UTC (Mon) by mathstuf (subscriber, #69389) [Link]

The thing is that git could detect that if it was wanted. If you explicitly store that information, it needs to be known at commit time with the version of the tool you have on hand. Future versions of git can construct such information with (likely) smaller amounts of code (it's probably too expensive though).

Raymond: bzr is dying; Emacs needs to move

Posted Jan 6, 2014 17:18 UTC (Mon) by dlang (guest, #313) [Link]

git is detecting copying of data rather than moving data. And it only does this if you ask it to (pass it the -m option when creating a patch for example)

If a new file is substantially like an old file, it creates a patch of 'copy file X and then make these changes' rather than 'create this file from scratch'

When asking it where the contents of a file came from, when it gets back to where the file was created, it looks to see if the file was probably copied or not and if it thinks the file was copied, it goes back through the other file looking for who comitted it.

For boilerplate it's likely to guess the wrong file, but it's also unlikely to matter.

For actual code, you are unlikely to have substantially the same code in multiple places to start with (or if you do, you should probably re-factor things) and so the chances of it finding the wrong thing are pretty low.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 14:39 UTC (Sat) by kreijack (guest, #43513) [Link] (3 responses)

IIRC Linus described git as a "content tracker". Its job is to track the content changing (and moving between files).
To do so it has to implement some heuristics. Probably it works well, however I prefer a stupid tool (like bzr) which tracks the content per filename basis, instead of a smarter tool like git that tracks the content of the repository.
It is a my feeling on the basis of my experience: often a smart tool is ... too smart.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 15:15 UTC (Sat) by khim (subscriber, #9252) [Link]

That's true but the question is: which tool here is “smart”? Git which just keeps the information about state of a tree and does not include any heuristics in it's algorithm core (all the heuristics are used for empehemral purposes: if they fail you can always redo what you are doing, success or failure of heuristic in git is never data-losing thing) or bzr (which keeps tons of metainformation and where loss or corruption of said metainformation can be serious problem)

Raymond: bzr is dying; Emacs needs to move

Posted Jan 5, 2014 20:08 UTC (Sun) by bronson (subscriber, #4806) [Link]

This should make you happy: man git
NAME

       git - the stupid content tracker

Raymond: bzr is dying; Emacs needs to move

Posted Jan 6, 2014 14:56 UTC (Mon) by vonbrand (guest, #4458) [Link]

The problem is that bzr's way forces me to tell the VCS what I did ("copied 5 lines out of foo.c into bar.cc, fixing syntax differences on the way"). Most people haven't got a bzr-ified vi/emacs/whatever able to do this, so need to do it by hand. Same with plain cp(1), mv(1), rm(1), and the whole gaggle of text-munging Unix tools. Next to nobody will annotate the changes by hand, and if they do they'll get it wrong a significant fraction of the time. And what if I just get a patch by mail, made up with legacy Unix tools? Besides, there is no way to fix a broken annotation later on, once it becomes part of history.

Short version: If the tools to do it right automatically aren't there, don't bother. People are a lazy, unreliable bunch.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 3, 2014 22:25 UTC (Fri) by deepfire (guest, #26138) [Link] (82 responses)

Now, how do you reconciliate this with the position of Eli Zaretskii, in that thread? He's is a very smart fellow, yet he's going to be "deeply sad" if git wins emacs from bzr.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 10:17 UTC (Sat) by dakas (guest, #88146) [Link] (81 responses)

Eli works on the Windows and MSDOS ports of Emacs. Git has its roots in C and shell scripts, classic GNU technology that still has sort of rough going on Windows. Or in other words, that plays in areas of Windows that really suck.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 5, 2014 0:06 UTC (Sun) by mathstuf (subscriber, #69389) [Link] (1 responses)

The installer for Windows (msys-git) is easy to use. In fact, its among the first things installed on my Windows instances because there's no easier way to get scp.

At work, there are quite a few Windows-only folks and they get along with msys-git just fine for the most part (some holdouts, but they also don't work on the bigger repos with everyone else often AFAIK; mainly research code).

Raymond: bzr is dying; Emacs needs to move

Posted Jan 5, 2014 11:18 UTC (Sun) by marcH (subscriber, #57642) [Link]

On Windows you also have Git Extensions, Tortoise Git, Egit,... and of course Cygwin.

Tortoise Git is probably the one looking the less "foreign" on Windows.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 5, 2014 11:16 UTC (Sun) by marcH (subscriber, #57642) [Link]

> Git has its roots in C and shell scripts, classic GNU technology that still has sort of rough going on Windows.

Bourne shell scripting is classic Unix technology, not just GNU.

Windows is C all over the place. You probably meant POSIX: still not just GNU.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 5, 2014 13:09 UTC (Sun) by Fowl (subscriber, #65667) [Link]

Except that even Microsoft has contributed to and use libgit2....

Raymond: bzr is dying; Emacs needs to move

Posted Jan 8, 2014 11:49 UTC (Wed) by eliz (guest, #94829) [Link] (76 responses)

Sorry, but that's blatantly incorrect. My main contributions to Emacs have nothing to do with MS-Windows or MS-DOS: bidirectional editing support, for example. Check out the credits in the Emacs documentation for a fuller list.

I prefer bzr because it is a much nicer system, and I don't like git when I work on Unix as well. That bzr works better on Windows is one of the factors, but not the only one and not the most important one. You don't need to second-guess my motives, I explained them in the emacs-devel discussion.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 8, 2014 16:48 UTC (Wed) by nix (subscriber, #2304) [Link] (75 responses)

I think 'Eli works *in* the Windows and MS/DOS ports of Emacs' would be more accurate than what the OP said.

I note that you are a rare bird indeed finding bzr preferable to git, but that's probably more a sign of which version control system you encountered first than anything else, or a sign that you encountered bzr when git was fairly young and relatively arcane. The differences are *much* less extreme now: git is perfectly usable even by non-deities, and thanks to magit I'm afraid bzr has been comprehensively stomped on in the 'works well with Emacs' department too.

bzr's pluggability and attempt to make multiple workflows easy was a very nice idea, but even disregarding the mindshare and development rate issues git has by now exceeded bzr's capabilities at both of these; the first via exposure of all its plumbing; the second via simply not dictating a workflow at all and allowing people to bolt workflows on top with fairly trivial scripting. (And if you need full-blown fiddle-with-the-guts programmability, the git data model is so stable that independent library reimplementations like libgit, JGit et al are perfectly usable. *That* has never been true with bazaar.)

Of course, if you're on a platform so impoverished that it doesn't have shell scripts the fact that git allows you to use shell scripts to do nifty stuff is less impressive, as is the fact that a lot of git tools don't work because they need a shell. But I'm fairly sure that's not true of you, since without a shell you couldn't ./configure Emacs at all!

Raymond: bzr is dying; Emacs needs to move

Posted Jan 11, 2014 17:16 UTC (Sat) by eliz (guest, #94829) [Link] (74 responses)

Bazaar supports features and workflows that are important to Emacs, which git still doesn't, and I don't know when and whether it will. The discussion that developed following esr's suggestion revealed several deficiencies of git for which there's no easy remedy.

For example, the ability to have several branches checked out at the same time (in different directories), and merge/cherry-pick between them. This is routine in Emacs development, where the release branch and the trunk diverge very quickly after the branch point, so much so that the git co-located branches don't make sense, and actually get in the way because building a branch after a branch switch becomes annoyingly long (it needs a full bootstrap most of the times).

As another example, which surprised even me, it turned out several users used bzr's lightweight checkouts, which don't exist in git, and probably never will. Those users will now have trouble that cannot be helped.

Another feature missing in git is the notion of "mainline" branch, which is very central to Emacs development. Git doesn't have this, and never will.

And there are a few more "issues". In short, I feel like someone who was "sold" to an idea that turned out to be much less attractive than its "salesmen" advertised it to be. By the way, most, if not all, of the proponents of the move to git are not involved in Emacs development deeply enough to be aware of all the issues, and so don't really understand how well bzr fits Emacs development, and cannot assess the impact on that of the switch to git. IOW, the "salesmen" don't really know enough about what they are selling -- but what else is new about salesmen?

We have yet to see how this will affect Emacs development, but one thing is already clear: the process of migration to git will take a non-trivial amount of effort and energy, because in 5 years of using bzr, the Emacs development team have put in place tools, features, and procedures that rely on bzr, and at least some of them are not trivially ported to git.

A few side comments: (1) Yes, my main development machines run MS-Windows. So what? I have developed almost all of the bidirectional editing support for Emacs on that platform, and take care of redisplay bugs since then. Some people have hard time digesting this fact.
(2) Don't worry about my ability to run shell scripts, because (a) I do have Bash on my system, and (b) the Windows shell is quite powerful these days and can do many jobs even without Bash.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 11, 2014 17:57 UTC (Sat) by nix (subscriber, #2304) [Link] (54 responses)

For example, the ability to have several branches checked out at the same time (in different directories), and merge/cherry-pick between them.
I do this all the time. You want 'git-new-workdir', in the git contrib directory and on the verge of getting installed for real, IIRC. (You do have to remember which workdir was the original, since it's got the repository in it, but that's all: they're otherwise indistinguishable.)

it turned out several users used bzr's lightweight checkouts, which don't exist in git, and probably never will
These look more or less identical to shallow clones (git clone --depth, and possibly --single-branch). Maybe they differ: can you push from lightweight checkouts?
the notion of "mainline" branch, which is very central to Emacs development. Git doesn't have this, and never will.
Damn good thing, if you ask me. I don't want my version control system dictating what my branches are called. Why isn't this just a per-project convention anyway? One of many things I have never understood about Bazaar...
the process of migration to git will take a non-trivial amount of effort and energy
Yes, this is unavoidable. Fortunately you have git scripters like Paul Eggert on board who are capable of doing all sorts of gitty magic without visible effort. I'm sure you'll have all the scripts you need in no time flat :)
(b) the Windows shell is quite powerful these days and can do many jobs even without Bash.
Yeah, but that wouldn't help you if you wanted to run one of the Git porcelain shell scripts that are still, well, /bin/sh shell scripts. (They are increasingly moving to C, even though it's harder to write and maintain, in part because this increases usability for Windows users.)

Raymond: bzr is dying; Emacs needs to move

Posted Jan 11, 2014 18:29 UTC (Sat) by eliz (guest, #94829) [Link] (6 responses)

>> For example, the ability to have several branches checked out at the same time (in different directories), and merge/cherry-pick between them.

> I do this all the time. You want 'git-new-workdir'

git-new-workdir still has known shortcomings, as you well know. It's not ready for prime time; in the emacs-devel discussion, git experts explicitly suggested to stay away of it for now.

>> It turned out several users used bzr's lightweight checkouts

> These look more or less identical to shallow clones

No, bzr's lightweight checkouts are not equivalent to git's shallow clones: the latter have no ability to request the missing data from the upstream repo. So in a shallow clone, the history you have is all you have.

>> the notion of "mainline" branch, which is very central to Emacs development. Git doesn't have this, and never will.

> Damn good thing, if you ask me.

But I'm not asking you. Emacs development works this way, so any VCS that doesn't support that will be a burden for the core maintainers.

>> (b) the Windows shell is quite powerful these days and can do many jobs even without Bash.

> Yeah, but that wouldn't help you if you wanted to run one of the Git porcelain shell scripts that are still, well, /bin/sh shell scripts

I wish they were just that. But no, some of them are Perl scripts, some others are Tcl/Tk scripts, etc.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 12, 2014 0:12 UTC (Sun) by dlang (guest, #313) [Link] (5 responses)

> git-new-workdir still has known shortcomings, as you well know. It's not ready for prime time; in the emacs-devel discussion, git experts explicitly suggested to stay away of it for now.

I don't know about git-new-workdir, but I know that git has long had the ability to control the workdir via environment variables so that you could have a bunch of checkouts.

The other workaround is to just make several clones of the repository using the -l flag so that you take up a minimum of additional disk space (just what's needed for the inodes as the contents are linked)

folks in git routinely work on many branches at once.

>>> the notion of "mainline" branch, which is very central to Emacs development. Git doesn't have this, and never will.

>> Damn good thing, if you ask me.

>But I'm not asking you. Emacs development works this way, so any VCS that doesn't support that will be a burden for the core maintainers.

Git doesn't force you to use a single mainline branch, but it allows you to.

or do you think that the linux kernel somehow doesn't have a mainline?

It's just in git you have options.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 12, 2014 0:44 UTC (Sun) by nix (subscriber, #2304) [Link] (3 responses)

Having dug around a bit (and read a lot of the git threads on emacs-devel, which have grown a lot since last I looked), a bazaar mainline branch is a way of stating that this branch is the source of version numbers, and things that merge to it get dotted version numbers with reference to them.

Git, of course, cannot implement this as Bazaar does -- it seems like a kludge in Bazaar as well unless you have an exceptionally centralized workflow, as Emacs does -- but it has a close metaphorical equivalent: 'git describe --tags', assuming you have appropriate tags (not all of which need to be shared upstream, so you can drop your own local tags to help with this if you wish: I do this, putting them in a nix/* namespace, with a push refspec to ensure that these are never pushed unless I explicitly instruct git to push them, by name). Furthermore, that'll give you 'git describe --contains' which as far as I know you cannot implement in bzr at all: 'what is the first tag that contains this change?'

Raymond: bzr is dying; Emacs needs to move

Posted Jan 12, 2014 1:20 UTC (Sun) by dlang (guest, #313) [Link] (1 responses)

With git you don't need to assign revision numbers as such, you tag releases, but everything in between can just be referred by by the git hash (or the last 8 or so characters of the hash)

Raymond: bzr is dying; Emacs needs to move

Posted Jan 12, 2014 3:30 UTC (Sun) by mathstuf (subscriber, #69389) [Link]

Probably a typo, but you need the *first* characters of the hash.

Anyways, auto tagging could probably be done using commit hooks and pre-receive hook checks on the server.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 12, 2014 17:52 UTC (Sun) by eliz (guest, #94829) [Link]

> Having dug around a bit (and read a lot of the git threads on emacs-devel, which have grown a lot since last I looked), a bazaar mainline branch is a way of stating that this branch is the source of version numbers, and things that merge to it get dotted version numbers with reference to them.

That is true, but isn't the important issue. The important issue is the special treatment of the mainline branch that bzr provides. The dotted revision numbers are just the symptom of that, but they are not the thing itself.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 12, 2014 17:49 UTC (Sun) by eliz (guest, #94829) [Link]

> Git doesn't force you to use a single mainline branch, but it allows you to

The point is that git doesn't support well the linear model of development that is very prominent in Emacs. Git shines in much more distributed development models, but that is not how Emacs is developed, and probably won't in observable future.

> or do you think that the linux kernel somehow doesn't have a mainline?

Emacs development model is very different from how the Linux kernel is developed. Realizing these differences and their significant implications of the VCS is imperative if one wants to understand the issues at hand.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 11, 2014 18:34 UTC (Sat) by dashesy (guest, #74652) [Link] (46 responses)

I don't want my version control system dictating what my branches are called. Why isn't this just a per-project convention anyway? One of many things I have never understood about Bazaar...
Exactly, that depends on project policy. We recently started using git-flow [1] for that. Needs a little polishing IMO, but seems to help productiveness.

1- http://nvie.com/posts/a-successful-git-branching-model/

Raymond: bzr is dying; Emacs needs to move

Posted Jan 11, 2014 19:13 UTC (Sat) by eliz (guest, #94829) [Link] (45 responses)

Regarding the "mainline" branch: You are both missing the point. The name of the branch (called "trunk" in Emacs) is not important. You want to call it "master", be my guest. The main issue is that this branch is treated specially in Emacs development. Git doesn't support that, and therein lies the problem.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 12, 2014 0:13 UTC (Sun) by dlang (guest, #313) [Link] (44 responses)

> The main issue is that this branch is treated specially in Emacs development. Git doesn't support that, and therein lies the problem.

what is the special treatment that you think is needed that git doesn't support?

Raymond: bzr is dying; Emacs needs to move

Posted Jan 12, 2014 17:58 UTC (Sun) by eliz (guest, #94829) [Link] (43 responses)

> what is the special treatment that you think is needed that git doesn't support?

The special status of the main branch. E.g., if M is the mainline branch and F is a feature branch, then the result of merging M to F and the result of merging F to M are not the same. Bazaar distinguishes between the left and the right parent of a merge. That is why git supports truly distributed development much better than bzr, but that is also why bzr suits better the highly centralized development model used by Emacs, in which the mainline is the stem that exists "forever", from which feature branches are forked and to which they land features.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 12, 2014 20:50 UTC (Sun) by dlang (guest, #313) [Link] (42 responses)

people do use git in a central tree version the way you are describing.

If you really think that the merging algorithms in git don't do what you want (what is the difference in the resulting code between a merge of M into F and F into M??) then you can configure git to use a merge algorithm you supply.

If it's just a matter of how things are named, git doesn't enforce naming, but it among the many different workflows it lets you use, you can, by convention, designate one branch as mainline and always merge into it.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 5:03 UTC (Mon) by eliz (guest, #94829) [Link] (41 responses)

> people do use git in a central tree version the way you are describing

I'm sure they do, and I'm sure git can be used like that. It's just less suitable for such situations, because its basic design targeted a very different development model. You can fight the basic design with patches and kludges, but they still stay patches and kludges, and that shows.

> If you really think that the merging algorithms in git don't do what you want (what is the difference in the resulting code between a merge of M into F and F into M??) then you can configure git to use a merge algorithm you supply.

This is not about merging algorithms (and the results in the source code will be identical, of course, no matter which way you merge). This is about the history DAG after the merge: it looks different in bzr in these two scenarios, but identical in git. That is why in bzr the mainline physically exists and can be identified in the DAG, while in git it's just a name, and any merge can potentially modify the DAG such that the merged branch looks like it is (or was) the mainline.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 5:17 UTC (Mon) by mchapman (subscriber, #66589) [Link] (40 responses)

> This is not about merging algorithms (and the results in the source code will be identical, of course, no matter which way you merge). This is about the history DAG after the merge: it looks different in bzr in these two scenarios, but identical in git.

No, it's not identical: Git orders the parents of a commit. When you merge *into* a particular branch, that branch's old head will always be the first parent of the new commit.

This rule is fundamental enough that git-rev-list, git-log and other related commands can take a --first-parent option to only traverse the history via these first parents.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 11:31 UTC (Mon) by eliz (guest, #94829) [Link] (39 responses)

>> This is about the history DAG after the merge: it looks different in bzr in these two scenarios, but identical in git.

> No, it's not identical: Git orders the parents of a commit.

I thought each git commit had an unordered set of parents. I can even show you a posting in a discussion where Linus Torvalds participated, and someone wrote that with no one refuting it. But that was several years ago, and I guess things changed since then.

So let me correct what I said above: with git, the DAG will look identical, except for the order of parents in the merge. That is, the DAG topology: the number of the nodes and the edges between them -- will be identical. With bzr, they will be different (and bzr also orders the parents of a merge). Is this part still correct in git?

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 12:27 UTC (Mon) by cortana (subscriber, #24596) [Link] (11 responses)

I'm sure it's just my Git background, but I'm having a hard time understanding how the result of merging commit A to commit B can possibly result in a different topology than merging B to A. Are there any diagrams that illustrate the difference?

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 14:17 UTC (Mon) by eliz (guest, #94829) [Link] (10 responses)

> I'm having a hard time understanding how the result of merging commit A to commit B can possibly result in a different topology than merging B to A.

Because bzr is fundamentally branch-centric. It crucially distinguishes between "my commits" on the branch on which I develop, and "commits that I merged" from other branches.

In a nutshell, when a team develops in git, it creates a single common DAG. That DAG might not physically exist in its entirety on all the team's machines (and might not exist anywhere at all), but if you connect all of its parts, you get a single common DAG. By contrast, in bzr there's no "common DAG" at all. There's "my DAG", "your DAG", "his DAG", etc., and they are all different, although they share most of the nodes (commits). In "my DAG", "my commits" are arranged linearly (that's my "mainline", the linear sequence of my commits which include the left parents of merge commits), one after the other, while "commits that I merged" start as branches that fork off of some commit by me and then converge back where I merged them.

This fundamental difference is why bzr is better suited to centralized and star-like arrangements of project development (like Emacs), while git is much better suited to to truly distributed development (which Emacs isn't, and probably never will be).

> Are there any diagrams that illustrate the difference?

I will post some pointers in a moment.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 15:41 UTC (Mon) by mathstuf (subscriber, #69389) [Link] (8 responses)

So…if you pull from someone else and check out their branch, you see their commits on the right even if they merged your branch into theirs (where they'd see your commits on the right)? I don't know if I like the drawing of the history changing depending on user.email configuration (unless I'm missing some detail here).

Raymond: bzr is dying; Emacs needs to move

Posted Jan 14, 2014 0:26 UTC (Tue) by mchapman (subscriber, #66589) [Link] (7 responses)

> So…if you pull from someone else and check out their branch, you see their commits on the right even if they merged your branch into theirs (where they'd see your commits on the right)?

No, you wouldn't. It doesn't matter who performs a merge: if B is merged into A, then A will be the left-most parent of the merge commit. The problem here is in calling the branches "theirs" or "ours". That may fit in with the way people think about the merge, but it's almost meaningless as far as Git is concerned. The merge behaves identically no matter who does it, no matter who created the branches, and no matter where the branches came from. With most merge strategies, it doesn't matter which branch is "theirs" or "ours"; the result of the merge will be identical.

(Why "almost meaningless"? There are a couple of merge strategies that differentiate between an "our" branch and "theirs" branch. But this is just an arbitrary naming: the branch-to-be-merged is always called the "theirs" branch. It has nothing to do with where the branches came from.)

Raymond: bzr is dying; Emacs needs to move

Posted Jan 14, 2014 0:52 UTC (Tue) by mathstuf (subscriber, #69389) [Link] (6 responses)

I know git's behavior; I was wondering if my bzr understanding was correct :) . I don't think what I stated is correct (due to "pull" being used); if you *merge* from someone else, the history may be rewritten to keep your contributions on the left-parent (I think).

Raymond: bzr is dying; Emacs needs to move

Posted Jan 14, 2014 12:04 UTC (Tue) by eliz (guest, #94829) [Link] (5 responses)

> if you *merge* from someone else, the history may be rewritten to keep your contributions on the left-parent

It depends on what you mean by "history may be rewritten". Specifically, what do you mean by "history" that might be rewritten?

If you mean the history DAG, then it will NOT be rewritten, assuming you take bzr's POV, which is that there's no common history DAG. There's my DAG, and there's your DAG. They are made of the same commits (excluding the merge commits, which are somewhat different), but their topology is different. So when I merge from you, "my DAG" is never rewritten, it is just extended by adding your commits that I didn't have.

Also, the additions to "my DAG" made by a merge are always off my "mainline", which is a linear sequence of my commits in this branch. ("In this branch" because the branch from which I merged might also be mine.) The only commit made by a merge that _is_ on my mainline in the branch to which I merge is the merge commit, which adds one more revision to the mainline of that branch.

P.S. And yes, in bzr, "pull" is different from "git pull": it completely overwrites "my DAG" with the DAG of the branch from which I pull, thus making "my DAG" identical to "yours". This is of course possible only if the destination branch is a subset of the source branch (but I can "bzr pull --overwrite" to do that even if the destination branch diverged from the source). IOW, "bzr pull" will never merge, and is the same as "git pull --ff-only".

Raymond: bzr is dying; Emacs needs to move

Posted Jan 14, 2014 18:42 UTC (Tue) by mathstuf (subscriber, #69389) [Link] (4 responses)

> Specifically, what do you mean by "history" that might be rewritten?

Hmm…if I merge remote/mainline into local/mainline, if I look at remote/mainline's commit in my DAG (second parent of local/mainline), does it look the same as if I were to look at the DAG of remote/mainline directly?

I think I'm getting confused where you say the "topology is rewritten" which makes me think that you're relabeling left-parent ancestry when merging or depending on which repository you're in when you query the history. I don't really see how it can be completely rewritten; maybe parents get reordered, but that's about it AFAICS (I can't say the newest commit is an ancestor of the second commit ever made I assume). I guess what I'm looking for are the transformation rules which bzr applies to history when "history is rewritten" (and the situations in which bzr will do so).

When folks blame/criticize/laud git for making it easy to "rewrite history", they're usually just referring to moving from a log of changes in the temporal domain into a log of changes which are incremental, logical, and easier to bisect[1] and review. What I'm hearing from bzr is that it rewrites the arrows between locations in history according to…some rules which (from my reading) tend to depend on which repository/branch I'm working in. Which sounds much weirder and I'm lacking a rationale/use case to adequately justify such behavior.

[1]I guess other tools missing bisect is a reason they're usually so touchy about not squashing typo fixes and such into the commit which introduced them (if they're on the same branch) since they don't have to worry about arbitrary commits being viable. Personally, I'll take bisect any day of the week.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 14, 2014 19:13 UTC (Tue) by eliz (guest, #94829) [Link] (3 responses)

> if I merge remote/mainline into local/mainline, if I look at remote/mainline's commit in my DAG (second parent of local/mainline), does it look the same as if I were to look at the DAG of remote/mainline directly?

No, it doesn't look the same. It looks "rotated", such that the commits done locally in local/mainline are always on the left and arranged linearly, while commits from remote/mainline look like a branch that forked from local mainline and then converged with it. Of course, ancestry of each commit is not changed in any way, but the order of the parents does change.

(The above is, of course, assuming that when you merge, these two branches were divergent. Otherwise, bzr will simply do the equivalent of pull and fast-forward, and the resulting DAG will be identical to that on remote.)

There are examples of how the two DAGs will look like in the discussion from 7 years ago whose links I posted earlier, or maybe in some of their followups. If you cannot find an example, I could try digging one out.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 14, 2014 19:27 UTC (Tue) by eliz (guest, #94829) [Link] (2 responses)

Here the example starts:

https://lists.ubuntu.com/archives/bazaar/2006q4/018270.html

And here it is continued to show what happens after a merge in both branches:

https://lists.ubuntu.com/archives/bazaar/2006q4/018307.html

I hope this explains what I meant by "different" and "rotated" DAGs.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 14, 2014 22:35 UTC (Tue) by mathstuf (subscriber, #69389) [Link] (1 responses)

OK, now I understand *what* is happening. Still don't understand the reasoning. I could see some of the reasoning being to keep old numerical IDs the same, but that sounds like the tail wagging the dog to me (numerical IDs don't sound like a good enough upside to have to pay the cost of this history mismatch).

So if A *merges* 'g' back, bzr would see 'e' and 'f' as its parents (and already in the history of the current commit), see that 'f' is on the mainline, rewrite 'g's parent ordering to make 'f' the first parent, then make 'h' as part of A's mainline (with 'g' as a second parent). At least now I see why bzr doesn't do octopus merging (What if 'g' had 'c' and 'f' as parents? Which gets to be "first parent" then?).

As a git user, this is unexpected since now "first parent of e" and "first parent of f" are different based on who you ask.

In any case, we are quite a bit into the weeds for the topic at hand. I do know that if I have to deal with bzr in the future, there will be fewer "WTF‽" moments :) .

Raymond: bzr is dying; Emacs needs to move

Posted Jan 15, 2014 5:43 UTC (Wed) by eliz (guest, #94829) [Link]

> OK, now I understand *what* is happening. Still don't understand the reasoning.

Well, I didn't design that stuff, so I can only try to guess the reasons. If you want the definitive answer, I suggest to ask on the Bazaar mailing list, where bzr's designers still lurk.

My take on the reasoning is that bzr really _wants_ to distinguish between "my" history and "yours", i.e. it wants the history in each branch to reflect the sequence of operations in that branch. Therefore, commits made in the branch and commits merged from another branch are treated differently, and shown as such in the DAG.

IOW, the interpretations of "history" in bzr and in git are subtly, but fundamentally different. For bzr, it is the actual sequence of events that added revisions to the branch, in addition to the ancestry information. For git (IIUC), it is _solely_ the ancestry, i.e. the parent-child relationships between the commits, and the "historic" aspect shows only in the direction of the DAG edges.

> I could see some of the reasoning being to keep old numerical IDs the same, but that sounds like the tail wagging the dog to me

Same here: I think the numerical revnos are the (logical) consequence, not the root cause. But again, this is just my take.

> So if A *merges* 'g' back, bzr would see 'e' and 'f' as its parents (and already in the history of the current commit), see that 'f' is on the mainline, rewrite 'g's parent ordering to make 'f' the first parent, then make 'h' as part of A's mainline

No, I think bzr will just say "nothing to merge" and refuse to merge, because A already has all the commits that are in B. (Merge commits don't count for that purpose.)

> this is unexpected since now "first parent of e" and "first parent of f" are different based on who you ask

Right, and this is very fundamental to how bzr works: the order of parents depends on the branch where you look at a merge commit. This is bzr's branch-centric nature clearly showing.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 14, 2014 1:16 UTC (Tue) by cortana (subscriber, #24596) [Link]

That's helpful, I think I get it, thanks. :)

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 13:08 UTC (Mon) by mchapman (subscriber, #66589) [Link] (1 responses)

> Is this part still correct in git?

Sure, it's topologically the same graph. But why is it so important to know which way the merge occurred? If you need to treat a specific chain of commits as the "trunk" of the repository, then Git gives you the facility to do so. I can't imagine why that would be so important though.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 14:20 UTC (Mon) by eliz (guest, #94829) [Link]

> If you need to treat a specific chain of commits as the "trunk" of the repository, then Git gives you the facility to do so. I can't imagine why that would be so important though.

It is important when your project is developed around one or two very distinguished long-living branches. Then it is a Good Thing to have that distinction known by the tool, reflected in the log of revisions, shown on the graphical description of the DAG, etc.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 13:54 UTC (Mon) by mathstuf (subscriber, #69389) [Link] (24 responses)

> I thought each git commit had an unordered set of parents. I can even show you a posting in a discussion where Linus Torvalds participated, and someone wrote that with no one refuting it. But that was several years ago, and I guess things changed since then.

A link would be nice. The thing is that Git's on-disk format is unchanged since the beginning. Things were *added* (packs, alternatives, and replacements come to mind), but not *changed*. In git, parents are *semantically* unordered, but a reference like badc0de^3 (the third parent of commit badc0de) is stable and always has been and tools have flags which treat the first parent as special. And that is one of the beauties of git: the smarts are in the *tools*, not the data format which makes adding smarts way easier and more pain-free (e.g., try cloning Pidgin's monotone repo sometime using the snapshot/upgrade method; it took a few hours on a Core 2 Duo last I tried).

I'm guessing the sentence in that email was either ignored or skimmed over.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 14:29 UTC (Mon) by eliz (guest, #94829) [Link] (22 responses)

> A link would be nice

https://lists.ubuntu.com/archives/bazaar/2006q4/018477.html

<Quote>
> I think this has the causality backward. It's avoided because it
> changes the ancestry of the branch in question, by rearranging the
> left parents; this ties into Linus' assertion that all parents ought
> to be treated equally, which I'm beginning to think is the base
> lynchpin of this whole dissension.

Yes, it seems you have found the needle. :-) In git, history is a DAG;
a commit has a _set_ of parents, so by definition they are not
ordered. This has a number of consequences. For example, you can't
really answer the question "Which branch was this commit on?". All you
can say is that "This commit is reachable from (and therefore part of)
branches X, Y, and Z."
</Quote>

This was part of a very long discussion which revealed the differences between bzr and git. It is worth reading, even though that was more than 7 years ago (and so some things are clearly outdated). Let me give a few more links to some important points in that discussion:

https://lists.ubuntu.com/archives/bazaar/2006q4/018265.html
https://lists.ubuntu.com/archives/bazaar/2006q4/018307.html
https://lists.ubuntu.com/archives/bazaar/2006q4/018309.html
https://lists.ubuntu.com/archives/bazaar/2006q4/018421.html

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 14:47 UTC (Mon) by mathstuf (subscriber, #69389) [Link] (1 responses)

Currently on mobile and mailman isn't showing the actual thread structure so chasing parent/reply messages is a nightmare; will likely follow up again after reading the links and a few messages up and down the thread from each.

From my reading, I get that he is saying they are *semantically* unordered (and all parents should be treated, semantically, the same; this has since change with --first-parent, but that's where the tools bringing the smarts helped because no one needed to rebuild a .git directory to get such a thing). The order in the data store is static though. And, at least using git.or.cz git (I imagine other implementations do the same), made in this way: first the commit you merge into, then the list of branches given to the merge command, in order.

From a "I know git's storage format" view, this is all correct, but I can see how "unordered" and "set" being used together would cause people to draw other conclusions.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 16:36 UTC (Mon) by mathstuf (subscriber, #69389) [Link]

> this has since change with --first-parent, but that's where the tools bringing the smarts helped because no one needed to rebuild a .git directory to get such a thing

Actually, git always differentiated first-parent. deadc0de~~ is 2 parents back following first-parent rules. deadc0de^^ is deadc0de's second parent (same for a normal commit, the second branch if deadc0de is a merge). But again, this is a tool-level distinction.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 17:21 UTC (Mon) by mathstuf (subscriber, #69389) [Link] (19 responses)

> https://lists.ubuntu.com/archives/bazaar/2006q4/018477.html
> https://lists.ubuntu.com/archives/bazaar/2006q4/018421.html

Looking at the graphs in the reply here, it looks like bzr supports having no first-parent commit as well[1]. This is something git cannot do since there's no elevated parentage field (it looks like bzr saves "parent" separately from "merged" fields somehow).

> https://lists.ubuntu.com/archives/bazaar/2006q4/018265.html
> https://lists.ubuntu.com/archives/bazaar/2006q4/018307.html

OK, this helped me see what was meant when merging changes the structure of the DAG. It does help me see why bzr is more central because even if everyone agrees on the state of the code for some release, not everyone may agree on the *history* for said release depending on who merged where. Which is why bzr has a true mainline repository to avoid issues where commits end up in the wrong place in the DAG. Don't know that I'm a fan of this behavior; what use cases are there (other than bzr treating left-side parents as special) where the DAG shape is so important that rewriting parentage is paramount?

Personally, if I have modified master locally and pull from upstream, I really want to work off of what upstream is currently doing. To do this, I have git rebase my commits on top of upstream (rather than merge[2]). I want upstream to be a real ancestor of my local master. I guess part of this comes from the fact that parents are stored as hashes *in the commit*, so I can't have upstream as a parent without actually using their commit which means I can't rewrite its parentage/history without changing the hash I use to reference it.

> https://lists.ubuntu.com/archives/bazaar/2006q4/018309.html

Linus is explaining why git is more flexible here. It looks as if emacs has married itself to bzr's workings and would need scripts in git to do something similar. The subthread off of here is *long*, but I went fairly far in it. The main issue I see from here is that bzr is enforcing social standards using baked-in policies which I don't see as an upside; I'd rather have some side-project which is used to enforce such things (e.g., git-flow or hub).

One quote from Linus I agree 100% with:

> I don't know if that is what Carl's problem is, but yes, to somebody from the git world, it's totally insane to have the _same_ commit have ten different names just depending on which branch is was in.

[1]http://article.gmane.org/gmane.comp.version-control.bazaa...
[2]Pull-merges are a real pet-peeve of mine; I do *not* care how often you "git pull" from upstream and making commits which cause a dizzying number of "bumps" in the history for your inability to keep up-to-date. If you have a long-lived branch, make a *branch* and either rebase it or merge master in *as needed*.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 18:18 UTC (Mon) by eliz (guest, #94829) [Link] (18 responses)

> what use cases are there (other than bzr treating left-side parents as special) where the DAG shape is so important that rewriting parentage is paramount?

My take of this is that left parent being special is the main issue here; most bzr users don't really care much about the DAG otherwise. What _is_ important, though, is that when you and I both work on a branch pulled from upstream, we both see that branch's commits on the left. and can freely talk about those commits by their revision numbers (which are by definition branch-specific). (Of course if we both are making changes on that branch, some of my commits that are not yet delivered to upstream will not appear in your branch, and vice versa. But most of them will be.)

> Linus is explaining why git is more flexible here.

There's no doubt about that, certainly not nowadays. Nevertheless, bzr is "good enough" for Emacs, in the sense that no significant features we needed were absent from it.

> It looks as if emacs has married itself to bzr's workings

It is probably true to some extent, as the dVCS-based procedures that were developed after the switch from CVS had bzr in mind. But mostly, I think the social factors were at work here: Emacs has a small group of core maintainers that handle all the important tasks, and a very small number (1 or 2) of long-living branches, which are usually extremely diverged. Bazaar favors this situation.

> I don't know if that is what Carl's problem is, but yes, to somebody from the git world, it's totally insane to have the _same_ commit have ten different names just depending on which branch is was in.

True; but it doesn't matter much when we are talking about the same branch -- then the names are identical. And in Emacs development, there never was more than 2 branches, the development trunk and the release branch.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 18:33 UTC (Mon) by mathstuf (subscriber, #69389) [Link] (3 responses)

branch pulled from upstream
I think this is one place where terminology has really confused the discussion; from my reading, "bzr pull" is "git pull --ff-only" and "bzr merge" is "git pull --no-ff". In git, "pull" is "fetch-then-merge" (or "fetch-then-rebase"). As an example to try and clarify something: say upstream has merged feature branches from users A and B (say, their mainline branch). If users A and B do a "bzr merge" of upstream after doing something, they may (will?) get different history DAGs because the upstream branch's history is then rewritten to have the user's mainline branch as the left-most history. Upstream:
 A   B
  \   \
X--AM--BM--M
A's branch after "bzr merge upstream":
--BM--M
       \
     A--A'
B's branch after "bzr merge upstream":
--BM--M
       \
     B--B'
whereas in git after "git merge upstream" both look exactly like upstream because it was a fast-forward. It seems that "bzr merge" is not used in emacs development (by anyone other than the central developer(s)) because it is still using a centralized-development model. Instead, in emacs' case, A and B would instead have "bzr pull"'d from upstream rather than "bzr merge".

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 19:25 UTC (Mon) by eliz (guest, #94829) [Link] (2 responses)

> It seems that "bzr merge" is not used in emacs development (by anyone other than the central developer(s))

"bzr merge" _is_ used by people other than the core developers. It is used to merge from the trunk to a feature branch, and then to merge the finished feature to the trunk's mirror, before pushing the result upstream.

> Instead, in emacs' case, A and B would instead have "bzr pull"'d from upstream rather than "bzr merge"

The recommended workflow (see http://www.emacswiki.org/emacs/BzrForEmacsDevs) is to pull from upstream to a local mirror, and then merge between the local mirror and the feature branch.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 19:55 UTC (Mon) by mathstuf (subscriber, #69389) [Link] (1 responses)

Sorry, I meant "bzr merge" for updating their local mainline from upstream, not that it wasn't used at all. What you wrote makes sense; I should have been clearer.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 14, 2014 5:35 UTC (Tue) by eliz (guest, #94829) [Link]

Using "bzr merge" from upstream is not unheard of. This is TRT when you are working on a copy of the trunk, and have made commits, not yet pushed upstream, that diverged your copy from the trunk.

However, this is more rare operation, because bzr provides a feature called "a bound branch" (something git doesn't have). This is a branch where a commit performs both a local commit and a push in a single transaction. It is customary (and recommended by the Emacs wiki) to use a bound branch for tracking the trunk, and for making small one-off changes, like simple bugfixes: it allows for simpler workflow.

In a bound branch, you don't need to explicitly merge from upstream. Instead, you do a "bzr update". "bzr update" is the moral equivalent of "git checkout" (except that it doesn't switch branches, because we are in a single branch, not in a repo), but in a bound branch it also performs an implicit merge (if the local copy diverged) and a merge commit, or the equivalent of fast-forward (if the the copy didn't diverge).

The upshot of all that is that users do merge from upstream all the time, but implicitly, without invoking "bzr merge". "bzr merge" from upstream is therefore generally reserved to un-bound branches.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 19:00 UTC (Mon) by dlang (guest, #313) [Link] (13 responses)

> and can freely talk about those commits by their revision numbers (which are by definition branch-specific).

with git you talk about commits by their id, the SHA1 hash (or the first 12 characters of it), and that id uniquely identifies that commit, no matter what branch it's on.

How is this worse?

> (Of course if we both are making changes on that branch, some of my commits that are not yet delivered to upstream will not appear in your branch, and vice versa. But most of them will be.)

so that means that when you talk about a commit id, it may not actually refer to the same content if you are both working on the same branch on a local copy of the repo.

That sounds like a significant contributor to confusion.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 19:08 UTC (Mon) by mathstuf (subscriber, #69389) [Link] (3 responses)

> so that means that when you talk about a commit id, it may not actually refer to the same content if you are both working on the same branch on a local copy of the repo.

If you're referring to the SVN-like integer IDs, sure, but bzr also has IDs which include the user email and other information (apparently very similar to BK's IDs). There are also unique IDs for bzr (or maybe those are the BK-like IDs?), but they're apparently not exposed in the normal course of things.

In any case, even in git if I don't push a commit, you can't get it without access to my local machine ("not yet delivered to upstream").

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 19:33 UTC (Mon) by eliz (guest, #94829) [Link] (2 responses)

> here are also unique IDs for bzr (or maybe those are the BK-like IDs?), but they're apparently not exposed in the normal course of things.

They are shown given the most verbose output options of "bzr log" (the revision-id and parent fields below):

$ bzr log --long --show-ids -c-1
------------------------------------------------------------
revno: 116011
revision-id: monnier@iro.umontreal.ca-20140113153301-ozd3taipkkc7p5cr
parent: xfq.free@gmail.com-20140113152247-h2712z46wkd1q294
committer: Stefan Monnier <monnier@iro.umontreal.ca>
branch nick: trunk
timestamp: Mon 2014-01-13 15:33:01 +0000
message:
* lisp/vc/log-edit.el: Fix highlighting of summary when it's the first line.
(log-edit--match-first-line): New function.
(log-edit-font-lock-keywords): Use it.
(log-edit-mode): Make jit-lock-defer-multiline work.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 14, 2014 16:30 UTC (Tue) by nix (subscriber, #2304) [Link] (1 responses)

Well I can see why you want shorter aliases as version numbers if your revision IDs look like that. That's an awful structure: the least variable portions are at the front, so to remain unambiguous you have to name almost *all* of it.

The only benefit bzr's shorter version numbers have over git's SHA-1 IDs that I can see is that they are ordered, but given that that ordering is meaningless (it's branch-specific, thus more or less user-specific unless you're using a bound branch in which case you're not really using a *d*VCS at all) it seems like a terrifying amount of complexity for almost no benefit: you need new concepts like the master branch and so on just to get the numbers right!

(Heck, if you want that sort of thing in git, the ~ operator can number the commits too. From their tip, not their start, but that just makes it clearer that, dammit, this is *not meant to be long-term useful*. Plus I bet that decision speeds git up wrt Bazaar, since it never has to walk back to the start of history just to work out the commit numbers.)

Raymond: bzr is dying; Emacs needs to move

Posted Jan 14, 2014 17:18 UTC (Tue) by eliz (guest, #94829) [Link]

> given that that ordering is meaningless (it's branch-specific, thus more or less user-specific unless you're using a bound branch in which case you're not really using a *d*VCS at all)

You can call it names all you want, the fact remains that this is how Emacs maintenance is done. There's a single development branch called "trunk" where everyone commits changes, and another branch which gets only bugfixes. Given this fact, the revno numbers for the development branch are long-living and meaningful for development discussions.

> if you want that sort of thing in git, the ~ operator can number the commits too. From their tip, not their start

Tip-based numbers are only useful as long as you don't commit or merge. (bzr has them too, although in a much more human-friendly way: -1, -2, etc.) So they are much less useful than the revno numbers, and are generally used when you want to reference one of the last few commits, since counting and typing something like -12 is already cumbersome enough to make it not worth the trouble.

Once again, this is about Emacs maintenance, not about git vs bzr in general.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 19:29 UTC (Mon) by eliz (guest, #94829) [Link] (8 responses)

> with git you talk about commits by their id, the SHA1 hash (or the first 12 characters of it), and that id uniquely identifies that commit, no matter what branch it's on. How is this worse?

Who said it is worse? (Yes, I know: there are/were heated arguments about that, including in the discussion whose links I posted. Bzr revno's are convenient when they can be used, but I don't think they are the main issue here.)

> so that means that when you talk about a commit id, it may not actually refer to the same content if you are both working on the same branch on a local copy of the repo.

Yes. But when that happens, "we" know that, and won't refer to our private commits by numbers.

> That sounds like a significant contributor to confusion.

I don't think it ever happened in practice.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 19:34 UTC (Mon) by dlang (guest, #313) [Link] (7 responses)

> Who said it is worse?

Well, if the fact that git doesn't support the bzr behaviour is a a reason to not use git (which seems like what's being argued here), then some people must see the git behaviour as being worse?

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 19:52 UTC (Mon) by eliz (guest, #94829) [Link] (6 responses)

I'm not saying that git is "worse". I'm saying that the switch is not necessarily a good idea.

To me, the most important problem is the effort it will take us to switch. I feel that this effort will not be justified, since bzr serves us well, and can continue doing this for quite some time to come.

A switch like this is a lot of work. You don't invest such amounts of effort unless there are clear and present benefits.

I'm sure eventually everyone will adapt, but who knows what we will lose until then? Already one of the few core developers, who invested a lot of personal effort into setting up bzr on Savannah, expressed his displeasure by the planned switch and became less active. I'm not sure Emacs can pay such price for this "progress".

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 19:59 UTC (Mon) by dlang (guest, #313) [Link] (5 responses)

"Is it worth it" is a very different discussion than "is it possible"

Frankly, I don't care about Emacs at all. As a sysadmin who may have to edit files on random systems, I have to live with what's on those systems already, so I am a vi user. On my own system where I can customize things, I haven't seen enough value in having a different environment to bother with Emacs.

If you are looking for arguments about what the effort is worth it, that's what ESR's post was.

But when you start to say, "git won't support what the Emacs workflow", you have hit a topic I'm interested in :-) and I'll pester you until I understand what's not supported, or see that there is a way to support it (and try to get you to see it as well)

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 20:40 UTC (Mon) by raven667 (subscriber, #5198) [Link] (1 responses)

> "Is it worth it" is a very different discussion than "is it possible"

"Is it worth it" is also fundamentally an opinion and is not something that is going to be "solved" by a technical discussion of "is it possible", it may not be something with a right or wrong answer.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 20:49 UTC (Mon) by eliz (guest, #94829) [Link]

> "Is it worth it" is also fundamentally an opinion

What else is there here, except opinions? Did you really need me to tell you how bzr is different from git? The stuff I pointed to is 7 years old, and could be noticed and read by anyone who is interested.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 20:47 UTC (Mon) by eliz (guest, #94829) [Link] (2 responses)

> But when you start to say, "git won't support what the Emacs workflow", you have hit a topic I'm interested in :-)

It probably will support it, eventually, but not without some adaptations. Emacs development is very different from what the git designers envisioned and for which they optimized git.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 21:11 UTC (Mon) by dlang (guest, #313) [Link] (1 responses)

I don't think you have any idea of how many different ways people are currently using git.

Using git with a central repository is not what Linus was thinking of when he developed git, but it's a very common way for people to use git.

there are some tutorials on different workflows (including the centralized workflow) at https://www.atlassian.com/git/workflows and http://git-scm.com/book/en/Distributed-Git-Distributed-Wo...

Raymond: bzr is dying; Emacs needs to move

Posted Jan 14, 2014 5:25 UTC (Tue) by eliz (guest, #94829) [Link]

> I don't think you have any idea of how many different ways people are currently using git.

I don't think you have any idea what I know and what I don't.

Look, a flexible tool such as git can be used in a gazillion of ways. If you use it in a way that was the basis for the design, the tool will support that easily, seamlessly, and elegantly. If you use it in a way that is contrary to its design principles, it will still support that, but it will be clunky and inelegant, and will require a lot of band-aids.

If you have read any of Linus's postings on the design of git, it should be clear to you that what Emacs needs and was using for years is radically different from what he had in mind when designing and implementing git. And, Linus being Linus, what do you think are the chances that git will be "liberal" enough to make it easy for us to operate it against its basic design?

> there are some tutorials on different workflows

What makes you think I didn't read them already? I'm using git in several other projects, so I'm not talking from theory.

OTOH, there are _no_ tutorials on Emacs maintenance. Are _you_ sure you are talking about things you understand well enough to lecture me?

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 18:55 UTC (Mon) by dlang (guest, #313) [Link]

> The thing is that Git's on-disk format is unchanged since the beginning.

almost, there was one on-disk format change, but it happened within the first month or so.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 11, 2014 20:49 UTC (Sat) by paulj (subscriber, #341) [Link] (18 responses)

Multiple working directories? Git supports that: git clone the repo with the hard-links option. Alternatively, use git stash as/when required.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 11, 2014 20:52 UTC (Sat) by eliz (guest, #94829) [Link] (17 responses)

That clones the entire repo, not a branch. More importantly, merging and cherry-picking between two such repositories is complicated, to say the least. You cannot just "git merge".

Raymond: bzr is dying; Emacs needs to move

Posted Jan 11, 2014 22:47 UTC (Sat) by ABCD (subscriber, #53650) [Link] (4 responses)

While it "clones the entire repo", it takes up no more space on disk than just checking out the branch, as all the object and pack files are hardlinked (if your system doesn't support hard links, there is an option to say "also look in this checkout for object/pack files", which does the same thing except is a bit more fragile if you remove the "primary" checkout)

Raymond: bzr is dying; Emacs needs to move

Posted Jan 12, 2014 7:04 UTC (Sun) by eliz (guest, #94829) [Link] (3 responses)

Yes, I know about the hard links (and they are supported on all platforms that Emacs cares about).

However, the implications of local cloning for Emacs development and maintenance are not yet clear. E.g., it is customary to push from the release branch's clone to the remote repo -- how would this work with local clones? And what about branching in the local clone? Etc., etc. -- since this is (AFAIU) not the most popular workflow with git, there could well be dragons waiting on the way.

Prudence would have all those issues explored, researched, and solved _before_ the decision to switch (or not yet). But the "salesmen" don't care about all this, they just push and push...

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 11:33 UTC (Mon) by nix (subscriber, #2304) [Link] (2 responses)

Yeah, local clones are probably not terribly useful for you for the reasons you suggest (though you can perfectly well push to any repo you like, you are not required to go to any fixed upstream. You can specify the URI directly to 'git push', or -- preferably -- add the places you push to routinely as named remotes via 'git remote add', then push to them by naming the remote or specifying as a preferred push destination in .git/config.)

However, 'git-new-workdir' is probably what you want, since it lets you maintain multiple directories looking at multiple simultaneously-active branches, all off the same repo.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 14, 2014 10:35 UTC (Tue) by eliz (guest, #94829) [Link] (1 responses)

> However, 'git-new-workdir' is probably what you want

Probably, once its known shortcomings are resolved. For now, my understanding is that git experts advise to not yet use it, and instead wait for those problems to be resolved. See, for example

http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg...

http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg....

So I guess presently we have only one safe possibility: local clones.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 14, 2014 16:34 UTC (Tue) by nix (subscriber, #2304) [Link]

Well, you shouldn't use it if you are going to have lots of workdirs on the same branch -- though you *can*, you just have to note that doing a commit in one of those dirs will have effects on the others that will need compensating for (and it's probably a sign that you should be using a feature branch in at least one of those directories, which is of course trivial to do at any time, before or after you create the workdir). And, obviously, you can't delete the original directory, since that's where the repo is!

These are not devastating problems, particularly not if you're trying to replicate an 'each branch its own directory' workflow. I use git-new-workdir all the time, I have half a dozen workdirs live on one repository right now. Total problems: nil.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 12, 2014 0:16 UTC (Sun) by dlang (guest, #313) [Link] (9 responses)

> you cannot just "git merge".

but you can do git fetch and git pull

If you just want to merge the two branches, git pull is the answer

If you want to cherry-pick you can git fetch and then cherry-pick

more complicated, possibly. But not much more complicated, and definitely possible.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 12, 2014 6:57 UTC (Sun) by eliz (guest, #94829) [Link] (8 responses)

The point is that this merging and cherry-picking from the release to the development branch (and occasionally in the reverse direction) is routine in Emacs development. bzr supports this seamlessly, while git requires additional commands to be used, which complicate things and increase the risk of errors. E.g., 'fetch' is a command that git novices seldom use.

Again, my point is that bzr fits Emacs development like a glove fits the hand, while git less so. People who push to using git aren't involved in Emacs development and maintenance enough to understand that.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 12, 2014 8:53 UTC (Sun) by Cyberax (✭ supporter ✭, #52523) [Link] (1 responses)

It looks like it's Emacs' development model that should be changed.

Or they should use something like gerrit as a gateway.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 12, 2014 9:23 UTC (Sun) by eliz (guest, #94829) [Link]

> It looks like it's Emacs' development model that should be changed.

If you think the Emacs development model is wrong, you will have to explain how come it succeeded to keep Emacs alive, kicking, and constantly adding significant new features for the last 20 years.

While there's always place for improvement, I think there's nothing wrong with Emacs's development model, given the size and complexity of the package on the one hand, and the size of the development team OTOH. IMO, any significant change in the development model will require a lot more people to come on board and take responsibility for core parts of the package.

Anyway, there's no "one fits all" development model, each project should select its own. And the VCS should support the selected model, not force it to be changed.

I don't see how Gerrit is relevant here (or maybe I don't understand what you mean by "use gerrit as gateway"). AFAIK, Gerrit is a system for reviewing code; if so, it is entirely irrelevant, since there's hardly any code reviews in Emacs.

Again, any serious discussion about Emacs development and maintenance routines needs to begin with careful study of the ecosystem, the people who constitute it and their abilities/responsibilities, and the unique traits of the existing development process. If one doesn't begin with that, and instead suggests to blindly adopt practices from other projects, chances are that the development team will be destroyed or at least mortally wounded. I hope no one around here wants Emacs to die trying to switch from a "dying" VCS, just because some outsiders thought its development model was "wrong".

Raymond: bzr is dying; Emacs needs to move

Posted Jan 12, 2014 10:12 UTC (Sun) by pizza (subscriber, #46) [Link] (3 responses)

> Again, my point is that bzr fits Emacs development like a glove fits the hand, while git less so.

Is this really the case, or did emacs's development methodology change over time to maximize its use (and work around the limitiations) of the features bzr provided?

Raymond: bzr is dying; Emacs needs to move

Posted Jan 12, 2014 10:33 UTC (Sun) by eliz (guest, #94829) [Link] (2 responses)

>> Again, my point is that bzr fits Emacs development like a glove fits the hand, while git less so.

> Is this really the case, or did emacs's development methodology change over time to maximize its use (and work around the limitations) of the features bzr provided?

What's the difference? ;-)

Seriously, though: I don't think the methodology has changed significantly since we switched from CVS to bzr. Bzr enabled certain things that CVS made very difficult, like having two active branches for a long time and easy merging between them, but this would have been enabled by any modern VCS.

Workarounds for bzr limitations do exist, but they are at a much lower level (like the fact that cherry-picks are not tracked by the history DAG, which is worked around in bzrmerge.el), and are barely visible. The overall methodology and procedures remained largely the same, AFAIR.

The important traits of Emacs development and maintenance are:

. Relatively large number of different core areas, which only a handful of people are familiar with. Some areas are only known by a single individual.

. Two very different implementation languages, which tend to proliferate contributors that are proficient in only one of them.

. Long pretest cycles, and as result long intervals between releases.

. Development trunk and release branch diverge very quickly after the branch is cut.

. Small size of the core development team.

. There's no established and codified process of patch review and acceptance; every contributor who gets write access basically commits whatever she sees fit. Mistakes are caught by the core team when they read the diffs sent to a special list, and if the mistake is a grave one, the changeset is reverted.

. There's no single "gatekeeper" who decides what should and what shouldn't go in at any given time, and whose approval is required as a prerequisite for a commit.

None of the above changed since we switched to bzr.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 12, 2014 12:06 UTC (Sun) by dlang (guest, #313) [Link] (1 responses)

> Seriously, though: I don't think the methodology has changed significantly since we switched from CVS to bzr. Bzr enabled certain things that CVS made very difficult, like having two active branches for a long time and easy merging between them, but this would have been enabled by any modern VCS.

> Workarounds for bzr limitations do exist, but they are at a much lower level (like the fact that cherry-picks are not tracked by the history DAG, which is worked around in bzrmerge.el), and are barely visible. The overall methodology and procedures remained largely the same, AFAIR.

the thing is, both of these show that Emacs development did change to match bzr, so there's no reason to believe that it can't adapt and take advantage of the different capabilities that git would provide.

Your situation where you have very disjoint development happening across the tree seems like it will work well, The process that uploads the developer's changes to the central tree should have very few merge conflicts.

Although, the statement that large portions of the code have a bus factor of 1, with there being many different '1's across the tree makes Emacs seem like it's pretty fragile. If any of those people were to disappear you would be in real trouble.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 12, 2014 12:31 UTC (Sun) by eliz (guest, #94829) [Link]

> the thing is, both of these show that Emacs development did change to match bzr

Not bzr, a dVCS instead of a centralized VCS.

> there's no reason to believe that it can't adapt and take advantage of the different capabilities that git would provide

Sure, it can do that -- in due time. But why waste energy on such a long and painful process when the existing one is already in place and working?

> Your situation where you have very disjoint development happening across the tree seems like it will work well, The process that uploads the developer's changes to the central tree should have very few merge conflicts.

There are no merge conflicts at all, because we constantly merge from the release branch to the trunk. The issue here is a different one: the "normal" git mode of working in co-located branches, which works very well in git, is unsuitable, because switching to another branch requires a fill (and annoyingly long) rebuild of everything.

> Although, the statement that large portions of the code have a bus factor of 1, with there being many different '1's across the tree makes Emacs seem like it's pretty fragile. If any of those people were to disappear you would be in real trouble.

True, but things were like that for the last 15 years: from time to time one of the core people steps down while another comes on board. And Emacs is still very much alive.

Anyway, show me any other GNU project of a comparable size that doesn't have the same problem.

(And what does this have to do with a switch to git?)

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 11:29 UTC (Mon) by nix (subscriber, #2304) [Link] (1 responses)

Yeah, this is one thing that's held me off Emacs contributions: despite looking at it for ages I just cannot figure out what the workflow is and how it could possibly work. Merging from the release branch to the development branch is just nuts -- in fact merging in *either* direction is nuts, it means development can never diverge from the last release much, since if it did any bugfixes on release that didn't apply to development would conflict, and it means that the VCS would consider the development branch to be a descendant of every release ever made, which is just semantically wrong.

Cherry-picking selected fixes from mainline to release is what every project I have *ever* seen does, regardless of VCS, except for Emacs. I have no idea why Emacs doesn't do the same thing, except that Bazaar doesn't appear to implement cherry-picking (it does something different via a variant of merging, WTF WTF).

But perhaps I just don't understand Bazaar. To me (a longtime user of CVS and SVN before Git) Bazaar is *far* more confounding than Git ever was :( I think the problem is the documentation, which is apparently designed for packers, not mappers, and hits you with workflows to memorize rather than giving you the underlying data structures and building everything on top of them. (Bazaar couldn't really do that, since it changed data model over and over again: Git could do it because it's used the same data model from the very start.)

Raymond: bzr is dying; Emacs needs to move

Posted Jan 13, 2014 19:43 UTC (Mon) by eliz (guest, #94829) [Link]

> I just cannot figure out what the workflow is

See the BzrForEmacsDevs page posted earlier.

> Merging from the release branch to the development branch is just nuts -- in fact merging in *either* direction is nuts, it means development can never diverge from the last release much, since if it did any bugfixes on release that didn't apply to development would conflict

If merging a bugfix from release to development causes conflicts, you resolve the conflict and commit the result. But it rarely conflicts, because bzr (as all the other dVCSes) is very good at merging, due to its tracking the history DAG, and the release branch gets only bugfixes, no development.

> it means that the VCS would consider the development branch to be a descendant of every release ever made

Not sure what you mean by "descendant" here. These are just two divergent branches with a common ancestor being the branch point. Why would it be nuts to merge from one to the other, more than it's nuts to merge any two branches?

> Cherry-picking selected fixes from mainline to release is what every project I have *ever* seen does

We would have used cherry-picks as well, except that bzr doesn't track cherry-picks in the history DAG. So we merge instead, and since the release branch only ever gets bugfixes, and you normally want those on development as well, it works fairly well.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 12, 2014 10:30 UTC (Sun) by paulj (subscriber, #341) [Link] (1 responses)

You have to pull from the other repo first, yes, before merging or cherry-picking. I suspect most LWN readers are well capable of writing the trivial shell script/function needed to automate that ;).

Raymond: bzr is dying; Emacs needs to move

Posted Jan 12, 2014 10:37 UTC (Sun) by eliz (guest, #94829) [Link]

Shell scripts are already a complication: they need to be integrated into the existing front-ends, ported to Windows, etc. Talk about changing procedures to work around VCS limitations...

Anyway, the point is that with bzr you just say "bzr merge", no matter whether the branch is co-located or not, whereas with git you need to remember which one is which, and act differently.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 13:54 UTC (Sat) by lmb (subscriber, #39048) [Link] (6 responses)

Another case of "the winner takes all".

I, for one, prefer mercurial (git is DVCS written for computers, hg is DVCS written for humans). But git is more powerful and more pervasive, and there's no strong benefit to hg except usability. If I have to use and be fluent in both, I might as well use just one and free up brain cycles for other things.

Hence: git.

I'm unsurprised this is even more true for an even more marginal project like bzr. Forks and redundant development are costly; there can be excellent reasons for paying that price, but this isn't one of those cases.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 4, 2014 21:18 UTC (Sat) by tzafrir (subscriber, #11501) [Link]

Anecdote: The most recent story in LWN now is about a fairly recent program called Valentine, which seems to be fairly new, and uses Mercurial.

Anyway, whatever benefits Bazaar has over Git, Mercurial is a closer match (written in Python, interface in more similar to CVS/SVN).

Raymond: bzr is dying; Emacs needs to move

Posted Jan 5, 2014 11:22 UTC (Sun) by marcH (subscriber, #57642) [Link] (4 responses)

> But git is more powerful and more pervasive, and there's no strong benefit to hg except usability.

Any hg drawback (compared to git) you actually feel in practice?

Raymond: bzr is dying; Emacs needs to move

Posted Jan 5, 2014 13:36 UTC (Sun) by lmb (subscriber, #39048) [Link]

Not functionality-wise.

Usability is hard to capture; hg feels more natural to me and I've always been quite quickly able to figure out how to do something in ways that were "obvious" to me. With git, I've spent significantly more time reading manual pages or googling. Yes, of course, git was/is able to do everything I wanted it to, but it took me longer.

The one practical example I could give is that I found "hg mq" to be more to my liking than "git rebase". (And let's not even talk about quilt or stgit. They both suck and are quite unfriendly to use.)

I'm not blaming git for that - much ;-). Taste and aesthetics aren't hard sciences.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 6, 2014 13:44 UTC (Mon) by mathstuf (subscriber, #69389) [Link] (2 responses)

I miss the stage when working with hg (and anything else, really). Usually, I end up using git-hg before I get too deep into using hg itself, so I'm not too familiar with hg mq or the other extensions. The one time I did try making a patch with it, the verb mismatches between git and hg screwed me over pretty hard.

Yes, I know there is the shelve extension, but I dislike having to chase down 10+ extensions and configurations if I were to sit down at someone else's machine to drive. Git has everything I need except for some aliases and minor config tweaks I can live without out-of-the-box.

Raymond: bzr is dying; Emacs needs to move

Posted Jan 6, 2014 15:09 UTC (Mon) by marcH (subscriber, #57642) [Link] (1 responses)

Don't most distributions provide some kind of "apt-get install hg-sumo" virtual package?

Raymond: bzr is dying; Emacs needs to move

Posted Jan 6, 2014 15:14 UTC (Mon) by mathstuf (subscriber, #69389) [Link]

First time I've heard of it (Fedora also doesn't seem to have it). Plus, I thought most extensions shipped with hg these days, just disabled by default.


Copyright © 2014, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds