f5b53b1 add Branched release guessing, fix up rsync usage

Authored and Committed by adamwill 8 years ago
    add Branched release guessing, fix up rsync usage
    
    The intended change here is to add guessing of the Branched
    release, so you can just pass '-m Branched' and have fedfind
    guess at today's Branched release (or pass '-m Branched -c
    YYYYMMDD' to specify a date but guess the release). wikitcms
    has always done this by reading the 'current' validation compose
    and guessing at the same release, but fedfind can't do that
    because we don't want a circular dependency.
    
    So far I've just left it out because doing it is icky, but we
    do want to have the capability for dumb scripts which just want
    to fire up on 'today's Branched' every day. So here's an icky
    implementation. Good old rsync scraping to the rescue: we
    scrape the /development directory and take the highest integer
    name we find, and use that. Told you it was icky! Works, though.
    
    Since we now have three things doing rsyncs, I moved the code
    to run rsync and grab the retcode and (optionally) output into
    a helper function so we don't keep duplicating it.
    
    Finally, while testing this, I noticed the existing rsync use
    in get_mirror_images() was actually broken. The 'include' and
    'exclude' parameters were being completely ignored because of
    how subprocess handles quotes. In the end we filtered the right
    results out of the output, but we were unnecessarily querying
    for far more files than we needed. This fixes that, also. Now
    the parameters are actually *working* I also needed to fix the
    order: include has to come before exclude.
    
        
file modified
+23 -6
file modified
+38 -23