Is it easier to manage code with Git or Bazaar? [closed]
Asked Answered
P

7

24

I'm researching the Git and Bazaar capabilities and wonder which one has more feature-rich code management?

Plosion answered 18/6, 2009 at 3:10 Comment(1)
M
30

I suppose you also read Bazaar vs. Git article, but in the end, it all comes down to what you are looking for in term of "feature-rich code management".

  • If, by code management, you are referring to file (and directories and renaming), go with Bazaar.

  • If, by code management, you are looking at content management, Git is designed to manage just that (the staging area, for instance, allows you to record what current content you want to commit, even though you have already begun to make some large modification you end up not wanting to commit in the current branch)

To be sure, re-read Linus's original vision for Git (back in April 2005). If you do agree with it, chances are Git will deliver what you want. In short:

  • very simple model (blob-tree-commit-tag)
  • no metadata added (for tracking renaming for instance)
  • "strong" principles like:
    • "files" do not matter. The only thing that matters is how "content" moved in the tree
    • You have an SCM that tracks what changed at the only level that really matters, namely the whole project. None of the information actually makes any sense at all at a smaller granularity, since by definition, a "project" depends on the other files, or it wouldn't be a project

That "all project" notion is actually a strength and a limit for Git in term of project management: you should not seek to put everything into one Git repository.

Millesimal answered 18/6, 2009 at 7:21 Comment(8)
I'm not sure exactly what you mean by "file" versus "content". Bazaar already allows you to cherry-pick which files you want to commit into a branch, so I don't see what's gained by having a staging area. I don't see how you can not want file information to be tracked. For instance, in java, you really need to make sure all files have the right name, but it's still important no matter what the project is. When I think of "file" management, I think of sourcesafe & cvs's per-file versioning -- which bazaar is decidedly not.Benedetta
@FryGuy: may be this answer might be a little more explicit: #996136Millesimal
@FryGuy: git can detect changes across files. For example, say you have one file with two functions, and split it into two functions. You simply cannot track this using rename. Git and its rename detection can do this, and it works very well in my opinion (but is slow - very slow compared to other git operations, it can take up to 10-15 seconds for large files). I have an example here: cournape.wordpress.com/2009/05/12/… To me, this + cheap branches are the two killer features of git compared to other tools.Conjunctivitis
According to the comments on that article, that is just post-hoc analysis tools -- the same could be done with bazaar, just like git could have as good of a gui tool as qbzr. Both git and bzr store snapshots of the directory tree at each revision.Benedetta
Yes, it is "just " post-hoc analysis - but I disagree that the same could be done in bzr. In theory, sure, you are right, but in practice, to be able to handle the whole tree in an efficient manner is so deeply ingrained in git, and it is out of the question with bzr for big repo ATM (bzr needs several copies of every file it handles in memory IIRC, so handling all of them at the same time would be painful). I think it will be a very long time before you see the feature in bzr or hg, if ever.Conjunctivitis
very simple model (blob-tree-commit-tag) don't forget: files, a working directory, a repository, versions, branches, tags, remotes (pointers to remote repositories), commits, treeishes (pointers to commits), branches, a stash, refs, tags, the reflog, fast-forward commits, detached head state (!), remote branches, tracking, and namespacesImpend
Unfortunately the link to 'Linus's original vision' doesn't work any more.Perspicacious
@Perspicacious Not a problem: I have restored the link.Millesimal
C
14

It's going to come down to personal preference, plain and simple.

I use Bazaar and find it extremely easy. The staging area concept in Git gives some nice flexibility but it also adds complexity. You can quite easily manage code in Bazaar with something like 4 commands (add, commit, merge (maybe push/pull) and log or qlog), and you only need merge if you want multiple branches.

Usually Bazaar seems to do the right thing. I've never really had a problem with it doing something stupid or letting me do something stupid.

Criminality answered 18/6, 2009 at 3:19 Comment(0)
C
10

I think it depends on your personal taste - there are arguments for both of them. I have used bzr extensively for personal projects for a couple of years, since the 0.8 days, but I have switched to git last year, and never looked back, at least for source code management.

