Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1484)

Unified Diff: build/scripts/common/chromium_utils.py

Issue 158543002: Let MakeZip() copy mtimes for toplevel build directory files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/scripts/common/chromium_utils.py
===================================================================
--- build/scripts/common/chromium_utils.py (revision 250023)
+++ build/scripts/common/chromium_utils.py (working copy)
@@ -472,7 +472,7 @@
def CopyFileToDir(src_path, dest_dir, dest_fn=None):
- """Copies the file found at src_path to the dest_dir directory.
+ """Copies the file found at src_path to the dest_dir directory, with metadata.
If dest_fn is specified, the src_path is copied to that name in dest_dir,
otherwise it is copied to a file of the same name.
@@ -487,9 +487,9 @@
raise PathNotFound('Unable to find dir %s' % dest_dir)
src_file = os.path.basename(src_path)
if dest_fn:
- shutil.copy(src_path, os.path.join(dest_dir, dest_fn))
+ shutil.copy2(src_path, os.path.join(dest_dir, dest_fn))
else:
- shutil.copy(src_path, os.path.join(dest_dir, src_file))
+ shutil.copy2(src_path, os.path.join(dest_dir, src_file))
def MakeZip(output_dir, archive_name, file_list, file_relative_dir,
@@ -500,7 +500,7 @@
the archive_name, which will be created if necessary and emptied if it
already exists. The files are then then packed using archive names
relative to the output_dir. That is, if the zipfile is unpacked in place,
- it will create a directory identical to the new archiev_name directory, in
+ it will create a directory identical to the new archive_name directory, in
the output_dir. The zip file will be named as the archive_name, plus
'.zip'.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698