Mercurial > jhg
annotate src/com/tmate/hgkit/console/Status.java @ 56:576d6e8a09f6
Analog of 'hg status --change' command
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Mon, 17 Jan 2011 05:15:13 +0100 |
parents | 05829a70b30b |
children | 8b0d6f1bd6b4 |
rev | line source |
---|---|
10
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
1 /* |
20
11cfabe692b3
Status operation for two repository revisions (no local dir involved)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
18
diff
changeset
|
2 * Copyright (c) 2010, 2011 Artem Tikhomirov |
10
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
3 */ |
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
4 package com.tmate.hgkit.console; |
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
5 |
18
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
6 import static com.tmate.hgkit.ll.HgRepository.TIP; |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
7 |
55
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
8 import java.util.ArrayList; |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
9 import java.util.Collections; |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
10 import java.util.List; |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
11 |
10
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
12 import com.tmate.hgkit.fs.RepositoryLookup; |
22
603806cd2dc6
Status of local working dir against non-tip base revision
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
20
diff
changeset
|
13 import com.tmate.hgkit.ll.HgDataFile; |
10
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
14 import com.tmate.hgkit.ll.HgRepository; |
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
15 import com.tmate.hgkit.ll.LocalHgRepo; |
22
603806cd2dc6
Status of local working dir against non-tip base revision
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
20
diff
changeset
|
16 import com.tmate.hgkit.ll.Nodeid; |
55
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
17 import com.tmate.hgkit.ll.StatusCollector; |
10
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
18 |
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
19 /** |
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
20 * |
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
21 * @author artem |
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
22 */ |
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
23 public class Status { |
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
24 |
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
25 public static void main(String[] args) throws Exception { |
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
26 RepositoryLookup repoLookup = new RepositoryLookup(); |
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
27 RepositoryLookup.Options cmdLineOpts = RepositoryLookup.Options.parse(args); |
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
28 HgRepository hgRepo = repoLookup.detect(cmdLineOpts); |
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
29 if (hgRepo.isInvalid()) { |
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
30 System.err.printf("Can't find repository in: %s\n", hgRepo.getLocation()); |
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
31 return; |
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
32 } |
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
33 System.out.println(hgRepo.getLocation()); |
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
34 ((LocalHgRepo) hgRepo).loadDirstate().dump(); |
18
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
35 final StatusDump dump = new StatusDump(); |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
36 dump.showIgnored = false; |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
37 dump.showClean = false; |
55
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
38 StatusCollector sc = new StatusCollector(hgRepo); |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
39 final int r1 = 0, r2 = 3; |
20
11cfabe692b3
Status operation for two repository revisions (no local dir involved)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
18
diff
changeset
|
40 System.out.printf("Status for changes between revision %d and %d:\n", r1, r2); |
55
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
41 sc.walk(r1, r2, dump); |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
42 // |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
43 System.out.println("\n\nSame, but sorted in the way hg status does:"); |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
44 StatusCollector.Record r = sc.status(r1, r2); |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
45 sortAndPrint('M', r.getModified()); |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
46 sortAndPrint('A', r.getAdded()); |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
47 sortAndPrint('R', r.getRemoved()); |
56
576d6e8a09f6
Analog of 'hg status --change' command
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
55
diff
changeset
|
48 // |
576d6e8a09f6
Analog of 'hg status --change' command
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
55
diff
changeset
|
49 System.out.println("\n\nTry hg status --change <rev>:"); |
576d6e8a09f6
Analog of 'hg status --change' command
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
55
diff
changeset
|
50 sc.change(0, dump); |
55
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
51 // System.out.println("\nStatus against working dir:"); |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
52 // ((LocalHgRepo) hgRepo).statusLocal(TIP, dump); |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
53 // System.out.println(); |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
54 // System.out.printf("Manifest of the revision %d:\n", r2); |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
55 // hgRepo.getManifest().walk(r2, r2, new Manifest.Dump()); |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
56 // System.out.println(); |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
57 // System.out.printf("\nStatus of working dir against %d:\n", r2); |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
58 // ((LocalHgRepo) hgRepo).statusLocal(r2, dump); |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
59 } |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
60 |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
61 private static void sortAndPrint(char prefix, List<String> ul) { |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
62 ArrayList<String> sortList = new ArrayList<String>(ul); |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
63 Collections.sort(sortList); |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
64 for (String s : sortList) { |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
65 System.out.print(prefix); |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
66 System.out.print(' '); |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
67 System.out.println(s); |
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
68 } |
22
603806cd2dc6
Status of local working dir against non-tip base revision
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
20
diff
changeset
|
69 } |
603806cd2dc6
Status of local working dir against non-tip base revision
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
20
diff
changeset
|
70 |
603806cd2dc6
Status of local working dir against non-tip base revision
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
20
diff
changeset
|
71 protected static void testStatusInternals(HgRepository hgRepo) { |
603806cd2dc6
Status of local working dir against non-tip base revision
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
20
diff
changeset
|
72 HgDataFile n = hgRepo.getFileNode("design.txt"); |
603806cd2dc6
Status of local working dir against non-tip base revision
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
20
diff
changeset
|
73 for (String s : new String[] {"011dfd44417c72bd9e54cf89b82828f661b700ed", "e5529faa06d53e06a816e56d218115b42782f1ba", "c18e7111f1fc89a80a00f6a39d51288289a382fc"}) { |
603806cd2dc6
Status of local working dir against non-tip base revision
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
20
diff
changeset
|
74 // expected: 359, 2123, 3079 |
603806cd2dc6
Status of local working dir against non-tip base revision
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
20
diff
changeset
|
75 byte[] b = s.getBytes(); |
603806cd2dc6
Status of local working dir against non-tip base revision
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
20
diff
changeset
|
76 final Nodeid nid = Nodeid.fromAscii(b, 0, b.length); |
603806cd2dc6
Status of local working dir against non-tip base revision
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
20
diff
changeset
|
77 System.out.println(s + " : " + n.length(nid)); |
603806cd2dc6
Status of local working dir against non-tip base revision
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
20
diff
changeset
|
78 } |
18
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
79 } |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
80 |
55
05829a70b30b
Status operation extracted into separate, cache-friendly class
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
22
diff
changeset
|
81 private static class StatusDump implements StatusCollector.Inspector { |
18
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
82 public boolean hideStatusPrefix = false; // hg status -n option |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
83 public boolean showCopied = true; // -C |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
84 public boolean showIgnored = true; // -i |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
85 public boolean showClean = true; // -c |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
86 |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
87 public void modified(String fname) { |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
88 print('M', fname); |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
89 } |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
90 |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
91 public void added(String fname) { |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
92 print('A', fname); |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
93 } |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
94 |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
95 public void copied(String fnameOrigin, String fnameAdded) { |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
96 added(fnameAdded); |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
97 if (showCopied) { |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
98 print(' ', fnameOrigin); |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
99 } |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
100 } |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
101 |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
102 public void removed(String fname) { |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
103 print('R', fname); |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
104 } |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
105 |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
106 public void clean(String fname) { |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
107 if (showClean) { |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
108 print('C', fname); |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
109 } |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
110 } |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
111 |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
112 public void missing(String fname) { |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
113 print('!', fname); |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
114 } |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
115 |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
116 public void unknown(String fname) { |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
117 print('?', fname); |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
118 } |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
119 |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
120 public void ignored(String fname) { |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
121 if (showIgnored) { |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
122 print('I', fname); |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
123 } |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
124 } |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
125 |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
126 private void print(char status, String fname) { |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
127 if (!hideStatusPrefix) { |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
128 System.out.print(status); |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
129 System.out.print(' '); |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
130 } |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
131 System.out.println(fname); |
02ee376bee79
status operation against current working directory
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
10
diff
changeset
|
132 } |
10
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
133 } |
382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
134 } |