diff src/org/tmatesoft/hg/internal/CommitFacility.java @ 667:fba85bc1dfb8

Refactoring: move all encoding/decoding operations into single place, EncodingHelper
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 11 Jul 2013 17:54:08 +0200
parents ae2d439fbed3
children b4242b7e7dfe
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/CommitFacility.java	Wed Jul 10 20:22:07 2013 +0200
+++ b/src/org/tmatesoft/hg/internal/CommitFacility.java	Thu Jul 11 17:54:08 2013 +0200
@@ -164,8 +164,10 @@
 			}
 		}
 		//
+		final EncodingHelper encHelper = repo.buildFileNameEncodingHelper();
+		//
 		// Manifest
-		final ManifestEntryBuilder manifestBuilder = new ManifestEntryBuilder(repo.buildFileNameEncodingHelper());
+		final ManifestEntryBuilder manifestBuilder = new ManifestEntryBuilder(encHelper);
 		for (Map.Entry<Path, Nodeid> me : newManifestRevision.entrySet()) {
 			manifestBuilder.add(me.getKey().toString(), me.getValue());
 		}
@@ -173,7 +175,7 @@
 		Nodeid manifestRev = manifestWriter.addRevision(manifestBuilder, clogRevisionIndex, manifestParents.first(), manifestParents.second()).second();
 		//
 		// Changelog
-		final ChangelogEntryBuilder changelogBuilder = new ChangelogEntryBuilder();
+		final ChangelogEntryBuilder changelogBuilder = new ChangelogEntryBuilder(encHelper);
 		changelogBuilder.setModified(files.keySet());
 		changelogBuilder.branch(branch == null ? DEFAULT_BRANCH_NAME : branch);
 		changelogBuilder.user(String.valueOf(user));