#!/usr/bin/python
# Copyright (c) 2010 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""A script to upload the archived O3D build to chrome-web. Simply calls
the archive_file script with the correct source and target.
"""

import os
import sys

import chromium_utils
import chromium.archive_file as archive_file
import slave_utils

def main(argv):
  o3d_dir = os.path.join(os.getcwd(), 'o3d')
  staging_dir = slave_utils.GetStagingDir(o3d_dir)

  # Find builder name and revision #s.
  builder_name = slave_utils.SlaveBuildName(o3d_dir)
  o3d_rev = str(slave_utils.SubversionRevision(o3d_dir))
  platform = chromium_utils.PlatformName()

  # Upload zip.
  local_zip = os.path.join(staging_dir,
                           'full-build-' + platform + '_' + o3d_rev + '.zip')
  remote_zip = 'snapshots/o3d/' + o3d_rev + '/' + builder_name + '.zip'

  archive_file._UploadFile(local_zip, remote_zip)
  return 0

if __name__ == '__main__':
  sys.exit(main(sys.argv))

@@ -338,16 +338,28 @@
 rt sys%0A%0A
+from common 
 import c
@@ -376,53 +376,59 @@
 ils%0A
-import chromium.archive_file as archive_file%0A
+from slave.chromium import archive_file%0Afrom slave 
 impo

Fix more o3d imports