Just tried to run repoman in a dir that's not PORTDIR nor in PORTDIR_OVERLAY by accident, repoman complained about it with Unable to determine PORTDIR. This is confusing at least as I even told it PORTDIR via the environment (the problem in my case was that the dir wasn't listed in PORTDIR_OVERLAY). I don't really understand the logic in the relevant code there (always disliked this automagic stuff), but the condition to show that message looks screwy by itself without comments if not portdir_overlay: print darkred("Unable to determine PORTDIR.")
Yeah, that message confuses lots of people. ;) Here's what it says now in svn r4646: Repoman is unable to determine PORTDIR or PORTDIR_OVERLAY from the current working directory.
This has been release in 2.1.2_pre2-r8.