From: Uwe Brauer <oub@mat.ucm.es>
To: help-gnu-emacs@gnu.org
Subject: Re: git/mercurial checkin(commit) with every save
Date: Sun, 04 Dec 2022 22:52:23 +0100 [thread overview]
Message-ID: <874juax2eg.fsf@mat.ucm.es> (raw)
In-Reply-To: CAPhAwGwgSGd4Uw7WtXL3qXbVYHfp0701KcEju_Gq1L_EUL-sdQ@mail.gmail.com
[-- Attachment #1: Type: text/plain, Size: 1530 bytes --]
>>> "JWH" == John W Higgins <wishdev@gmail.com> writes:
> Good Day,
> On Sun, Dec 4, 2022 at 10:21 AM Uwe Brauer <oub@mat.ucm.es> wrote:
>>
>> It is possible for RCS to have a checkin with every save.
>>
>> HG/Git are a bit different since they require a commit message for each
>> commit.
>>
>> Does anybody know about a similar feature for these two VCs?
>>
>>
> Git - https://github.com/ryuslash/git-auto-commit-mode
> Used it for years - works like a charm
This primitive solution is for the moment enough for me
(defun my-hg-checkin-on-save ()
"This is a trivial command for commiting on every save!"
(interactive)
(shell-command "hg ci -m \"Automatic commit on file save \" "))
(define-minor-mode hg-auto-commit-mode
"Automatically commit any changes made when saving with this mode turned on."
:lighter " AHG"
(if hg-auto-commit-mode
(add-hook 'after-save-hook 'my-hg-checkin-on-save t t)
(remove-hook 'after-save-hook 'my-hg-checkin-on-save t)))
And then at the end of the day I rebase all this commits to a single one.
Of course, if I added files etc, I need a more sophisticated solution.
--
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
next prev parent reply other threads:[~2022-12-04 21:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-04 18:20 git/mercurial checkin(commit) with every save Uwe Brauer
2022-12-04 18:27 ` Eli Zaretskii
2022-12-04 19:38 ` Uwe Brauer
2022-12-04 19:57 ` Eli Zaretskii
2022-12-04 18:38 ` John W Higgins
2022-12-04 19:39 ` Uwe Brauer
2022-12-04 21:52 ` Uwe Brauer [this message]
2022-12-05 23:33 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-12-04 18:46 ` Akib Azmain Turja
2022-12-04 19:40 ` Uwe Brauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874juax2eg.fsf@mat.ucm.es \
--to=oub@mat.ucm.es \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).