git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [ANNOUNCE]: PyGit and libgit-thin

From
LCLuiz Fernando N. Capitulino <lcapitulino@gmail.com>
Date
Jul 25, 2007, 20:55 UTC
Message-ID
<e28f90730707251355vc1fc47ftc7851324ddfad771@mail.gmail.com>
In-Reply-To
<20070725195010.GA30277@nan92-1-81-57-214-146.fbx.proxad.net>
Hi Yann,
On 7/25/07, Yann Dirson <ydirson@altern.org> wrote:
Show 8 quoted lines
> On Mon, Jul 23, 2007 at 09:35:47AM -0300, Luiz Fernando N. Capitulino wrote:
> > Now I need to know whether this' really useful to other people and
> > if so, what would be missing for you to start using it.
>
> The python module would really be useful to StGIT.  Currently, an
> stgit commands typically has to fork several git commands at least,
> and using library calls instead would surely help with the
> performance.
 Cool.
Show 28 quoted lines
> I had a quick look at the current pygit API (as described in the
> README), and I find the current revlist one somewhat confusing.  Why
> using post-contructor methods, and not using named args in the
> constructor itself ?
>
> That is, the example reading:
>
> >>> rv = repo.revlist()
> >>> rv.include('8d9107e8c50e1c4ff43c91c8841805833f3ecfb9')
> >>> rv.count = 10
> >>> rv.show_merges()
> >>> for commit in rv:
> ...  print commit.id()
> ...
>
>
> would be IMHO much nicer to use as:
>
> >>> rv = repo.revlist(include=('8d9107e8c50e1c4ff43c91c8841805833f3ecfb9'),
> ...                   count = 10,
> ...                   show_merges = true)
> ...
> >>> for commit in rv:
> ...  print commit.id()
> ...
>
>
> What do you think ?
 I think you're right, that'd be nicer.
 The problem is that the revlist operation accepts a lot of options,
and to change
all (or a big amount of them) would force one to build a very length list of
arguments.
 Currently we have just a few, but we'll add more in the future.
 Also, I think that it won't be that nice to play with include() and exclude(),
since you can call them more than once.
 I'm not sure whether in its current state the module (plus the library) is
useful for stgit.
 Please, feel to make questions and to ask for what'd be missing for you
to adopt it.
 I'm a quilt user and completely forgot that stgit is written in python. I'll
take a look.
 Thanks for your comments,
-- 
Luiz Fernando N. Capitulino
Previous: Jan Hudec
Message 5 of 5 in “[ANNOUNCE]: PyGit and libgit-thin”
  1. Luiz Fernando N. CapitulinoJul 23, 2007
  2. Yann DirsonJul 25, 2007
  3. David KastrupJul 25, 2007
  4. Jan HudecJul 25, 2007
  5. Luiz Fernando N. CapitulinoJul 25, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.