Mercurial > evolve
comparison hgext/evolve.py @ 1411:64515965c0df
evolve: some style fix
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 19 Jun 2015 17:03:40 -0700 |
parents | 2c451fece7a6 |
children | 8794a4680bdd |
comparison
equal
deleted
inserted
replaced
1410:2c451fece7a6 | 1411:64515965c0df |
---|---|
1337 raise MultipleSuccessorsError(newer) | 1337 raise MultipleSuccessorsError(newer) |
1338 | 1338 |
1339 return repo[newer[0][0]].rev() | 1339 return repo[newer[0][0]].rev() |
1340 | 1340 |
1341 def builddependencies(repo, revs): | 1341 def builddependencies(repo, revs): |
1342 """ returns dependency graphs giving an order to solve instability of revs | 1342 """returns dependency graphs giving an order to solve instability of revs |
1343 (see orderrevs for more information on usage) """ | 1343 (see _orderrevs for more information on usage)""" |
1344 | 1344 |
1345 # For each troubled revision we keep track of what instability if any should | 1345 # For each troubled revision we keep track of what instability if any should |
1346 # be resolved in order to resolve it. Example: | 1346 # be resolved in order to resolve it. Example: |
1347 # dependencies = {3: [6], 6:[]} | 1347 # dependencies = {3: [6], 6:[]} |
1348 # Means that: 6 has no dependency, 3 depends on 6 to be solved | 1348 # Means that: 6 has no dependency, 3 depends on 6 to be solved |
1378 elif targetcat in repo['.'].troubles(): | 1378 elif targetcat in repo['.'].troubles(): |
1379 revs = set([repo['.'].rev()]) | 1379 revs = set([repo['.'].rev()]) |
1380 return revs | 1380 return revs |
1381 | 1381 |
1382 | 1382 |
1383 def orderrevs(repo, revs): | 1383 def _orderrevs(repo, revs): |
1384 """ Compute an ordering to solve instability for the given revs | 1384 """Compute an ordering to solve instability for the given revs |
1385 | 1385 |
1386 - Takes revs a list of instable revisions | 1386 - Takes revs a list of instable revisions |
1387 | 1387 |
1388 - Returns the same revisions ordered to solve their instability from the | 1388 - Returns the same revisions ordered to solve their instability from the |
1389 bottom to the top of the stack that the stabilization process will produce | 1389 bottom to the top of the stack that the stabilization process will produce |
1535 | 1535 |
1536 # For the progress bar to show | 1536 # For the progress bar to show |
1537 count = len(revs) | 1537 count = len(revs) |
1538 # Order the revisions | 1538 # Order the revisions |
1539 if targetcat == 'unstable': | 1539 if targetcat == 'unstable': |
1540 revs = orderrevs(repo, revs) | 1540 revs = _orderrevs(repo, revs) |
1541 for rev in revs: | 1541 for rev in revs: |
1542 progresscb() | 1542 progresscb() |
1543 _solveone(ui, repo, repo[rev], dryrunopt, confirmopt, | 1543 _solveone(ui, repo, repo[rev], dryrunopt, confirmopt, |
1544 progresscb, targetcat) | 1544 progresscb, targetcat) |
1545 seen += 1 | 1545 seen += 1 |