comparison src/com/tmate/hgkit/console/Status.java @ 20:11cfabe692b3

Status operation for two repository revisions (no local dir involved)
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 04 Jan 2011 02:08:25 +0100
parents 02ee376bee79
children 603806cd2dc6
comparison
equal deleted inserted replaced
19:40532cdc92fc 20:11cfabe692b3
1 /* 1 /*
2 * Copyright (c) 2010 Artem Tikhomirov 2 * Copyright (c) 2010, 2011 Artem Tikhomirov
3 */ 3 */
4 package com.tmate.hgkit.console; 4 package com.tmate.hgkit.console;
5 5
6 import static com.tmate.hgkit.ll.HgRepository.TIP; 6 import static com.tmate.hgkit.ll.HgRepository.TIP;
7 7
23 System.err.printf("Can't find repository in: %s\n", hgRepo.getLocation()); 23 System.err.printf("Can't find repository in: %s\n", hgRepo.getLocation());
24 return; 24 return;
25 } 25 }
26 System.out.println(hgRepo.getLocation()); 26 System.out.println(hgRepo.getLocation());
27 ((LocalHgRepo) hgRepo).loadDirstate().dump(); 27 ((LocalHgRepo) hgRepo).loadDirstate().dump();
28 //hgRepo.status(TIP, TIP, new StatusDump());
29 final StatusDump dump = new StatusDump(); 28 final StatusDump dump = new StatusDump();
30 dump.showIgnored = false; 29 dump.showIgnored = false;
31 dump.showClean = false; 30 dump.showClean = false;
31 final int r1 = 0, r2 = 11;
32 System.out.printf("Status for changes between revision %d and %d:\n", r1, r2);
33 hgRepo.status(r1, r2, dump);
34 System.out.println("\nStatus against working dir:");
32 ((LocalHgRepo) hgRepo).statusLocal(TIP, dump); 35 ((LocalHgRepo) hgRepo).statusLocal(TIP, dump);
33 } 36 }
34 37
35 private static class StatusDump implements HgRepository.StatusInspector { 38 private static class StatusDump implements HgRepository.StatusInspector {
36 public boolean hideStatusPrefix = false; // hg status -n option 39 public boolean hideStatusPrefix = false; // hg status -n option