On Mon, Oct 27, 2008 at 09:48:50PM +0100, Arne Babenhauserheide <arne_bab@xxxxxx> wrote: > 1) Writing Python is much easier and quicker than writing C, especially when > you can just experiment with the Python interpreter (or better still: with > ipython). No memory management hassle, no strange compiler bugs, no stray > pointers. Just plain writing what you want to do. But if you need C speed, you > can still include parts written in C - where you really need it. For all other > cases you have more readable and far more compact code. You compare Python to C here, but did you realize that in git you can write your git command in any language you want? Of course it's recommended to do it in C/shell/perl if you want to get it included in git.git, but that's just a decision. > 2) You can easily access every core function, and you can replace every > command. > You don't have to invent a "git foolog" command. Instead you can just adapt > the regular log to do a foolog which people can use via "hg log". IIRC the main reason git aliases can't overwrite git commands is because that would break scripts relying on the output of existing git commands. Given that I install such an extension, won't my script break? > The defaults should be the most common way to use the tool, so people can > easily learn it. > > Advanced stuff can be added with extensions. From a user's point of view, I think external git commands and such hg plugins are equal. The user instally the "foo" extension/command/plugin/whatever and gets the "git/hg foo" command. > And because the most used plugins are distributed with Mercurial, I can also > activate them when I don't control the Mercurial installation - and should > something be missing which I need, I can just download and activate a plugin > without having to compile anything, since they are simply Python modules. > > Just set > [extensions] > foo = /blah/foo.py > > in ~/.hgrc and the foo plugin is active. Same for git, as long as it's written in a scripting language; you should include git-foo in PATH then you can use git foo.
Attachment:
pgpzmy8FnYyJm.pgp
Description: PGP signature