I am too lazy to rewrite my own impression, but to sum it up:

  • bzr works more consistently across platforms
  • bzr is more discoverable (if you are given the tool wo any documentation, any semi-competent user will be able to use bzr, that's not so true with git)
  • bzr is easier to extend in an API way, git is easier to extend in a unix way (pipes)
  • git is immensely more powerful IMHO; in particular, I am convinced that their approach for rename handling, and content tracking is the right one for many cases
  • the bzr revno system is not good IMHO. It looks simpler, but it is deeply confusing once you start having many branches and change the mainline.
Conjunctivitis answered 18/6, 2009 at 10:26 Comment(0)
P
10

Bazaar's development has stopped. The last release is 2.6, dated 2013-08-04. There have been less than 20 commits since then as of April 2015.

If you're starting with version control, you should consider one that is active (most likely this will be Git or Mercurial).

Edit 1: a 2.7 release was made since my post, but it doesn't change the fact that the project is essentially dead with ~10 commits/year.

Edit 2: there's now a fork of bazaar called Breezy with more activity than Bazaar. I doubt this will become a really active project, but at least this means the tool is maintained (it should survive the end of Python 2 for example, one of the goals of Breezy being to port to Python 3).

Peculiar answered 27/4, 2015 at 19:11 Comment(2)
It seems it's being developed again doc.bazaar.canonical.com/beta/en/whats-new/…Homonym
The link you point to talks about the latest release, 1 year ago. There have been 3 commits in 2017 and no commit in 2018 yet. I wouldn't call this active maintenance ;-). Breezy OTOH seems reasonably active (not an activity comparable to hg or git, though).Peculiar
P
2

Bazaar is very well integrated with ubuntu, I have been using ubuntu for many years now, tired to switch to other more geeky distro, but no point. I choose bazaar over git/mercurial coz bazaar is notifications are very well integrated in Ubuntu. In addition you get free hosting from Launchpad which is a huge plus.

Pleiades answered 16/7, 2009 at 3:55 Comment(1)
It's not a plus since you can also get free Git hosting from GitHub and others.Bucovina
U
1

The one thing that Git does much, much better is handling lots of branches. It does it much faster than bzr, and doesn't require multiple copies of the source code. All branches are inside the same directory. I find myself using git branches much more often than I used to do with bzr, specially because my repo is not small and also involves binary files (total 180MB).

EDIT: Actually, I'm wrong. --no-trees + lightweight checkout does work like Git. Thanks, FryGuy. Oh, and I found this blog entry which has useful information.

Unconstitutional answered 9/7, 2009 at 13:30 Comment(4)
You can achieve the same workflow in bazaar. That's one of the features of it I like, in that you can use any workflow you want, rather than the "git way" of doing things. See --no-tree branches, and --lightweight checkouts, and bzr switch between the branches (as folders on your disk).Benedetta
You'll still have multiple copies of the source code, one for each branch, so, it's the same workflow, but not the same approach. Anyway, when using bzr, you should use stacked branches, it's better than lightweight checkouts.Passably
No you won't have multiple copies of the source code. That's what "no-trees" does. I've got over 70 branches on my current project, and only one copy of the source code on my hard drive (in bazaar at least, I have a few other snapshots before I started using bazaar). My .bzr folder is ~190 megs, and my source tree is 1.76gigs, so I'd notice if it were there multiple times.Benedetta
that's my repository .bzr folder, not the branches. My branches folder is only 22k total.Benedetta
N
1

The best reason to use git vs bzr/hg is because github rocks. Launchpad is OK, but github gets search, social and style right.

Technically launchpad is probably better in many ways. Merges, integrated build systems, and other features make launchpad appealing to many. The builtin editor on github, the gists... there's a flow there that launchpad doesn't have. Visually, socially, there's no competition.

Norford answered 29/5, 2015 at 19:39 Comment(2)
GitHub is unethical. See gnu.org/software/repo-criteria-evaluation.html.Overstudy
@AkibAzmain 100% agree. still, launchpad just isn't usable by comparison.Norford

© 2022 - 2024 — McMap. All rights reserved.