# HG changeset patch
# User Simon Heimberg <[email protected]>
# Date 1312373769 -7200
# Node ID 4fc3521bcb5aae38bfd06546a67a8a15bb20dc9a
# Parent ea60172149aa1bcd90f2c96af9fd29f5161a623d
qtlib: clean up some code
missing slashes, global when variable is not written, split overlong lines
diff -r ea60172149aa -r 4fc3521bcb5a tortoisehg/hgqt/qtlib.py
--- a/tortoisehg/hgqt/qtlib.py Mit Aug 03 14:13:34 2011 +0200
+++ b/tortoisehg/hgqt/qtlib.py Mit Aug 03 14:16:09 2011 +0200
@@ -101,7 +101,7 @@
for m in regexp.finditer(editor):
expanded.append(editor[pos:m.start()-1])
phrase = editor[m.start()+1:m.end()-1]
- pos=m.end()+1
+ pos = m.end()+1
if '$LINENUM' in phrase:
if lineno is None:
# throw away phrase
@@ -150,7 +150,6 @@
_user_shell = None
def openshell(root, reponame):
- global _user_shell
if not os.path.exists(root):
WarningMsgBox(
_('Failed to open path in terminal'),
@@ -207,7 +206,8 @@
'control': 'black bold #dddddd_background',
}
-thgstylesheet = '* { white-space: pre; font-family: monospace; font-size: 9pt;
}'
+thgstylesheet = '* { white-space: pre; font-family: monospace;' \
+ ' font-size: 9pt; }'
tbstylesheet = 'QToolBar { border: 0px }'
def configstyles(ui):
@@ -345,7 +345,8 @@
u'<a href="http://example/">http://example/</a>'
"""
csmatch = r'(\b[0-9a-f]{12}(?:[0-9a-f]{28})?\b)'
- httpmatch =
r'(\b(http|https)://([-A-Za-z0-9+&@#/%?=~_()|!:,.;]*[-A-Za-z0-9+&@#/%=~_()|]))'
+ httpmatch = r'(\b(http|https)://([-A-Za-z0-9+&@#/%?=~_()|!:,.;]*' \
+ r'[-A-Za-z0-9+&@#/%=~_()|]))'
regexp = r'%s|%s' % (csmatch, httpmatch)
bodyre = re.compile(regexp)
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts.
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop