From: "Govind Salinas" <govind@sophiasuchtig.com>
To: "Steven Walter" <stevenrwalter@gmail.com>
Cc: "Jakub Narebski" <jnareb@gmail.com>, git@vger.kernel.org
Subject: Re: [ANNOUNCE] yap: Yet Another (Git) Porcelain
Date: Mon, 8 Sep 2008 23:25:00 -0500 [thread overview]
Message-ID: <5d46db230809082125v3ac7e36cx2cfd02fdfba0e987@mail.gmail.com> (raw)
In-Reply-To: <e06498070809081805l46ff295du69d8c9a2cc0ef59a@mail.gmail.com>
On Mon, Sep 8, 2008 at 8:05 PM, Steven Walter <stevenrwalter@gmail.com> wrote:
> On Sun, Sep 7, 2008 at 11:45 PM, Govind Salinas
> <govind@sophiasuchtig.com> wrote:
>>>> To my knowledge, Pyrite does not support plugins.
>>
>> Depends on what you mean by plugins. There is a way to load what I call
>> extensions that you can use to add commands or modify the way existing
>> commands operate. It is crude at the moment but it works. I have a
>> proof of concept extension/plugin that adds different ways of specifying
>> revisions. I assume you mean something similar.
>
> That pretty well describes what I mean by a plugin system. Does your
> system allow anything other than commands to be overridden? Do your
> commands ever call other commands, and if so, will the overridden
> method be called in that case?
>
Yes, but this is where it gets crude. There are several things that happen.
You get an on_load() call that happens when the extension is loaded. You
can use that to add a command. You also get an on_before_command()
and on_after_command() that get called when you might expect, you can
use this to do anything from alter command line parameter to post-
processing etc. After that you have to hook methods, python makes this
pretty easy. There is a known hook point by convention in every command,
after that you have to know what you want to hook in the particular command.
> Yap's plugin system is pretty nice (IMHO), but it was designed almost
> exclusively as a means to an end: the svn plugin. With the svn
> plugin, "yap clone" will accept an SVN url as readily as a git URL,
> and the result it what you would expect if you had a git URL: a
> full-history git clone of the svn repository with all branches and
> tags. Obviously, the svn clone would be much slower than the
> equivalent git command, but that's the price one pays in interacting
> with svn. However, this "yap" repo can then be cloned, and all the
> svn meta-information will be present in the new repository. This
> means that the new repository can immediately be used for pushing
> commits back to the original svn repository without any additional
> configuration. Additionally, you can use an svn revision anywhere a
> git committish can be used.
>
You should be able to use the plugin system I have to hook the clone
command and run something different in the event that you have a svn
URL. You would probably do this on_before_command. This was
actually something someone brought up in a pyrite thread a while
back. That should not be complicated.
> In a yap "yap-svn" clone, "svn" appears as just another remote. "yap
> push svn foo" does the expected thing. Likewise for fetching and
> updating. In theory a similarly parallel interface could be provided
> to other SCMs. Facilitating users who track SVN repositories with git
> was one of the majors goals of the yap project, and I encourage users
> who do so to give yap a try.
>
>> I am currently not doing much work on the command line interface since
>> people seemed to object to my ideas. Instead I am focusing on the gui
>> instead. Since you say you are not going to keep the command lines
>> compatible, what do you intend to do differently?
>
> The command-line interface has been my primary focus, as that is what
> I and my co-workers usually use. The interface that yap has now is
> intended to be more orthogonal and "safer" than the standard git
> porcelain. By "safer" I mean that yap will not perform an operation
> that cannot be readily reversed without explicit confirmation (an "-f"
> flag, for instance). For example, the closest equivalent to "git
> reset --hard" in yap is "yap point." yap point fails if there are any
> uncommitted changes (staged or unstaged), or if it would create
> "dangling commits" that can no longer be referenced by a ref (unless
> "-f" is given). On the orthogonal side, "yap" provides
> commit/uncommit as a pair, as well as stage/unstage. They are small
> things, but small things can make a big improvement in user experience
> (especially if it keeps you from killing uncommitted changes you had
> forgotten about).
I had some very different ideas along the lines of reducing the number of
commands (where the commands do something similar just DWIM rather
than force me to remember or read docs on different commands), making
commands look similar to commands from other SCMs (revert should do
what it does for me in all the other SCMs that I have used, which is to
checkout the HEAD copy into the working directory) and improve
usability (WTF does ".." mean vs "..." and why is it different for different
commands, etc). Perhaps we can talk and see if there is enough room for
both our goals.
A further goal of mine is to eventually help with the libgit project so that git
operations can be done from inside they python process rather than a
fork and exec. This is an optimization, but it can also be used to get rid
of any scripting that remains in git, making it possible to have git on
windows without MSYS or cygwin. Pyrite is very ambitious, as you might
tell from how long it has been taking me to do it.
-Govind
next prev parent reply other threads:[~2008-09-09 4:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-06 15:07 [ANNOUNCE] yap: Yet Another (Git) Porcelain Steven Walter
2008-09-06 15:36 ` Jakub Narebski
[not found] ` <e06498070809060912q2f7ed0cflb02e3efc7b81976e@mail.gmail.com>
2008-09-06 19:01 ` Jakub Narebski
2008-09-06 20:04 ` Steven Walter
2008-09-08 3:45 ` Govind Salinas
2008-09-09 1:05 ` Steven Walter
2008-09-09 4:25 ` Govind Salinas [this message]
2008-09-06 16:39 ` Giuseppe Bilotta
2008-09-06 17:39 ` Jeff King
2008-09-06 18:33 ` Steven Walter
2008-09-06 18:40 ` Jeff King
2008-09-06 18:45 ` Steven Walter
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=5d46db230809082125v3ac7e36cx2cfd02fdfba0e987@mail.gmail.com \
--to=govind@sophiasuchtig.com \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=stevenrwalter@gmail.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).