Emacs: существует ли способ генерировать скелет ChangeLog от разности?

Мне нравится ответ @ aws_apprentice. Но, поскольку вы попросили «напечатать ошибку», рассмотрите также pandas.testing.assert_frame_equal (документы) , что вызовет исключение AssertionError, если кадры данных не идентичны, и даст вам диагностический вывод.

6
задан Laurynas Biveinis 6 May 2009 в 17:31
поделиться

3 ответа

Я не знаю функции, которая делает это, но ее легко реализовать. По сути, вы хотите

  • получить измененные файлы
  • для каждого файла, позвоните в add-change-log
"Find change log file, and add an entry for today and an item for this file.
Optional arg WHOAMI (interactive prefix) non-nil means prompt for user
name and email (stored in `add-log-full-name' and `add-log-mailing-address').

Second arg FILE-NAME is file name of the change log.
If nil, use the value of `change-log-default-name'.

Third arg OTHER-WINDOW non-nil means visit in other window.

Fourth arg NEW-ENTRY non-nil means always create a new entry at the front;
never append to an existing entry.  Option `add-log-keep-changes-together'
otherwise affects whether a new entry is created.

Option `add-log-always-start-new-record' non-nil means always create a
new record, even when the last record was made on the same date and by
the same person.

The change log file can start with a copyright notice and a copying
permission notice.  The first blank line indicates the end of these
notices.

Today's date is calculated according to `add-log-time-zone-rule' if
non-nil, otherwise in local time."

, чтобы магический код выглядел примерно как

(apply 'make-magic-change-log-entry changed-files-list)

и make magic-change-log-entry просто каррирует функцию add-change-log , так что единственным аргументом является file-name - вы устанавливаете другие.

2
ответ дан 10 December 2019 в 00:44
поделиться

There is a function vc-update-change-log that automatically generates change log entries from the version control log entries.

3
ответ дан 10 December 2019 в 00:44
поделиться

Я написал функцию для выполнения чего-то похожего на то, о чем вы говорили. Вы можете получить код на http://www.emacswiki.org/emacs/log-edit-fill

2
ответ дан 10 December 2019 в 00:44
поделиться
Другие вопросы по тегам:

Похожие вопросы: