From: Thierry Parmentelat Date: Thu, 13 Nov 2008 10:26:35 +0000 (+0000) Subject: fold long lines in changelog verbatims X-Git-Tag: 4.3-rc1~126 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=7144bedcaa6ad331858b8b91176b695d9d08e889;p=build.git fold long lines in changelog verbatims --- 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 '}}}' ##############################