comparison hgaction.h @ 115:78374cefa10f

* Add useful state message to file status page. Also add shouldBeFast() method to HgAction; use it to avoid showing progress bar for fast actions
author Chris Cannam
date Fri, 26 Nov 2010 21:48:25 +0000
parents 5fc7b4fc77a8
children 910c2c5d1873
comparison
equal deleted inserted replaced
114:bb2d2eecdd60 115:78374cefa10f
28 ACT_QUERY_BRANCH, 28 ACT_QUERY_BRANCH,
29 ACT_STAT, 29 ACT_STAT,
30 ACT_QUERY_HEADS, 30 ACT_QUERY_HEADS,
31 ACT_QUERY_PARENTS, 31 ACT_QUERY_PARENTS,
32 ACT_LOG, 32 ACT_LOG,
33 ACT_LOG_INCREMENTAL,
33 ACT_REMOVE, 34 ACT_REMOVE,
34 ACT_ADD, 35 ACT_ADD,
35 ACT_INCOMING, 36 ACT_INCOMING,
36 ACT_PUSH, 37 ACT_PUSH,
37 ACT_PULL, 38 ACT_PULL,
68 bool operator==(const HgAction &a) { 69 bool operator==(const HgAction &a) {
69 return (a.action == action && a.workingDir == workingDir && 70 return (a.action == action && a.workingDir == workingDir &&
70 a.params == params && a.executable == executable); 71 a.params == params && a.executable == executable);
71 } 72 }
72 73
74 bool shouldBeFast() const {
75 switch (action) {
76 case ACT_NONE:
77 case ACT_QUERY_PATHS:
78 case ACT_QUERY_BRANCH:
79 case ACT_STAT:
80 case ACT_QUERY_HEADS:
81 case ACT_QUERY_PARENTS:
82 case ACT_LOG_INCREMENTAL:
83 return true;
84 default:
85 return false;
86 }
87 }
88
73 bool mayBeInteractive() const { 89 bool mayBeInteractive() const {
74 switch (action) { 90 switch (action) {
75 case ACT_INCOMING: 91 case ACT_INCOMING:
76 case ACT_PUSH: 92 case ACT_PUSH:
77 case ACT_PULL: 93 case ACT_PULL: