view whitespacecleanup.sh @ 5068:140f2811fc6f

comments: avoid storing 'No comments' text when changing status When a general comment (with or without status change) is added to a changeset or pull request, and no text was added, Kallithea automatically used 'No comments' as text. The stub text is added to the database as if it has been entered by the user and it can thus not easily be identified as an automatic comment. This commit makes following changes: - allow adding an empty comment to the database when there is a status change. An empty comment without status change is ignored. - do not add a stub text to the database, but generate it on demand - the stub text is shown in italic font to differentiate it from user-entered text Currently there is a large amount of duplication between controllers/changeset.py and controllers/pullrequests.py, which is to be cleaned up in a later commit.
author Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
date Thu, 23 Apr 2015 21:44:19 +0200
parents 9cf229b46e49
children 40871e0eb13a
line wrap: on
line source

#!/bin/bash -x

# Enforce some consistency in whitespace - just to avoid spurious whitespaces changes

files=`hg loc '*.py' '*.html' '*.css' '*.rst' '*.txt' '*.js' | egrep -v '/lockfiles.py|LICENSE-MERGELY.html|/codemirror/|/fontello/|(graph|mergely|native.history|select2/select2|yui.flot)\.js$'`
sed -i "s,`printf '\t'`,    ,g" $files
sed -i "s,  *$,,g" $files

sed -i 's,\([^ /]\){,\1 {,g' `hg loc '*.css'`
sed -i 's|^\([^ /].*,\)\([^ ]\)|\1 \2|g' `hg loc '*.css'`

sed -i 's/^\(    [^: ]*\) *: *\([^/]\)/\1: \2/g' kallithea/public/css/{style,contextbar}.css
sed -i '1s|, |,|g' kallithea/public/css/{style,contextbar}.css
sed -i 's/^\([^ ,/]\+ [^,]*[^ ,]\) *, *\(.\)/\1,\n\2/g' kallithea/public/css/{style,contextbar}.css
sed -i 's/^\([^ ,/].*\)   */\1 /g' kallithea/public/css/{style,contextbar}.css
sed -i 's,^--$,-- ,g' kallithea/templates/email_templates/main.txt

hg diff