From: Jakub Narebski <jnareb@gmail.com>
To: "Arne Babenhauserheide" <arne_bab@web.de>
Cc: git@vger.kernel.org, mercurial@selenic.com, SLONIK.AZ@gmail.com
Subject: Re: [VOTE] git versus mercurial (for DragonflyBSD)
Date: Tue, 28 Oct 2008 00:25:17 +0100 [thread overview]
Message-ID: <200810280025.18234.jnareb@gmail.com> (raw)
In-Reply-To: <200810272149.13542.arne_bab@web.de>
Dnia poniedziałek 27. października 2008 21:48, Arne Babenhauserheide napisała:
> Am Montag 27 Oktober 2008 19:01:48 schrieb Jakub Narebski:
> > Besides is writing plugin in Python for Mercurial that much easier
> > than writing new command or stuff in C for Git? Well, perhaps it is,
> > as only recently there began to appear API documentation, and there
> > were created utility mini-libraries like strbuf, or string_list,
> > or parseopt.
>
> Yes, for two main reasons:
>
> 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.
In Git you can write in C, using (underdocumented) git API, or you can
script (in shell script, in Perl, in Python, in Ruby) using git plumbing
commands which are meant for scripting (or bindings in appropriate
language).
Most new features, like git-remote tool to manage interaction with
multiple remote repositories, each of which can have multiple branches,
start as a shell or Perl script, and when they and their UI mature they
get converted into C (made into builtin). Builtinification is done not
only for performance, but also for portability (think Perl support on
MS Windows).
So in Mercurial you can write in Python, or you can write in C; in Git
you can write in any scripting language (e.g. shell script, Perl, Tcl/Tk),
or you can write in C... yes, I know it is oversimplification...
> 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".
Well, if I remember correctly if you drop git-foo in EXEC_PATH, then
you would be able to call it as "git foo". So adding commands is easy.
Git provides a few entry points which can be used to extend
functionality. They are: hooks system; gitattributes to define custom
merge, diff and clean/smudge (checkout) drivers per file (pathname);
custom merge strategies; EXTRENAL_DIFF and EXTERNAL_GREP.
I'm not sure if other messing with core functions is a good idea to
have such ability accessible.
> > The extending via plugins idea used by Mercurial, so succesfull IMHO
> > for Firefox, and I think quite successfull for ikiwiki for example, is
> > not without drawbacks, especially that there is no plugins clearinghouse,
> > and plugins are required for what is considered pretty required
> > functionality, like bisect before hg 1.0.
>
> But they can just be included in the core distibution once they become central
> enough.
Having some extensions blessed to be included with core program (like
ikiwiki with goodstuff, and similar to Git with contrib/ section)
solves some problems of relying on extensions for basic functionality.
I for example consider bisect and patch+mail workflow tools to be basic,
while patch queue management (well, patch management in general) to be
something that can be built on top of SCM, like StGit, Guilt, TopGit
for Git, or mq (Mercurial Queues) for Mercurial.
>
> It's a way of allowing people to add functionality they miss without forcing
> them to mess with core code instantly.
The problem with extensions IMVVVHO is that they don't require to
follow strict "inclusion in core" standards, which means that there
is no pressure to add them to core... which for example leads to
including bisect in core only since hg v1.0, "because it is available
as extension".
Requiring to use large amount of extensions to having required
functionality is also one of bad consequences of extension based
development, although having default set of extensions that can be
turned on via some metaextension / metapackage (like ikiwiki's
goodstuff) reduces impact of this.
Extensions / modules / plugins are good in projects with high
barriers of development, like Mozilla / Firefox, GNU Emacs, etc.
but I am not sure if it doesn't make for slower core development...
> Gits missing plugin system might just be a reason, why its usability still
> suffers from many problems: They have to do everything for everyone all the
> time, so the chances are high, that they won't do it really good for anyone
> (but the main git coders).
Well, Git doesn't have plugin system, but is easily scriptable...
And, at least according to annual Git User's Survey results (on git wiki)
many people create their custom scripts and scriplets to make their work
with SCM easy...
--
Jakub Narebski
Poland
next prev parent reply other threads:[~2008-10-27 23:26 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-26 4:28 [VOTE] git versus mercurial walt
2008-10-26 14:15 ` [VOTE] git versus mercurial (for DragonflyBSD) Jakub Narebski
2008-10-26 14:30 ` Maxim Vuets
2008-10-26 15:05 ` Leo Razoumov
2008-10-26 18:55 ` Jakub Narebski
2008-10-27 0:20 ` Arne Babenhauserheide
2008-10-27 4:15 ` Leo Razoumov
2008-10-27 7:16 ` Arne Babenhauserheide
2008-10-27 7:16 ` dhruva
2008-10-27 0:47 ` Arne Babenhauserheide
2008-10-27 1:52 ` Jakub Narebski
2008-10-27 7:50 ` Arne Babenhauserheide
2008-10-27 9:41 ` Jakub Narebski
2008-10-27 10:12 ` Leslie P. Polzer
2008-10-27 10:14 ` Arne Babenhauserheide
2008-10-27 12:48 ` Jakub Narebski
[not found] ` <200810271512.26352.arne_bab@web.de>
2008-10-27 18:01 ` Jakub Narebski
2008-10-27 20:48 ` Arne Babenhauserheide
2008-10-27 21:07 ` Miklos Vajna
2008-10-27 21:30 ` Arne Babenhauserheide
2008-10-28 0:13 ` Miklos Vajna
2008-10-28 17:48 ` Andreas Ericsson
2008-10-28 19:11 ` Arne Babenhauserheide
2008-10-28 19:38 ` SZEDER Gábor
2008-11-06 16:25 ` Marcin Kasperski
2008-11-06 17:41 ` Isaac Jurado
2008-10-28 19:16 ` Randal L. Schwartz
2008-10-27 23:25 ` Jakub Narebski [this message]
2008-10-27 9:29 ` Benoit Boissinot
2008-10-27 10:57 ` Jakub Narebski
2008-10-27 14:29 ` 0000 vk
2008-10-27 14:57 ` Jakub Narebski
[not found] ` <1225100597.31813.11.camel@abelardo.lan>
2008-10-27 11:42 ` David Soria Parra
2008-10-27 20:07 ` Brandon Casey
2008-10-27 20:37 ` Jakub Narebski
2008-10-28 1:28 ` Nicolas Pitre
2008-10-26 15:57 ` Felipe Contreras
2008-10-26 19:07 ` Jakub Narebski
2008-10-26 19:54 ` Felipe Contreras
2008-10-28 12:31 ` [VOTE] git versus mercurial walt
2008-10-28 14:28 ` Johannes Schindelin
2008-10-28 14:41 ` Git/Mercurial interoperability (and what about bzr?) (was: Re: [VOTE] git versus mercurial) Peter Krefting
2008-10-28 14:59 ` Johannes Schindelin
2008-10-28 15:02 ` Git/Mercurial interoperability (and what about bzr?) Matthieu Moy
2008-10-28 15:03 ` Git/Mercurial interoperability (and what about bzr?) (was: Re: [VOTE] git versus mercurial) Nicolas Pitre
2008-10-28 15:33 ` Pieter de Bie
2008-10-28 19:12 ` Miklos Vajna
2008-10-28 21:10 ` Miklos Vajna
2008-10-28 21:31 ` Theodore Tso
2008-10-28 23:28 ` Miklos Vajna
2008-11-01 8:06 ` Git/Mercurial interoperability (and what about bzr?) Florian Weimer
2008-11-01 10:03 ` Santi Béjar
2008-11-01 10:33 ` Jakub Narebski
2008-11-01 10:44 ` Florian Weimer
2008-11-01 11:10 ` Florian Weimer
2008-11-01 12:26 ` Jakub Narebski
2008-11-01 13:39 ` Theodore Tso
2008-11-01 17:51 ` Linus Torvalds
2008-11-02 1:13 ` Theodore Tso
2008-11-01 10:16 ` Git/Mercurial interoperability (and what about bzr?) (was: Re: [VOTE] git versus mercurial) Peter Krefting
2008-10-29 19:11 ` [VOTE] git versus mercurial Shawn O. Pearce
2008-10-29 19:36 ` Boyd Lynn Gerber
2008-10-29 19:48 ` Johannes Schindelin
2008-10-29 19:51 ` Boyd Lynn Gerber
2008-10-29 8:15 ` Miles Bader
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200810280025.18234.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=SLONIK.AZ@gmail.com \
--cc=arne_bab@web.de \
--cc=git@vger.kernel.org \
--cc=mercurial@selenic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).