The velocity tracking problem for the evolutionary Navier--Stokes equations in two dimensions is studied. The controls are of distributed type and are submitted to bound constraints. First and second order necessary and sufficient conditions are proved. A fully discrete scheme based on the discontinuous (in time) Galerkin approach, combined with conforming finite element subspaces in space, is proposed and analyzed. Provided that the time and space discretization parameters, $\tau$ and $h$, respectively, satisfy $\tau \leq Ch^2$, then $L^2$ error estimates of order $O(h)$ are proved for the difference between the locally optimal controls and their discrete approximations.