lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: the "r" in "git pull -r"


From: Johannes Schindelin
Subject: Re: the "r" in "git pull -r"
Date: Mon, 10 Aug 2009 14:17:39 +0200 (CEST)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

Hi,

On Mon, 10 Aug 2009, Graham Percival wrote:

> On Mon, Aug 10, 2009 at 10:34:11AM +0200, Johannes Schindelin wrote:
> > On Mon, 10 Aug 2009, Graham Percival wrote:
> > 
> > > We've lost 50% of potential contributors to the website because of
> > > git.
> >
> > Fair enough.  Maybe it is time to suggest an easy interface to Git?  You 
> > could even write a very simple wrapper around Git that _just_ downloads 
> > the current version of LilyPond, allows the user to edit the files and 
> > then click another button to send the patch.
> 
> Seriously?!  That would be **fantastic**!
> 
> I don't think it needs to be a GUI, though.  A program or script
> that downloads the latest material on the master/ branch, then
> produces a patch upon request.  Like:
> 
> $ git-easy get
>     (produces lilypond/ with the current master/ branch)
> $ cd lilypond/
> $ git-easy update
>     (downloads any updates)

This could be combined into a single call that automagically checks if 
lilypond.git was already cloned/init&remote added.

> $ vi Documentation/learning.itely
> $ git-easy commit
>     (produces a patch in ../ )
> $ git-easy reset
>     (reverts to exactly the online master/ branch)

I'd actually make throw-away branches under the hood, so that it is easy 
to get at previous commits if need be (although this will need a little 
hand-holding by a Git-savvy person).

> I know that a command-line app would be a bit unfamiliar for windows 
> users, but I'm ok asking them to learn that much.

It is _so_ easy to make a simple Tcl/Tk GUI.

Example:

-- snip --
#!/usr/bin/wish

package require Tk

wm title . "LilyPond Contributor's GUI"

set lily_dir $env(HOME)/lilypond

proc call_git {args} {
        global lily_dir
        set args [linsert $args 0 git --git-dir=$lily_dir]
        puts "execing $args"
        if {[catch {eval [eval exec $args]} msg]} {
                tk_messageBox -type ok -message $msg
        }
}

proc update_lilypond {} {
        global lily_dir
        if {![file exists $lily_dir]} {
                call_git clone git://repo.or.cz/lilypond.git
        } else {
                call_git pull
        }
}

button .update -text "Clone/Update LilyPond" -command update_lilypond
pack .update
-- snap --

Of course, this is not really a fully functional script:

- it needs to check if the user name and email is set correctly, and ask 
  the user for this information otherwise,

- it needs to get a button for committing and sending the patch (renaming 
  the branch to a unique name (probably based on the commit message) and 
  re-checking out the 'master'),

- it probably should not clone, but do a shallow fetch of the correct 
  branch, and

- it needs to show the progress of the command in a text area.

But you get the idea.  I do not expect this script to be larger than 3kB, 
tops.

Ciao,
Dscho





reply via email to

[Prev in Thread] Current Thread [Next in Thread]