Mercurial > hg4j
comparison src/org/tmatesoft/hg/internal/RepositoryComparator.java @ 210:6a2481866491
Wrong parent assignment when building branch chain
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 28 Apr 2011 03:55:23 +0200 |
parents | 9ce3b26798c4 |
children | 41a778e3fd31 |
comparison
equal
deleted
inserted
replaced
209:9ce3b26798c4 | 210:6a2481866491 |
---|---|
258 // as parents are always the same (and likely, BC that is common would be the last unknown) | 258 // as parents are always the same (and likely, BC that is common would be the last unknown) |
259 BranchChain bc = head2chain.get(rb.p1); | 259 BranchChain bc = head2chain.get(rb.p1); |
260 if (bc == null) { | 260 if (bc == null) { |
261 head2chain.put(rb.p1, bc = new BranchChain(rb.p1)); | 261 head2chain.put(rb.p1, bc = new BranchChain(rb.p1)); |
262 } | 262 } |
263 chainElement.p2 = bc; | 263 chainElement.p1 = bc; |
264 } | 264 } |
265 if (hasP2 && !localRepo.knownNode(rb.p2)) { | 265 if (hasP2 && !localRepo.knownNode(rb.p2)) { |
266 toQuery.add(rb.p2); | 266 toQuery.add(rb.p2); |
267 BranchChain bc = head2chain.get(rb.p2); | 267 BranchChain bc = head2chain.get(rb.p2); |
268 if (bc == null) { | 268 if (bc == null) { |
371 } | 371 } |
372 | 372 |
373 private void internalDump(String prefix) { | 373 private void internalDump(String prefix) { |
374 if (p1 != null) { | 374 if (p1 != null) { |
375 System.out.println(prefix + p1.toString()); | 375 System.out.println(prefix + p1.toString()); |
376 } else if (p2 != null) { | |
377 System.out.println(prefix + "NONE?!"); | |
376 } | 378 } |
377 if (p2 != null) { | 379 if (p2 != null) { |
378 System.out.println(prefix + p2.toString()); | 380 System.out.println(prefix + p2.toString()); |
381 } else if (p1 != null) { | |
382 System.out.println(prefix + "NONE?!"); | |
379 } | 383 } |
380 prefix += " "; | 384 prefix += " "; |
381 if (p1 != null) { | 385 if (p1 != null) { |
382 p1.internalDump(prefix); | 386 p1.internalDump(prefix); |
383 } | 387 } |