Mercurial > evolve
comparison hgext/evolve.py @ 1319:8376fe35ebda
evolve: add new variable and comment
Add comment and introduce a new variable to keep track of if the progress ui
is shown. Later on we will use this variable in the implementation of the --rev
option.
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Mon, 04 May 2015 16:56:05 -0700 |
parents | 29363f79514f |
children | b5cd96395867 |
comparison
equal
deleted
inserted
replaced
1318:29363f79514f | 1319:8376fe35ebda |
---|---|
1244 ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), 'evolve') | 1244 ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), 'evolve') |
1245 | 1245 |
1246 # Progress handling | 1246 # Progress handling |
1247 seen = 1 | 1247 seen = 1 |
1248 count = allopt and _counttroubled(ui, repo) or 1 | 1248 count = allopt and _counttroubled(ui, repo) or 1 |
1249 showprogress = allopt | |
1249 | 1250 |
1250 def progresscb(): | 1251 def progresscb(): |
1251 if allopt: | 1252 if allopt: |
1252 ui.progress('evolve', seen, unit='changesets', total=count) | 1253 ui.progress('evolve', seen, unit='changesets', total=count) |
1253 | 1254 |
1255 # Continuation handling | |
1254 if contopt: | 1256 if contopt: |
1255 if anyopt: | 1257 if anyopt: |
1256 raise util.Abort('cannot specify both "--any" and "--continue"') | 1258 raise util.Abort('cannot specify both "--any" and "--continue"') |
1257 if allopt: | 1259 if allopt: |
1258 raise util.Abort('cannot specify both "--all" and "--continue"') | 1260 raise util.Abort('cannot specify both "--all" and "--continue"') |
1284 ui.status(_('working directory is now at %s\n') % repo['.']) | 1286 ui.status(_('working directory is now at %s\n') % repo['.']) |
1285 return result | 1287 return result |
1286 progresscb() | 1288 progresscb() |
1287 nexttrouble = _picknexttroubled(ui, repo, anyopt or allopt) | 1289 nexttrouble = _picknexttroubled(ui, repo, anyopt or allopt) |
1288 | 1290 |
1289 if allopt: | 1291 # Cleanup |
1292 if showprogress: | |
1290 ui.progress('evolve', None) | 1293 ui.progress('evolve', None) |
1291 | 1294 |
1292 if repo['.'] != startnode: | 1295 if repo['.'] != startnode: |
1293 ui.status(_('working directory is now at %s\n') % repo['.']) | 1296 ui.status(_('working directory is now at %s\n') % repo['.']) |
1294 | 1297 |