comparison src/org/tmatesoft/hg/repo/HgBundle.java @ 534:243202f1bda5

Commit: refactor revision creation code from clone command to work separately, fit into existing library structure
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Mon, 04 Feb 2013 18:00:55 +0100
parents 688c1ab113bb
children 5daa42067e7c
comparison
equal deleted inserted replaced
533:e6f72c9829a6 534:243202f1bda5
58 accessProvider = dap; 58 accessProvider = dap;
59 bundleFile = bundle; 59 bundleFile = bundle;
60 } 60 }
61 61
62 private DataAccess getDataStream() throws IOException { 62 private DataAccess getDataStream() throws IOException {
63 DataAccess da = accessProvider.create(bundleFile); 63 DataAccess da = accessProvider.createReader(bundleFile);
64 byte[] signature = new byte[6]; 64 byte[] signature = new byte[6];
65 if (da.length() > 6) { 65 if (da.length() > 6) {
66 da.readBytes(signature, 0, 6); 66 da.readBytes(signature, 0, 6);
67 if (signature[0] == 'H' && signature[1] == 'G' && signature[2] == '1' && signature[3] == '0') { 67 if (signature[0] == 'H' && signature[1] == 'G' && signature[2] == '1' && signature[3] == '0') {
68 if (signature[4] == 'G' && signature[5] == 'Z') { 68 if (signature[4] == 'G' && signature[5] == 'Z') {