Mercurial > hg > easyhg
comparison hgrunner.cpp @ 128:fcaf09ee825d
* Show tags and current working copy parents in history graph
author | Chris Cannam |
---|---|
date | Mon, 29 Nov 2010 20:09:58 +0000 |
parents | 1f27f71a7034 |
children | 0ad212075b36 |
comparison
equal
deleted
inserted
replaced
127:758471b71721 | 128:fcaf09ee825d |
---|---|
174 | 174 |
175 bool HgRunner::checkPrompts(QString chunk) | 175 bool HgRunner::checkPrompts(QString chunk) |
176 { | 176 { |
177 //DEBUG << "checkPrompts: " << chunk << endl; | 177 //DEBUG << "checkPrompts: " << chunk << endl; |
178 | 178 |
179 if (!m_currentAction.mayBeInteractive()) return false; | |
180 | |
179 QString text = chunk.trimmed(); | 181 QString text = chunk.trimmed(); |
180 QString lower = text.toLower(); | 182 QString lower = text.toLower(); |
181 if (lower.endsWith("password:")) { | 183 if (lower.endsWith("password:")) { |
182 getPassword(); | 184 getPassword(); |
183 return true; | 185 return true; |
184 } | 186 } |
185 if (lower.endsWith("user:")) { | 187 if (lower.endsWith("user:") || lower.endsWith("username:")) { |
186 getUsername(); | 188 getUsername(); |
187 return true; | 189 return true; |
188 } | 190 } |
189 QRegExp userRe("\\buser:\\s*([^\\s]+)"); | 191 QRegExp userRe("\\buser(name)?:\\s*([^\\s]+)"); |
190 if (userRe.indexIn(text) >= 0) { | 192 if (userRe.indexIn(text) >= 0) { |
191 noteUsername(userRe.cap(1)); | 193 noteUsername(userRe.cap(2)); |
192 } | 194 } |
193 QRegExp realmRe("\\brealmr:\\s*([^\\s]+)"); | 195 QRegExp realmRe("\\brealmr:\\s*([^\\s]+)"); |
194 if (realmRe.indexIn(text) >= 0) { | 196 if (realmRe.indexIn(text) >= 0) { |
195 noteRealm(realmRe.cap(1)); | 197 noteRealm(realmRe.cap(1)); |
196 } | 198 } |