The earlier functionality used to ignore the all but last -m flag's value.
It used to store the arguments information in a state dict and then overwrites each
subsequent value of -m in the 'message' key. This patch intercepts the message flag and
checks if it is already empty. In case it is not empty, add the current value of -m flag to
the message key with a leading '\n' character. This makes every subsequent passed -m flag
as the new line message of the commit.
Details
- Reviewers
baymax - Group Reviewers
hg-reviewers
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
FWIW, this is slightly different behavior from what git does. There, each -m is added as a separate *paragraph*. IOW,
$ git commit -m "first" -m "second"
creates:
first second
mercurial/fancyopts.py | ||
---|---|---|
366–374 | Right. Alternatively, we could add a subclass of customopt, but I don't know which FWIW, I'm kinda -1 on this feature, but I have no strong opinion and Git is the |
tests/test-commit.t | ||
---|---|---|
847 | agreed |
Since the current code just overwrites message each time with the newer. What can be done to avoid losing the earlier message values?
There seems to have been no activities on this Diff for the past 3 Months.
By policy, we are automatically moving it out of the need-review state.
Please, move it back to need-review without hesitation if this diff should still be discussed.
:baymax:need-review-idle:
I think this is not the right place to have this hack. We should have this as a part of hg commit code rather.