Homec4science

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

Authored by epriestley <git@epriestley.com> on Dec 23 2013, 19:43.

Description

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

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.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4257

Differential Revision: https://secure.phabricator.com/D7817

Details

Committed
epriestley <git@epriestley.com>Dec 23 2013, 19:43
Pushed
aubortJan 31 2017, 17:16
Parents
rPHd9a04fcb5342: Minor, make sure we release locks in pull daemon if we fail in unusual ways
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH6daa2b6c2efa: Fix a commit hook issue with the initial commit to Mercurial repositories (authored by epriestley <git@epriestley.com>).Dec 23 2013, 19:43