Mercurial > evolve
comparison hgext/evolve.py @ 1418:ed9a8b1ee9bd
evolve: fix error in builddependencies
When MultipleSuccessorsError was raised, we were still running the code below
to add the dependency if succ was not None from a previous iteration.
This bug was harmless because dependencies and rdependencies are sets but it
makes the code clearer this way.
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Mon, 22 Jun 2015 12:41:32 -0700 |
parents | aaccca501ae0 |
children | b54524ae77c0 |
comparison
equal
deleted
inserted
replaced
1417:9e7da169f66e | 1418:ed9a8b1ee9bd |
---|---|
1392 for p in repo[r].parents(): | 1392 for p in repo[r].parents(): |
1393 try: | 1393 try: |
1394 succ = _singlesuccessor(repo, p) | 1394 succ = _singlesuccessor(repo, p) |
1395 except MultipleSuccessorsError, exc: | 1395 except MultipleSuccessorsError, exc: |
1396 dependencies[r] = exc.successorssets | 1396 dependencies[r] = exc.successorssets |
1397 continue | |
1397 if succ in revs: | 1398 if succ in revs: |
1398 dependencies[r].add(succ) | 1399 dependencies[r].add(succ) |
1399 rdependencies[succ].add(r) | 1400 rdependencies[succ].add(r) |
1400 return dependencies, rdependencies | 1401 return dependencies, rdependencies |
1401 | 1402 |