Mercurial > hg4j
comparison src/org/tmatesoft/hg/internal/Patch.java @ 532:688c1ab113bb
Introduce explicit reference to base patch in bundle's group element, use it when cloning to fix defect when few revisions list null,null parents
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Wed, 23 Jan 2013 19:14:15 +0100 |
| parents | 0f6fa88e2162 |
| children | e6f72c9829a6 |
comparison
equal
deleted
inserted
replaced
| 531:95c2f43008bd | 532:688c1ab113bb |
|---|---|
| 112 // copy source bytes that were not modified (up to start of the record) | 112 // copy source bytes that were not modified (up to start of the record) |
| 113 baseRevisionContent.readBytes(rv, destIndex, start - prevEnd); | 113 baseRevisionContent.readBytes(rv, destIndex, start - prevEnd); |
| 114 destIndex += start - prevEnd; | 114 destIndex += start - prevEnd; |
| 115 // insert new data from the patch, if any | 115 // insert new data from the patch, if any |
| 116 byte[] d = data.get(i); | 116 byte[] d = data.get(i); |
| 117 try { | 117 System.arraycopy(d, 0, rv, destIndex, d.length); |
| 118 System.arraycopy(d, 0, rv, destIndex, d.length); | |
| 119 } catch (ArrayIndexOutOfBoundsException ex) { | |
| 120 ex.printStackTrace(); | |
| 121 } | |
| 122 destIndex += d.length; | 118 destIndex += d.length; |
| 123 prevEnd = ends.get(i); | 119 prevEnd = ends.get(i); |
| 124 } | 120 } |
| 125 baseRevisionContent.seek(prevEnd); | 121 baseRevisionContent.seek(prevEnd); |
| 126 // copy everything in the source past last record's end | 122 // copy everything in the source past last record's end |
