From 7144bedcaa6ad331858b8b91176b695d9d08e889 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Thu, 13 Nov 2008 10:26:35 +0000 Subject: [PATCH] fold long lines in changelog verbatims --- module-tools.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/module-tools.py b/module-tools.py index 29846175..c4e0f06d 100755 --- a/module-tools.py +++ b/module-tools.py @@ -55,6 +55,15 @@ def default_editor(): editor = "emacs" return editor +### fold long lines +fold_length=132 + +def print_fold (line): + while len(line) >= fold_length: + print line[:fold_length],'\\' + line=line[fold_length:] + print line + class Command: def __init__ (self,command,options): self.command=command @@ -941,7 +950,6 @@ class Build (Module): def get_distrotags (self): return [os.path.basename(p) for p in glob("%s/*tags*mk"%self.edge_dir())] - class Release: # header in diff output @@ -1037,7 +1045,7 @@ class Release: if line[0] in ['@']: print '----------' elif line[0] in ['+','-']: - print line + print_fold(line) print '}}}' ############################## -- 2.47.0