Mercurial > jhg
comparison src/com/tmate/hgkit/ll/HgBundle.java @ 45:70dafe20931d
Clean inadequate comments
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 14 Jan 2011 04:52:33 +0100 |
parents | 1b26247d7367 |
children | b01500fe2604 |
comparison
equal
deleted
inserted
replaced
44:b79cf0118dd3 | 45:70dafe20931d |
---|---|
44 // Each Changelog entry patches the result of all previous patches | 44 // Each Changelog entry patches the result of all previous patches |
45 // (the previous, or parent patch of a given patch p is the patch that has a node equal to p's p1 field) | 45 // (the previous, or parent patch of a given patch p is the patch that has a node equal to p's p1 field) |
46 byte[] baseRevContent = hgRepo.getChangelog().content(base); | 46 byte[] baseRevContent = hgRepo.getChangelog().content(base); |
47 for (GroupElement ge : changelogGroup) { | 47 for (GroupElement ge : changelogGroup) { |
48 byte[] csetContent = RevlogStream.apply(baseRevContent, -1, ge.patches); | 48 byte[] csetContent = RevlogStream.apply(baseRevContent, -1, ge.patches); |
49 // wiki suggests sha1_digest(min(p1,p2) ++ max(p1,p2) ++ final_text), | |
50 dh = dh.sha1(ge.firstParent(), ge.secondParent(), csetContent); // XXX ge may give me access to byte[] content of nodeid directly, perhaps, I don't need DH to be friend of Nodeid? | 49 dh = dh.sha1(ge.firstParent(), ge.secondParent(), csetContent); // XXX ge may give me access to byte[] content of nodeid directly, perhaps, I don't need DH to be friend of Nodeid? |
51 if (!ge.node().equalsTo(dh.asBinary())) { | 50 if (!ge.node().equalsTo(dh.asBinary())) { |
52 throw new IllegalStateException("Integrity check failed on " + bundleFile + ", node:" + ge.node()); | 51 throw new IllegalStateException("Integrity check failed on " + bundleFile + ", node:" + ge.node()); |
53 } | 52 } |
54 Changeset cs = Changeset.parse(csetContent, 0, csetContent.length); | 53 Changeset cs = Changeset.parse(csetContent, 0, csetContent.length); |