Mercurial Queues Emulation for Git
修訂 | 56fe1e90d736f072a04de45240c30e9dbce00318 (tree) |
---|---|
時間 | 2022-02-24 19:34:25 |
作者 | ![]() |
Commiter | Keith Marshall |
Add mercurial support for ChangeLog generation.
* Makefile.in (scm_cmd) [.hg exists]: Set to use "hg".
(scm_cmd) [! .hg exists]: Fall back to use "git", as default.
(hg_changelog_template): New formatting macro; define it.
@@ -323,9 +323,15 @@ $(addprefix srcdist-package-,content: changelog scripts files) | ||
323 | 323 | srcdist-package-changelog: $(PACKAGE_DISTNAME) |
324 | 324 | $(scm_cmd) log $(changelog_template) > $(PACKAGE_DISTNAME)/ChangeLog |
325 | 325 | |
326 | -scm_cmd := git | |
326 | +scm_cmd := $(if $(wildcard ${srcdir}/.hg),hg,git) | |
327 | 327 | git_changelog_template := --format='%%%%%%%as %an <%ae>%n%n%-s%n%+b' |
328 | 328 | git_changelog_template += | sed -e 's/^./\t&/' -e s'/^\t%%%//' |
329 | + | |
330 | +hg_changelog_template := \n\n\t{sub("\n\t*","\n",desc)|tabindent}\n\n | |
331 | +hg_changelog_template := {user|person} <{user|email}>$(hg_changelog_template) | |
332 | +hg_changelog_template := {date|shortdate} $(hg_changelog_template) | |
333 | +hg_changelog_template := --template='$(hg_changelog_template)' | |
334 | + | |
329 | 335 | changelog_template := $($(scm_cmd)_changelog_template) |
330 | 336 | |
331 | 337 | vpath install-sh ${srcdir} |