bug 454261: add Mercurial and long filename support to patcher - use from_decoded instead of partial_decoded. r=nrthomas, patch=me UPDATE_PACKAGING_R6
authorBen Hearsum <bhearsum@mozilla.com>
Fri, 17 Oct 2008 08:12:57 -0400
changeset 20584 d7d64f68423b68a671f623f123e90057ebc49dac
parent 20583 f31b66fd4192555e74e66909b7e5423ec5b9a630
child 20585 54bb667c6d9d32a3be23d6b49763b20af10efb57
push idunknown
push userunknown
push dateunknown
reviewersnrthomas
bugs454261
milestone1.9.1b2pre
bug 454261: add Mercurial and long filename support to patcher - use from_decoded instead of partial_decoded. r=nrthomas, patch=me
tools/update-packaging/make_incremental_updates.py
--- a/tools/update-packaging/make_incremental_updates.py
+++ b/tools/update-packaging/make_incremental_updates.py
@@ -383,17 +383,16 @@ def create_partial_patches(patches):
             to_decoded = decode_filename(from_filename)
             to_buildid = get_buildid(work_dir_to, to_decoded['platform'])
             to_shasum = sha.sha(open(to_filename).read()).hexdigest()
             to_size = str(os.path.getsize(to_filename))
 
             mar_extract_time = time.time()
 
             partial_filename = create_partial_patch(work_dir_from, work_dir_to, patch_filename, shas, PatchInfo(work_dir, ['channel-prefs.js','update.manifest','removed-files'],['/readme.txt']))
-            partial_decoded = decode_filename(partial_filename)
             partial_buildid = to_buildid
             partial_shasum = sha.sha(open(partial_filename).read()).hexdigest()
             partial_size = str(os.path.getsize(partial_filename))
 
             metadata.append({
              'to_filename': os.path.basename(to_filename),
              'from_filename': os.path.basename(from_filename),
              'partial_filename': os.path.basename(partial_filename),
@@ -402,18 +401,18 @@ def create_partial_patches(patches):
              'to_sha1sum':to_shasum, 
              'from_sha1sum':from_shasum, 
              'partial_sha1sum':partial_shasum, 
              'to_size':to_size,
              'from_size':from_size,
              'partial_size':partial_size,
              'to_version':to_decoded['version'],
              'from_version':from_decoded['version'],
-             'locale':partial_decoded['locale'],
-             'platform':partial_decoded['platform'],
+             'locale':from_decoded['locale'],
+             'platform':from_decoded['platform'],
             })
             print "done with patch %s/%s time (%.2fs/%.2fs/%.2fs) (mar/patch/total)" % (str(patch_num),str(len(patches)),mar_extract_time-startTime,time.time()-mar_extract_time,time.time()-startTime)
             patch_num += 1
         return metadata
     finally:
         # If we fail or get a ctrl-c during run be sure to clean up temp dir
         if (work_dir_root and os.path.exists(work_dir_root)):
             shutil.rmtree(work_dir_root)