While Lopez is more advanced right now, I think Hanley has more long time upside. He will always be on a good team being on the Red Sox (unless for some odd reason they deal him), he should be more of a SB threat and I think he will hit for more power. All Hanley needs to do is keep his head on straight, which he seems to be doing now.
The one area that is "iffy" is were Ramirez will play with Renteria in Boston, he could play 2B which would be great .... or move to CF. If you really want a SS, I'd say Lopez is the better bet to stick there. Though if you want the better long term prospect, I'd say take Hanley.