Page MenuHomePhabricator

Fix a commit hook issue with the initial commit to Mercurial repositories
ClosedPublic

Authored by epriestley on Dec 23 2013, 5:30 PM.
Tags
None
Referenced Files
F18770903: D7817.id17693.diff
Wed, Oct 8, 4:02 PM
F18760226: D7817.id.diff
Mon, Oct 6, 8:37 AM
F18756377: D7817.diff
Sun, Oct 5, 11:14 AM
F18734533: D7817.diff
Tue, Sep 30, 10:56 PM
F18621958: D7817.diff
Sep 15 2025, 10:00 AM
F18455153: D7817.id.diff
Sep 1 2025, 8:36 AM
F18436282: D7817.diff
Aug 31 2025, 10:55 AM
F18292530: D7817.id17690.diff
Aug 23 2025, 12:19 PM
Subscribers

Details

Summary

Fixes T4257. The hg heads command exits with an error code and no output in an empty repository.

Just ignore the error code: we don't have a great way to distinguish between errors, and we ran another hg command moments before, so we have at least some confidence it isn't a PATH sort of thing.

Test Plan

Created a new Mercurial repository and pushed to hit the error in T4257. Applied this fix and got a clean push with an accurate push log.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped