TAG[.postDISTANCE[.dev0]+gHEX] . The ".dev0" means dirty. Note that .dev0 sorts backwards (a dirty tree will appear "older" than the corresponding clean one), but you shouldn't be releasing software with -dirty anyways. Exceptions: 1: no tags. 0.postDISTANCE[.dev0]
(pieces)
| 458 | |
| 459 | |
| 460 | def render_pep440_post(pieces): |
| 461 | """TAG[.postDISTANCE[.dev0]+gHEX] . |
| 462 | |
| 463 | The ".dev0" means dirty. Note that .dev0 sorts backwards |
| 464 | (a dirty tree will appear "older" than the corresponding clean one), |
| 465 | but you shouldn't be releasing software with -dirty anyways. |
| 466 | |
| 467 | Exceptions: |
| 468 | 1: no tags. 0.postDISTANCE[.dev0] |
| 469 | """ |
| 470 | if pieces["closest-tag"]: |
| 471 | rendered = pieces["closest-tag"] |
| 472 | if pieces["distance"] or pieces["dirty"]: |
| 473 | rendered += ".post%d" % pieces["distance"] |
| 474 | if pieces["dirty"]: |
| 475 | rendered += ".dev0" |
| 476 | rendered += plus_or_dot(pieces) |
| 477 | rendered += "g%s" % pieces["short"] |
| 478 | else: |
| 479 | # exception #1 |
| 480 | rendered = "0.post%d" % pieces["distance"] |
| 481 | if pieces["dirty"]: |
| 482 | rendered += ".dev0" |
| 483 | rendered += "+g%s" % pieces["short"] |
| 484 | return rendered |
| 485 | |
| 486 | |
| 487 | def render_pep440_post_branch(pieces): |
no test coverage detected
searching dependent graphs…