From c100b0f236bc97c2909a9c22db41988d8153461f Mon Sep 17 00:00:00 2001 From: "ilevy@chromium.org" Date: Fri, 5 Apr 2013 22:43:04 +0000 Subject: [PATCH] Misc improvements to drover - Improve SVN heuristic by using cutoff of 180 days instead of 120. I've verified this won't cause problems with the repos we use. (the closest is blink ToT and chrome, blink ToT refers to a revision in chrome from 9 months ago) - Alert if using local drover.properties file. Webkit devs had a drover.properties file that hardcodes svn.webkit.org, which makes drover point to the wrong revision. BUG=227168 Review URL: https://chromiumcodereview.appspot.com/13730015 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@192641 0039d316-1c4b-4281-b951-d872f2087c98 --- drover.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drover.py b/drover.py index 82f0ede76c..4c7c6faf63 100755 --- a/drover.py +++ b/drover.py @@ -515,6 +515,8 @@ def drover(options, args): # Override the default properties if there is a drover.properties file. global file_pattern_ if os.path.exists("drover.properties"): + print 'Using options from %s' % os.path.join( + os.getcwd(), 'drover.properties') FILE_PATTERN = file_pattern_ f = open("drover.properties") exec(f) @@ -544,13 +546,13 @@ def drover(options, args): prompt("Working copy contains uncommitted files. Continue?")): return 1 - if options.revert and not options.no_alt_urls: + if options.revert and not options.no_alt_urls and not options.url: for cur_url in [url] + REVERT_ALT_URLS: try: commit_date_str = getSVNInfo( cur_url, options.revert).get('Last Changed Date', 'x').split()[0] commit_date = datetime.datetime.strptime(commit_date_str, '%Y-%m-%d') - if (datetime.datetime.now() - commit_date).days < 120: + if (datetime.datetime.now() - commit_date).days < 180: if cur_url != url: print 'Guessing svn repo: %s.' % cur_url, print 'Use --no-alt-urls to disable heuristic.'