uncommit needs an option for saving commit messages
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Invalid
|
Medium
|
Unassigned | ||
Bazaar GTK+ Frontends |
Fix Released
|
High
|
Vincent Ladeuil |
Bug Description
Suggestions from a user:
- uncommit saves the comments into a file (in some bzr-specific
directory)
- commit/gcommit picks the comments from that file if it exists (and
in the case of gcommit, still fires the GUI so that those comments can
be seen and edited).
Now there is the --file option of "bzr commit", how to be consistent
with that... The keep-messages and use-old-messages behaviour above
should be driven by options, and then users (like me) who desire these
behaviour could create [ALIASES].
Proposal
* option --save-file=MSGFILE for "bzr uncommit":
saves comments (global and per-file) into a file; if there are
per-file comments then those comments form a dictionary-like structure
so may not be human-readable and are not readable by "bzr commit
--file=". If on the other hand there was only a global comment, it
makes sense to write it in a format which "bzr commit --file=" can
absorb.
* option --file=MSGFILE for "bzr gcommit", which takes the file above
then fires the GUI, pre-filling the comment boxes
* option --file-
does not fail if file is missing.
It would make sense to re-use that for the future "cancel but retain
messages" button of gcommit. In that case, when this button is
clicked, I'd check if the comment file already exists, and if yes,
does it contain comments for files which were not seen as edited
during the current gcommit run (scenario: edit a code file, gcommit
and type a comment, cancel but retain messages, revert the code file
to do a small test, gcommit, cancel but retain messages: if the
comment file is automatically overwritten, the old comment is lost,
while the intention was maybe to not lose it). If that is the case,
I'd warn the user, show him the hidden comments and ask him if I
should also keep them or destroy them.
Related branches
Changed in bzr-gtk: | |
importance: | Undecided → High |
milestone: | none → 0.96.0 |
status: | Fix Committed → Fix Released |
Added a bugtask for bzr-gtk, as there are some suggestions/ requests here about having gcommit save messages when cancelling a commit, or picking up the messages saved away by uncommit.