comparison src/org/tmatesoft/hg/internal/DirstateBuilder.java @ 707:42b88709e41d

Merge: support 'unresolved' resolution with MergeStateBuilder
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Fri, 16 Aug 2013 19:22:59 +0200
parents b4242b7e7dfe
children
comparison
equal deleted inserted replaced
706:cd5c87d96315 707:42b88709e41d
105 */ 105 */
106 public void recordMergedFromP2(Path fname) { 106 public void recordMergedFromP2(Path fname) {
107 forget(fname); 107 forget(fname);
108 normal.put(fname, new HgDirstate.Record(0, -2, -1, fname, null)); 108 normal.put(fname, new HgDirstate.Record(0, -2, -1, fname, null));
109 } 109 }
110
111 /**
112 * Mark file from this dirstate as merged, using all the information
113 */
114 public void recordMergedExisting(Path fname, Path knownInDirstate) {
115 HgDirstate.Record r = forget(knownInDirstate);
116 HgDirstate.Record n;
117 if (r == null) {
118 assert false;
119 n = new HgDirstate.Record(0, -1, -1, fname, null);
120 } else {
121 n = new HgDirstate.Record(r.mode(), r.size(), r.modificationTime(), fname, r.copySource());
122 }
123 merged.put(fname, n);
124 }
125
110 126
111 private HgDirstate.Record forget(Path fname) { 127 private HgDirstate.Record forget(Path fname) {
112 HgDirstate.Record r; 128 HgDirstate.Record r;
113 if ((r = normal.remove(fname)) != null) { 129 if ((r = normal.remove(fname)) != null) {
114 return r; 130 return r;