Replace local function with its canonical implementation in some cases.

Correct file permission modification and the corresponding repair logic.

Remove nonportable runtime argument to comply with implied requirements.

(0) -3 +3 +10 tip

mercurial