Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 1399100 - fix client.py follow-up, r=kaie
MozReview-Commit-ID: V8nVlkRenv

--HG--
extra : rebase_source : 206d04cca2c635d0879880c72287231b433c7368
  • Loading branch information
franziskuskiefer committed Sep 20, 2017
1 parent d7702ea commit 8bbca21
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client.py
Expand Up @@ -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])
Expand All @@ -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,
Expand Down

0 comments on commit 8bbca21

Please sign in to comment.