There are lots of rumors about the guns used in the Dirty Harry movies. But as far as I can tell, here's the straight scoop.
The first movie came out in 1971, so the gun is probably a 29-2. That can be confirmed, because the gun is now in the NRA Museum. It was given to John Milius when he retired and he donated it (or perhaps loaned it) to the NRA museum.
When the studio asked S&W for a Model 29 to be used in the movie, the production line was not set up for producing that model. So one was made up for them in the Tool Room. If you read Dwayne Charron's new book, My Life Journey with Smith & Wesson, you will understand the difference.
It is believed that S&W later provided a second gun to the movie company, but no one seems to know what became of it.
As fyimo stated, the barrel length was 6 1/2", which was standard at the time. The nonsense about the barrel not being pinned is just that - nonsense. Pinned barrels were around for several years after the movie was released.
On the DVD version of the movie there is an interview with John Milius in the Special Features section that is worth watching.
Jack