Echoing a post: bzr vs. git

Adrian Wilkins adrian.wilkins at gmail.com
Fri Oct 31 12:24:20 GMT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> One branch per directory

AFAIK, there's no technical reason (apart from the feature not being
implemented) that you couldn't store multiple branches in the repository that is
contained in a checkout. I confess that I find myself wanting this sometimes ;
particularly when `switch` searches for sibling folders, but `merge`, `pull`,
etc do not.

I think it would actually be beneficial to support both models ; as it is,
making a new branch on the spur of a moment can consume a lot of disk (and more
importantly, the time to copy the files), as you point out later on.

Someone may mention looms at this point... I've not tried them out, but they are
not a core feature.

> Revision numbers

I think your point about not noticing SHA-1 in git also applies to Bazaar,
except that you instead end up not noticing the dotted integers, which are
perhaps initially more easy to pay attention to, distracting you from where you
should be looking, at revisionspec.

I think it's a valid point that by default, using a mutable alias for display
instead of the immutable identifier that git uses, can be confusing. In a way,
git is giving you pain up front to spare you pain later.

Both have means of querying for revisions. If there's a particular query in git
that you miss in Bazaar, please mention it ; someone may like the idea enough to
implement it.

> Scriptability

- From a Windows point of view, I find the commands that have XML output options
are very scriptable on my working shell of choice, which is Windows Powershell -
since you can treat XML as an object in PoSH, you can do stuff like the script
below [1] ;

I periodically attempt to get Bazaar to run under IronPython. Aside from the
possibility that IPy will increase performance, I think having Bazaar as a
Powershell snap-in would be marvellous because of all the tricks you could do by
passing objects around the pipeline. Traditional pipelineing on Windows sucks
because fork() is so costly. Being able to script Bazaar with Python is
advantageous on Windows for this reason also.

Alas, IronPython is not tremendously compatible with CPython. :-(

One of the core design criteria for SVN was always that the output should be
easily parseable for scripting ; Linus claims he used SVN as a template of how
_not_ to do things, but somehow I think that on this point, he agreed. I don't
see this point mentioned on the Bazaar site but it should be a central tenet of
all CLI apps, well worth making an explicit effort for. XML output is probably
easier to design (because you can add things wherever without breaking it) and
to parse (not faster or more lightweight, just easier). Alternate outputs like
protocol buffers or JSON might also be nice (and maybe faster where you really
need performance). Extensible formats can progress faster than fixed-column
formats because they have room to grow.


I do think discussing the various merits of bzr vs git is useful, and not at all
flamey. Advancing either project helps both, because later the other may learn
something also.


[1]
<! powershell

$xml_log = [xml](bzr log --forward --xml)

$log.logs.log | foreach {
if($_.tags -ne $null ) {

        $_.tags.tag | foreach {
           $cptag = $_
        }

        # change the main branch to this revision
        cd $trunk
        bzr revert -r tag:$cptag

        # change the delta to the previous revision
        cd $delta
        bzr revert -r before:tag:$cptag

        # write workid file
        cd $trunk
        $cptag.Substring(4) | out-file -enc ascii $trunk\.workid

        cd $pwd

	# publish a snazzy change report between the two branches
        ./publish -a:changes 	--basemodel $delta `
				--deltamodel $trunk `									--outputpath $webroot `
				--properties Publishing.Properties `
				--errorlog $webroot\$cptag.err.xml
    }
}

!>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJCvj0cP1uebIhWSYRAkEpAJ9iP14AEW9ZbF8WaTCrT4otmzB6bgCfU5Ow
t0QCD8/CkJxc8+OtHhVZojw=
=8uYa
-----END PGP SIGNATURE-----



More information about the bazaar mailing list