You don't say whether its a new gun with no finish, or one already finished. But either way your glue line needs to be a thin as possible, as glue just doesn't set up with the same texture as the wood.
Below are a couple before and after pics of a John Park rifle broken through the lock area. If you're using a new piece of wood to fill in, be sure the joint line is as tight as possible to minimize the glue line. If it's an old crack, like this gun, clean the crud out of the crack with dental picks or something similar to allow the crack to close completely.
As David mentioned, you can add a tiny bit of paint, flat black or a color close to the finish color in the glue to help conceal the line.
If it's an old or well used gun with dark areas on the finish in the area you're working on, while the glue is still a bit tacky, spray on a little color then let the glue dry completely. Once everything is dry, rub the area with a lint free cloth and you can actually work the paint into the texture of the wood and hide the crack pretty conviencingly.
Needless to say, Practice on some scrap first!
I should note that the last pic that the stock is still in two pieces, but the cracks and nail holes around the side plate mortice have pretty well disappeared.
Work continues on this gun.
John