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
experimental/szager/collated-output
ilevy@chromium.org 13 years ago
parent 08b21bfe31
commit c100b0f236

@ -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.'

Loading…
Cancel
Save