Bug 1399100 - fix client.py follow-up, r=kaie

MozReview-Commit-ID: V8nVlkRenv

--HG--
extra : rebase_source : 206d04cca2c635d0879880c72287231b433c7368
This commit is contained in:
Franziskus Kiefer 2017-09-20 09:13:14 +02:00
Родитель d7702ea853
Коммит 8bbca211df
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -112,7 +112,8 @@ def update_nspr_or_nss(tag, depfile, destination, hgpath):
sys.exit(2)
warn_if_patch_exists(permanent_patch_dir)
# protect patch directory from being removed by do_hg_replace
shutil.move(permanent_patch_dir, temporary_patch_dir)
if os.path.exists(permanent_patch_dir):
shutil.move(permanent_patch_dir, temporary_patch_dir)
# now update the destination
print "reverting to HG version of %s to get its blank line state" % depfile
check_call_noisy([options.hg, 'revert', depfile])
@ -127,7 +128,8 @@ def update_nspr_or_nss(tag, depfile, destination, hgpath):
tag_file = destination + "/TAG-INFO"
print >>file(tag_file, "w"), tag
# move patch directory back to a subdirectory
shutil.move(temporary_patch_dir, permanent_patch_dir)
if os.path.exists(temporary_patch_dir):
shutil.move(temporary_patch_dir, permanent_patch_dir)
def warn_if_patch_exists(path):
# If the given patch directory exists and contains at least one file,