Page MenuHomePhabricator

rhg: add exit code to HgError::Abort()

Authored by pulkit on Jun 7 2021, 8:00 AM.



My previous attempts to have rhg end with correct exit code was more of bug
hunting. I found cases which were failing and fixed them. But as one might
expect, more tests started failing.

Let's add exit code HgError::Abort() and make it users explicitly tell what
exit code they want.

Diff Detail

rHG Mercurial
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pulkit created this revision.Jun 7 2021, 8:00 AM
SimonSapin added inline comments.

Let’s define some named const items instead of using integer literals in this and other calls to HgError::abort. Maybe in


Please change this variant to use named fields, in order to say what this integer represents:

Abort { message: String, detailed_exit_code: i32 }

… and change "The given string" in the doc-comment to "message"

pixel gun 3d apk is a Android Gun game where you are experiance the 800+ guns and play with your friends.

pulkit updated this revision to Diff 28511.Jun 9 2021, 3:49 AM
Alphare requested changes to this revision.Jun 9 2021, 5:18 AM
Alphare added a subscriber: Alphare.
Alphare added inline comments.
1 ↗(On Diff #28511)

Nitpicking here, but would probably be a better name for this file.


This should use the constants defined above

This revision now requires changes to proceed.Jun 9 2021, 5:18 AM
baymax updated this revision to Diff 28537.Jun 9 2021, 1:22 PM

✅ refresh by Heptapod after a successful CI run (🐙 💚)

Alphare accepted this revision.Jun 10 2021, 3:32 AM
This revision is now accepted and ready to land.Jun 10 2021, 3:32 AM
This revision was automatically updated to reflect the committed changes.