A federal judge on Wednesday gave Detroit and a group of bond insurance companies two or three weeks to settle a dispute over whether the city can treat certain bonds as unsecured debt, warning of an "all or nothing" ruling if no deal is reached.