Mercurial > hg4j
comparison src/org/tmatesoft/hg/internal/RevlogStreamWriter.java @ 645:14dac192aa26
Push: phase2 - upload bundle with changes to remote server
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Thu, 20 Jun 2013 19:15:09 +0200 |
| parents | 6526d8adbc0f |
| children | 4fd317a2fecf |
comparison
equal
deleted
inserted
replaced
| 644:1deea2f33218 | 645:14dac192aa26 |
|---|---|
| 23 import java.nio.ByteBuffer; | 23 import java.nio.ByteBuffer; |
| 24 | 24 |
| 25 import org.tmatesoft.hg.core.HgIOException; | 25 import org.tmatesoft.hg.core.HgIOException; |
| 26 import org.tmatesoft.hg.core.Nodeid; | 26 import org.tmatesoft.hg.core.Nodeid; |
| 27 import org.tmatesoft.hg.core.SessionContext; | 27 import org.tmatesoft.hg.core.SessionContext; |
| 28 import org.tmatesoft.hg.internal.DataSerializer.ByteArrayDataSerializer; | 28 import org.tmatesoft.hg.internal.DataSerializer.ByteArraySerializer; |
| 29 import org.tmatesoft.hg.internal.DataSerializer.ByteArrayDataSource; | 29 import org.tmatesoft.hg.internal.DataSerializer.ByteArrayDataSource; |
| 30 import org.tmatesoft.hg.internal.DataSerializer.DataSource; | 30 import org.tmatesoft.hg.internal.DataSerializer.DataSource; |
| 31 import org.tmatesoft.hg.repo.HgInvalidControlFileException; | 31 import org.tmatesoft.hg.repo.HgInvalidControlFileException; |
| 32 import org.tmatesoft.hg.repo.HgInvalidRevisionException; | 32 import org.tmatesoft.hg.repo.HgInvalidRevisionException; |
| 33 import org.tmatesoft.hg.repo.HgInvalidStateException; | 33 import org.tmatesoft.hg.repo.HgInvalidStateException; |
| 140 } | 140 } |
| 141 return lastEntryRevision; | 141 return lastEntryRevision; |
| 142 } | 142 } |
| 143 | 143 |
| 144 private byte[] toByteArray(DataSource content) throws HgIOException, HgRuntimeException { | 144 private byte[] toByteArray(DataSource content) throws HgIOException, HgRuntimeException { |
| 145 ByteArrayDataSerializer ba = new ByteArrayDataSerializer(); | 145 ByteArraySerializer ba = new ByteArraySerializer(); |
| 146 content.serialize(ba); | 146 content.serialize(ba); |
| 147 return ba.toByteArray(); | 147 return ba.toByteArray(); |
| 148 } | 148 } |
| 149 | 149 |
| 150 private Nodeid revision(int revisionIndex) throws HgInvalidControlFileException, HgInvalidRevisionException { | 150 private Nodeid revision(int revisionIndex) throws HgInvalidControlFileException, HgInvalidRevisionException { |
