[Rock-dev] [Autobuild] Status for SVN importer

Sylvain Joyeux sylvain.joyeux at dfki.de
Mon Sep 24 15:02:53 CEST 2012


On 09/12/2012 07:02 PM, Charles Lesire-Cabaniols wrote:
> Hi guys,
>
> I have just made a very simple modification to the autobuild svn 
> importer so that the repository status is made available.
> It's very simple, only consider more common cases, but it's better 
> than no information I think ;)
>
> I have not even tested it with conflict cases, and as I am very new to 
> Ruby, the code may be polished I think.
> But anyway, here is the patch!
>
> Feel free to improve, clean, and apply ;)
Love the concept, but quite a bit of work is needed on it before it gets 
in ...

  1/ use regular expressions to test against the svn output:

     if line =~ /^A/
       status.status ==
     // the rest is identical

    Given what you are doing, Ruby's case .. when structure applies:

    case line
    when /^A/
    when /^C/
    ...

  2. There is an implicit ordering in the status, that is: NEEDS_MERGE > 
ADVANCED > SIMPLE_UPDATE. In your patch, you will always give the status 
of the last file.

I can't really update/test as I don't use any SVNs anymore ...

Sylvain


More information about the Rock-dev mailing list