This is an archive of the discontinued Mercurial Phabricator instance.

uncommit: inform user if the commit is empty after uncommit
ClosedPublic

Authored by martinvonz on Feb 15 2019, 2:12 PM.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

martinvonz created this revision.Feb 15 2019, 2:12 PM
pulkit added a subscriber: pulkit.Feb 15 2019, 2:59 PM
pulkit added inline comments.
hgext/uncommit.py
87

how about something like this (preserving the empty commit). The reason is that we need to tell that the empty commit is preserved more than the fact the commit is empty.

note the (, it makes it look like a help text.

martinvonz marked an inline comment as done.Feb 15 2019, 3:19 PM
martinvonz updated this revision to Diff 14108.
martinvonz added inline comments.Feb 15 2019, 3:20 PM
hgext/uncommit.py
87

I added a note: in front instead. I think we usually use parentheses for hints.

I also changed s/preserving/keeping/ to match the term we use in the --keep flag (and the upcoming config option).

I kind of like the all files uncommitted part since it explains what empty commit we're talking about. Should I add it back?

pulkit added inline comments.Feb 15 2019, 3:27 PM
hgext/uncommit.py
87

I kind of like the all files uncommitted part since it explains what empty commit we're talking about. Should I add it back?

sure!

martinvonz added inline comments.Feb 15 2019, 3:31 PM
hgext/uncommit.py
87

Hmm, "all files uncommitted, keeping empty commit" makes it sound like the second part follows from the first (which is not correct). I'll just leave it as is.

martinvonz added inline comments.Feb 15 2019, 4:17 PM
hgext/uncommit.py
87

And I just realized that we do use parentheses quite frequently for non-hint notes too, such as for "(leaving bookmark test)" and "(no more unresolved files)". Examples of "note: " include "note: commit message saved in .hg/last-message.txt" and "note: graft of 27:17d42b8f5d50 created no changes to commit". It seems there are quite many of each, so it's not clear that one or the other is preferred. I like "note: " better, so I'll leave it as is unless someone else feels strongly.

pulkit accepted this revision.Feb 19 2019, 9:53 AM
This revision was automatically updated to reflect the committed changes.