The Mending spell targets "one object of up to 1 lb./level". The ground is generally not considered an object, notnor is it less than 20 lbs.
What they are trying to do is to create a simple pit trap. These are created through the Craft skill, as noted on Traps:
A mechanical trap can be constructed by a PC through successful use of the Craft(traps) skill.
According to these rules, it'd have a Craft DC of 20, and cost 500 gp, but it explicitly says:
Particularly simple traps, such as pit traps, might have a greatly reduced cost, subject to GM discretion.
I'd personally rule a setup time of a few hours would be cost enough, though of course, this is very much a matter of DM judgement. You might also want to consider reducing the DC a bit, or changing failure to result in extra setup time as they have to fix their mistakes. (For example, see the Take 20 rules, which you might want to apply to this action - require them to take 20 times the normal time, in exchange for a guaranteed roll of 20)