comparison src/org/tmatesoft/hg/internal/Internals.java @ 584:ed243b668502

Conditionally enable effective patch merge alternative for revlog reading
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 25 Apr 2013 16:08:17 +0200
parents 36e36b926747
children e447384f3771
comparison
equal deleted inserted replaced
583:47dfa0ec7e35 584:ed243b668502
86 * file and use Hg4J-specific value instead. 86 * file and use Hg4J-specific value instead.
87 * 87 *
88 * Integer value, use negative for attempts to acquire lock until success, and zero to try once and fail immediately. 88 * Integer value, use negative for attempts to acquire lock until success, and zero to try once and fail immediately.
89 */ 89 */
90 public static final String CFG_PROPERTY_FS_LOCK_TIMEOUT = "hg4j.fs.lock.timeout"; 90 public static final String CFG_PROPERTY_FS_LOCK_TIMEOUT = "hg4j.fs.lock.timeout";
91
92 /**
93 * Alternative, more effective approach to build revision text from revlog patches - collect all the
94 * patches one by one, starting at revision next to base, and apply against each other to get
95 * one final patch, which in turned is applied to base revision.
96 * <p>
97 * Original approach is to apply each patch to a previous revision, so that with base revision
98 * of 1M and three patches, each altering just a tiny fraction
99 * of the origin, with latter approach we consume 1M (original) + 1M (first patch applied) + 1M (second
100 * patch applied) + 1M (third patch applied).
101 * <p>
102 * Alternative approach, controlled with this option, first combines these there patches into one,
103 * and only then applies it to base revision, eliminating 2 intermediate elements.
104 * <p>
105 * Present default value for this option is <b>FALSE</b>, and will be changed in future, once
106 * tests prove support is fully functional (likely in v1.2).
107 *
108 * @since 1.1
109 */
110 public static final String CFG_PROPERTY_PATCH_MERGE = "hg4j.repo.merge_revlog_patches";
91 111
92 public static final int REVLOGV1_RECORD_SIZE = 64; 112 public static final int REVLOGV1_RECORD_SIZE = 64;
93 113
94 private List<Filter.Factory> filterFactories; 114 private List<Filter.Factory> filterFactories;
95 private final HgRepository repo; 115 private final HgRepository repo;