зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1258916 part 3 - Skip rather than throw when replacing a file with an identical one. r=dbaron
MozReview-Commit-ID: DJi5NzYlTQw --HG-- extra : rebase_source : 5a7da2a77c7188620b153adf38a90c0c8fabe0ba
This commit is contained in:
Родитель
df833488e0
Коммит
dcdd6d93b9
|
@ -7,6 +7,7 @@ from optparse import OptionParser
|
|||
from subprocess import Popen, PIPE
|
||||
import xml.dom.minidom
|
||||
import html5lib
|
||||
import filecmp
|
||||
import shutil
|
||||
import sys
|
||||
import re
|
||||
|
@ -135,6 +136,9 @@ def copy_file(test, srcfile, destname, isSupportFile=False):
|
|||
if not os.path.exists(destdir):
|
||||
os.makedirs(destdir)
|
||||
if os.path.exists(destfile):
|
||||
if filecmp.cmp(srcfile, destfile):
|
||||
print "Warning: duplicate file {}".format(destname)
|
||||
return
|
||||
raise StandardError("file " + destfile + " already exists")
|
||||
copy_and_prefix(test, srcfile, destfile, gPrefixedProperties, isSupportFile)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче