Show More
@@ -1387,10 +1387,14 b' def maxrev(repo, subset, x):' | |||||
1387 | Changeset with highest revision number in set. |
|
1387 | Changeset with highest revision number in set. | |
1388 | """ |
|
1388 | """ | |
1389 | os = getset(repo, fullreposet(repo), x) |
|
1389 | os = getset(repo, fullreposet(repo), x) | |
1390 | if os: |
|
1390 | try: | |
1391 | m = os.max() |
|
1391 | m = os.max() | |
1392 | if m in subset: |
|
1392 | if m in subset: | |
1393 | return baseset([m]) |
|
1393 | return baseset([m]) | |
|
1394 | except ValueError: | |||
|
1395 | # os.max() throws a ValueError when the collection is empty. | |||
|
1396 | # Same as python's max(). | |||
|
1397 | pass | |||
1394 | return baseset() |
|
1398 | return baseset() | |
1395 |
|
1399 | |||
1396 | def merge(repo, subset, x): |
|
1400 | def merge(repo, subset, x): | |
@@ -1426,10 +1430,14 b' def minrev(repo, subset, x):' | |||||
1426 | Changeset with lowest revision number in set. |
|
1430 | Changeset with lowest revision number in set. | |
1427 | """ |
|
1431 | """ | |
1428 | os = getset(repo, fullreposet(repo), x) |
|
1432 | os = getset(repo, fullreposet(repo), x) | |
1429 | if os: |
|
1433 | try: | |
1430 | m = os.min() |
|
1434 | m = os.min() | |
1431 | if m in subset: |
|
1435 | if m in subset: | |
1432 | return baseset([m]) |
|
1436 | return baseset([m]) | |
|
1437 | except ValueError: | |||
|
1438 | # os.min() throws a ValueError when the collection is empty. | |||
|
1439 | # Same as python's min(). | |||
|
1440 | pass | |||
1433 | return baseset() |
|
1441 | return baseset() | |
1434 |
|
1442 | |||
1435 | def modifies(repo, subset, x): |
|
1443 | def modifies(repo, subset, x): |
General Comments 0
You need to be logged in to leave comments.
Login now