Mercurial > jhg
diff src/com/tmate/hgkit/console/Status.java @ 22:603806cd2dc6
Status of local working dir against non-tip base revision
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 06 Jan 2011 03:30:20 +0100 |
parents | 11cfabe692b3 |
children | 05829a70b30b |
line wrap: on
line diff
--- a/src/com/tmate/hgkit/console/Status.java Wed Jan 05 04:10:28 2011 +0100 +++ b/src/com/tmate/hgkit/console/Status.java Thu Jan 06 03:30:20 2011 +0100 @@ -6,8 +6,10 @@ import static com.tmate.hgkit.ll.HgRepository.TIP; import com.tmate.hgkit.fs.RepositoryLookup; +import com.tmate.hgkit.ll.HgDataFile; import com.tmate.hgkit.ll.HgRepository; import com.tmate.hgkit.ll.LocalHgRepo; +import com.tmate.hgkit.ll.Nodeid; /** * @@ -33,6 +35,22 @@ hgRepo.status(r1, r2, dump); System.out.println("\nStatus against working dir:"); ((LocalHgRepo) hgRepo).statusLocal(TIP, dump); + System.out.println(); + System.out.printf("Manifest of the revision %d:\n", r2); + hgRepo.getManifest().walk(r2, r2, new Manifest.Dump()); + System.out.println(); + System.out.printf("\nStatus of working dir against %d:\n", r2); + ((LocalHgRepo) hgRepo).statusLocal(r2, dump); + } + + protected static void testStatusInternals(HgRepository hgRepo) { + HgDataFile n = hgRepo.getFileNode("design.txt"); + for (String s : new String[] {"011dfd44417c72bd9e54cf89b82828f661b700ed", "e5529faa06d53e06a816e56d218115b42782f1ba", "c18e7111f1fc89a80a00f6a39d51288289a382fc"}) { + // expected: 359, 2123, 3079 + byte[] b = s.getBytes(); + final Nodeid nid = Nodeid.fromAscii(b, 0, b.length); + System.out.println(s + " : " + n.length(nid)); + } } private static class StatusDump implements HgRepository.StatusInspector {