Mercurial > jhg
comparison src/org/tmatesoft/hg/core/HgStatusCommand.java @ 688:1499139a600a
Defect: copies are not reported with default settings (not even as added!). Parameter needCopies removed as there seems to be no reason to condition copies for hi-level api (HgStatus.isCopy() is way down the road)
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Sat, 27 Jul 2013 20:15:37 +0200 |
parents | 98ff1fb49abe |
children |
comparison
equal
deleted
inserted
replaced
687:9859fcea475d | 688:1499139a600a |
---|---|
59 } | 59 } |
60 | 60 |
61 public HgStatusCommand defaults() { | 61 public HgStatusCommand defaults() { |
62 final Mediator m = mediator; | 62 final Mediator m = mediator; |
63 m.needModified = m.needAdded = m.needRemoved = m.needUnknown = m.needMissing = true; | 63 m.needModified = m.needAdded = m.needRemoved = m.needUnknown = m.needMissing = true; |
64 m.needCopies = m.needClean = m.needIgnored = false; | 64 m.needClean = m.needIgnored = false; |
65 return this; | 65 return this; |
66 } | 66 } |
67 public HgStatusCommand all() { | 67 public HgStatusCommand all() { |
68 final Mediator m = mediator; | 68 final Mediator m = mediator; |
69 m.needModified = m.needAdded = m.needRemoved = m.needUnknown = m.needMissing = true; | 69 m.needModified = m.needAdded = m.needRemoved = m.needUnknown = m.needMissing = true; |
70 m.needCopies = m.needClean = m.needIgnored = true; | 70 m.needClean = m.needIgnored = true; |
71 return this; | 71 return this; |
72 } | 72 } |
73 | 73 |
74 | 74 |
75 public HgStatusCommand modified(boolean include) { | 75 public HgStatusCommand modified(boolean include) { |
250 boolean needRemoved; | 250 boolean needRemoved; |
251 boolean needUnknown; | 251 boolean needUnknown; |
252 boolean needMissing; | 252 boolean needMissing; |
253 boolean needClean; | 253 boolean needClean; |
254 boolean needIgnored; | 254 boolean needIgnored; |
255 boolean needCopies; | |
256 HgStatusHandler handler; | 255 HgStatusHandler handler; |
257 private ChangelogHelper logHelper; | 256 private ChangelogHelper logHelper; |
258 private HgCallbackTargetException failure; | 257 private HgCallbackTargetException failure; |
259 | 258 |
260 Mediator() { | 259 Mediator() { |
309 if (needRemoved) { | 308 if (needRemoved) { |
310 dispatch(new HgStatus(Removed, fname, logHelper)); | 309 dispatch(new HgStatus(Removed, fname, logHelper)); |
311 } | 310 } |
312 } | 311 } |
313 public void copied(Path fnameOrigin, Path fnameAdded) { | 312 public void copied(Path fnameOrigin, Path fnameAdded) { |
314 if (needCopies) { | 313 // TODO post-1.0 in fact, merged files may report 'copied from' as well, correct status kind thus may differ from Added |
315 // TODO post-1.0 in fact, merged files may report 'copied from' as well, correct status kind thus may differ from Added | 314 dispatch(new HgStatus(Added, fnameAdded, fnameOrigin, logHelper)); |
316 dispatch(new HgStatus(Added, fnameAdded, fnameOrigin, logHelper)); | |
317 } | |
318 } | 315 } |
319 public void missing(Path fname) { | 316 public void missing(Path fname) { |
320 if (needMissing) { | 317 if (needMissing) { |
321 dispatch(new HgStatus(Missing, fname, logHelper)); | 318 dispatch(new HgStatus(Missing, fname, logHelper)); |
322 } | 319 } |