lilypond-devel
[Top][All Lists]
Advanced

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

Re: Configuring git-cl


From: Adam Spiers
Subject: Re: Configuring git-cl
Date: Sun, 13 Jan 2013 22:55:22 +0000

Resurrecting an old thread, because I had the same questions due to
the gaps in the contributor's guide ...

On Tue, May 15, 2012 at 3:51 PM, Łukasz Czerwiński <address@hidden> wrote:
> On 15 May 2012 16:35, Graham Percival <address@hidden> wrote:
> > On Tue, May 15, 2012 at 02:19:34PM +0200, Joseph Rushton Wakeling wrote:
> > > * Tree Status URL  (I put the URL of the LP git repo);
> >
> > IIRC the git-cl on my github account adds a URL which allows us to
> > search for lilypond patches (which would further reduce the chance
> > of lost patches).  IIRC this happened a few months ago, but I
> > can't remember how to do the actual searching, nor whether this is
> > included by default or not.
>
> As far as I understand, you mean this:
>
> http://codereview-hr.appspot.com/repos - find "Lilypond" and click the link
> "search". That's what Janek has changed some time ago with my little help.

That page shows:

    *trunk*  Trunk
http://git.savannah.gnu.org/gitweb/?p=lilypond.git/trunk/   (search)

and the "search" link goes to:

    
https://codereview-hr.appspot.com/search?base=http://git.savannah.gnu.org/gitweb/?p=lilypond.git/trunk/

Both links are broken.  Presumably they worked at some point, and then
something changed.  Maybe Janek or Graham can shed light on this?

Anyhow, the first is trivially fixable by removing the trailing
"trunk/", but I have no idea what the value of the "base" parameter is
supposed to be in the second one.  Removing it altogether gives a
search form:

    https://codereview-hr.appspot.com/search

but I can't figure out how to persuade it to list all lilypond-related
reviews.  In any case, the URL given during interactive configuration
of git-cl to the "Tree Status URL" question gets used by the following
code in git-cl:

    def GetTreeStatus():
      """Fetches the tree status and returns either 'open', 'closed',
      'unknown' or 'unset'."""
      url = settings.GetTreeStatusUrl(error_ok=True)
      if url:
        status = urllib2.urlopen(url).read().lower()
        if status.find('closed') != -1 or status == '0':
          return 'closed'
        elif status.find('open') != -1 or status == '1':
          return 'open'
        return 'unknown'

      return 'unset'

So I get the impression that it has nothing to do with that search
form.  It is required to make the "git cl tree" sub-command work:

    $ git cl tree
    You must configure your tree status URL by running "git cl config".

Since the URL is not parametrised in any way, whatever the tree status
indicates must apply to the whole tree.  I'm guessing that Rietveld
has some mechanism for globally flagging a source tree as "closed"
e.g. for occasions where you want to freeze normal development and
focus on something else (I'm not sure what though ...)  I tried all
kinds of googling to figure out what this mechanism might be and where
to find it, but had no luck :-/

> > > * ViewVC URL (I hit newline; I've no idea what this is).

This one is used exclusively by "git cl dcommit":

  if cl.has_RietveldIssue and output.find("Committed r") != -1:
    print "Closing issue (you may be prompted for your codereview password)..."
    viewvc_url = settings.GetViewVCUrl()
    if viewvc_url:
      revision = re.compile(".*?\nCommitted r(\d+)",
                            re.DOTALL).match(output).group(1)
      cl.description = (cl.description +
                        "\n\nCommitted: " + viewvc_url + revision)
    cl.CloseRietveldIssue()
    cl.SetRietveldIssue(0)

Given that we don't use svn or git-svn, I think it's irrelevant, and
the CG should instruct developers to leave it blank.

I'll see if I can make a patch to the CG based on these findings.  Does
anyone else have any further light to shed?



reply via email to

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