[devscripts] 01/01: debpatch: raise an error when a patch tries to edit the same entry

Ximin Luo infinity0 at debian.org
Tue Apr 18 19:00:20 UTC 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch pu/debpatch
in repository devscripts.

commit 3a4d217e82c07572f30751b90678d4933a1ad898
Author: Ximin Luo <infinity0 at debian.org>
Date:   Tue Apr 18 21:00:05 2017 +0200

    debpatch: raise an error when a patch tries to edit the same entry
---
 scripts/debpatch | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/debpatch b/scripts/debpatch
index 578392a..0686db9 100755
--- a/scripts/debpatch
+++ b/scripts/debpatch
@@ -62,6 +62,9 @@ def read_dch_patch(dch_patch):
     # this should be true all the time in practice
     source_version = str(Changelog(source_str, 1)[0].version)
     target = Changelog(target_str, 1)[0]
+    if source_version == str(target.version):
+        # TODO: it could be possible to deal with this, but is a bit complex
+        raise ValueError("don't (yet) know how to deal with d/changelog patch that edits the same version")
     return source_version, target
 
 def apply_dch_patch(source_file, current, patch_name, old_version, target, dry_run):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list