diff options
author | Kyle Meyer <kyle@kyleam.com> | 2019-11-16 22:01:14 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2019-11-16 22:08:40 -0500 |
commit | 4d3af2e9713fb28b90d08c58c4d8e3dcce25310a (patch) | |
tree | 23c888b0892320ba2b9c90095062284467216f01 | |
parent | d48a699b1c1f6e949dc7cd2badbc7d32d10bdd18 (diff) | |
download | orgmode-backport-notes-4d3af2e9713fb28b90d08c58c4d8e3dcce25310a.tar.gz |
Move "new entry" command to library
-rw-r--r-- | org-maint.el | 28 | ||||
-rw-r--r-- | orgmode-backports.org | 44 |
2 files changed, 37 insertions, 35 deletions
diff --git a/org-maint.el b/org-maint.el index 3e8f8df..db5b16a 100644 --- a/org-maint.el +++ b/org-maint.el @@ -37,3 +37,31 @@ If APPLY is non-nil, use 'git apply' instead of 'git am'." (or (and (re-search-forward "- \\[[ X]\\] \\([A-z0-9]\\{40\\}\\)") (match-string-no-properties 1)) (user-error "Next revision item not found")))) + +(defun org-maint-check-for-new () + "Check for new commits to backport. +The last commit found is assumed to be the return value of +`org-maint-rev-from-next-item`, and Emacs ref name that should be +checked is taken from the Org \"ref\" property." + (interactive) + (let ((ref (or (org-entry-get (point) "ref") + (user-error "No reference found"))) + (last-rev (org-maint-rev-from-next-item)) + (default-directory org-maint-emacs-dir)) + (with-current-buffer (get-buffer-create "*org-maint-new-entries*") + (goto-char (point-min)) + (erase-buffer) + (insert (format ";; %s..%s\n\n" last-rev ref)) + (call-process "git" nil t nil + "log" "--oneline" + "--format=- [ ] %H%n%n %s%n %an%n %cd%n" + (concat "^" last-rev) ref + "--" + "doc/misc/org.texi" + "etc/ORG-NEWS" + "etc/org" + "etc/refcards/orgcard.tex" + "etc/schema/od-manifest-schema-v1.2-os.rnc" + "etc/schema/od-schema-v1.2-os.rnc" + "lisp/org") + (display-buffer (current-buffer))))) diff --git a/orgmode-backports.org b/orgmode-backports.org index 84b5fe9..f40aa7c 100644 --- a/orgmode-backports.org +++ b/orgmode-backports.org @@ -46,17 +46,9 @@ NOTE: Look for "ONSYNC" for changes that should be considered when syncing, but that don't seem appropriate for Org backport. ** emacs-25 branch [40/40] - -#+headers: :var rev=(org-maint-rev-from-next-item) -#+begin_src sh :results silent :dir ~/src/emacs/emacs - echo $rev..origin/emacs-25 >/tmp/emacs-git-log - git log --oneline \ - --format="- [ ] %H%n%n %s%n %an%n %cd%n" \ - $rev..origin/emacs-25 \ - -- lisp/org doc/misc/org.texi etc/refcards/orgcard.tex etc/ORG-NEWS \ - etc/org etc/schema/od-manifest-schema-v1.2-os.rnc etc/schema/od-schema-v1.2-os.rnc \ - >>/tmp/emacs-git-log -#+end_src +:PROPERTIES: +:ref: origin/emacs-25 +:END: - [X] d38fd9229c07c531ebc0bec0ea65f7d7dffcd983 @@ -324,18 +316,9 @@ syncing, but that don't seem appropriate for Org backport. Tue May 19 15:01:16 2015 -0700 ** emacs 26 branch [43/44] - -#+headers: :var rev=(org-maint-rev-from-next-item) -#+begin_src sh :results silent - echo $rev..origin/emacs-26 >/tmp/emacs-git-log - git -C ~/src/emacs/emacs \ - log --oneline \ - --format="- [ ] %H%n%n %s%n %an%n %cd%n" \ - ^$rev origin/emacs-26 \ - -- lisp/org doc/misc/org.texi etc/refcards/orgcard.tex etc/ORG-NEWS \ - etc/org etc/schema/od-manifest-schema-v1.2-os.rnc etc/schema/od-schema-v1.2-os.rnc \ - >>/tmp/emacs-git-log -#+end_src +:PROPERTIES: +:ref: origin/emacs-26 +:END: - [ ] 7681a57b88a91bf9eedc890b974df9728d5eb50d @@ -631,18 +614,9 @@ syncing, but that don't seem appropriate for Org backport. Sun Sep 10 22:31:23 2017 -0700 ** master branch [170/171] - -#+headers: :var rev=(org-maint-rev-from-next-item) -#+begin_src sh :results silent :dir ~/src/emacs/emacs - echo $rev..origin/master >/tmp/emacs-git-log - git -C ~/src/emacs/emacs \ - log --oneline \ - --format="- [ ] %H%n%n %s%n %an%n %cd%n" \ - $rev..origin/master \ - -- lisp/org doc/misc/org.texi etc/refcards/orgcard.tex etc/ORG-NEWS \ - etc/org etc/schema/od-manifest-schema-v1.2-os.rnc etc/schema/od-schema-v1.2-os.rnc \ - >>/tmp/emacs-git-log -#+end_src +:PROPERTIES: +:ref: origin/master +:END: - [X] 6b4a97c1c78f39ce890d100acceceb652d14e20d |