[Jay Berkenbilt] > When debian-changelog-mode is updated, we need to make sure that it > properly recognizes the new upstream version as well. I haven't > looked at the code to generate a patch, but I might if I have time.
This seems to be close. It's only lightly tested, mind. --- debian-changelog-mode.el +++ debian-changelog-mode.el @@ -920,17 +920,17 @@ ;;; The following is not strictly correct. The upstream version may actually ;;; contain a hyphen if a debian version number also exists, making two hyphens ;;; I'm also assuming it begins with a digit, which is not enforced - "\\(\\S-+\\) +(\\([0-9]:\\)?\\([0-9][0-9a-zA-Z.+:]*\\)\\(-\\([0-9a-zA-Z.+]+\\)\\)?\\() +[^\n]*\\)")) + "\\(\\S-+\\) +(\\([0-9]:\\)?\\([0-9][0-9a-zA-Z.+:~]*\\)\\(-\\([0-9a-zA-Z.+~]+\\)\\)?\\() +[^\n]*\\)")) ;; No match... ;; Check again for multiple hyphens, and adjust match-data if found ;; to leave only the bit past the last hyphen as the debian version ;; number. ((looking-at - "\\(\\S-+\\) +(\\([0-9]:\\)?\\([0-9][0-9a-zA-Z.+:]*\\)\\(-\\([0-9a-zA-Z.+]+\\)\\)*\\() +[^\n]*\\)") + "\\(\\S-+\\) +(\\([0-9]:\\)?\\([0-9][0-9a-zA-Z.+:~]*\\)\\(-\\([0-9a-zA-Z.+~]+\\)\\)*\\() +[^\n]*\\)") ;; We have a hit. Adjust match-data... (goto-char (match-end 5)) - (skip-chars-backward "0-9a-zA-Z.+") + (skip-chars-backward "0-9a-zA-Z.+~") (let ((deb-vsn-beg (point)) (ups-vsn-end (1- (point)))) (store-match-data @@ -987,7 +987,7 @@ (string-match (concat "/" (regexp-quote pkg-name) - "-\\([0-9][0-9a-zA-Z.+-]+\\)/debian/changelog") + "-\\([0-9][0-9a-zA-Z.+~-]+\\)/debian/changelog") buffer-file-name)) (setq debian-changelog-new-upstream-release-p t) (concat epoch (match-string 1 buffer-file-name) "-1")) @@ -997,7 +997,7 @@ ;; -> Use new upstream version with "-1" debian version. ((and debian-vsn (string-match - (concat "-\\([0-9][0-9a-zA-Z.+-]+\\)/debian/changelog") + (concat "-\\([0-9][0-9a-zA-Z.+~-]+\\)/debian/changelog") buffer-file-name)) (setq debian-changelog-new-upstream-release-p t) (concat epoch (match-string 1 buffer-file-name) "-1")) @@ -1018,7 +1018,7 @@ (regexp-quote upstream-vsn) "/debian/changelog") buffer-file-name)) (string-match (concat "/" (regexp-quote pkg-name) - "-\\([0-9a-zA-Z.+]+\\)/debian/changelog") + "-\\([0-9a-zA-Z.+~]+\\)/debian/changelog") buffer-file-name) (debian-changelog-greater-than upstream-vsn (match-string 1 buffer-file-name))) @@ -1044,19 +1044,19 @@ buffer-file-name)) (string-match (concat "/" (regexp-quote pkg-name) - "-\\([0-9a-zA-Z.+]+\\)/debian/changelog") + "-\\([0-9a-zA-Z.+~]+\\)/debian/changelog") buffer-file-name) (debian-changelog-greater-than (match-string 1 buffer-file-name) upstream-vsn)) (concat epoch (match-string 1 buffer-file-name))) ((string-match (concat "/" (regexp-quote pkg-name) - "-\\([0-9a-zA-Z.+]+\\)/debian/changelog") + "-\\([0-9a-zA-Z.+~]+\\)/debian/changelog") buffer-file-name) ;;Hmmm.. return version number from directory if we get this far (concat epoch (match-string 1 buffer-file-name))) ((string-match - (concat "-\\([0-9][0-9a-zA-Z.+]+\\)/debian/changelog") + (concat "-\\([0-9][0-9a-zA-Z.+~]+\\)/debian/changelog") buffer-file-name) ;;Hmmm.. return version number from directory if we get this far (concat epoch (match-string 1 buffer-file-name))) @@ -1353,8 +1353,8 @@ ;;; The following is not strictly correct. The upstream version may actually ;;; contain a hyphen if a debian version number also exists, making two hyphens ;;; I'm assuming it begins with a digit, which is not enforced - "^\\(\\S-+\\) +(\\([0-9]:\\)?\\([0-9][0-9a-zA-Z.+:]*\\)\\(-\\([0-9a-zA-Z.+]+\\)\\)*)" nil t) -;; ^ + "^\\(\\S-+\\) +(\\([0-9]:\\)?\\([0-9][0-9a-zA-Z.+:~]*\\)\\(-\\([0-9a-zA-Z.+~]+\\)\\)*)" nil t) +;; ^ ;; Note the asterix above, allowing more than one hyphen in the version ;; number, but wrongly assuming that all of it is the Debian version ;; instead of only the bit past the last hyphen. I might get NMUs wrongly
signature.asc
Description: Digital signature