This is an archive of the discontinued Mercurial Phabricator instance.

uncommit: simplify condition for keeping commit
ClosedPublic

Authored by martinvonz on Mar 17 2018, 1:14 PM.

Details

Summary

We used to keep the commit if it would have become empty and --keep
was not passed. Since we just changed it so we also keep it if any
patterns were passed on the command line, the only remaining case
where we prune the commit is when no arguments were passed and --keep
was not passed either, we can simplify the "not files and not
allowempty" to just "not allowempty". Let's also rename "allowempty"
to "keepcommit" since it's no longer about allowing an empty commit.

Diff Detail

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

Event Timeline

martinvonz created this revision.Mar 17 2018, 1:14 PM
pulkit accepted this revision.Mar 17 2018, 1:22 PM
This revision was automatically updated to reflect the committed changes.