It can be very hard to discourage this habit but firmly and consistently telling the dog "NO" and doing something to distract it from rock hunting may be helpful. Teaching a dog to "give" (to drop something it is carrying in its mouth) can be very helpful as well. Most dogs will learn to associate the "give" command with a treat really quickly -- say "give" and then offer the treat. When the dog drops whatever it has, reinforce the behavior by giving the treat and saying "good dog" or whatever you like to say.
More adivce...
http://www.cracker.com.au/Viewthread.aspx?threadid=2206&categoryid=11111
http://www.chazhound.com/forums/archive/index.php/t-1016.html
http://www.vetinfo4dogs.com/dogindex.html