Which error type is this in a one-tailed test? If the true populations of A and B have mean(A) > mean(B), and my one-tailed significance test in a sample incorrectly indicates that mean(B) > mean(A). Is this a type I error, type II or both?
 A: Let's simply look at some definitions:

a type I error is the incorrect rejection of a true null hypothesis
a type II error is the failure to reject a false null hypothesis

(If you don't refer to the definitions when faced with a question like this, you're wasting your time.)
Clearly, and directly from those definitions:
You cannot commit a type II error if you reject (you either correctly reject when $H_0$ is false, or you commit a type I error, by rejecting a true null).
Similarly, you cannot commit a type I error if you fail to reject (you either fail to reject when you shouldn't reject, or you commit a type II error by failing to reject a false null).

If the true populations of A and B have mean(A) > mean(B),

i.e. if that reality is your null*
* (presumably you'll need to include equality in the null as well)

and my one-tailed significance test in a sample incorrectly indicates that mean(B) > mean(A).

and it incorrectly rejects that null,

Is this a type I error, type II or both?

it cannot be type II since it involves a rejection. If your null was in the same direction as reality (but not in the same direction as the sample) then it's rejecting incorrectly, so it's a type I error.
