# HG changeset patch
# User Simon Heimberg <[email protected]>
# Date 1242281269 -7200
# Node ID 7a043039f9b8a72fb4c5a41e22f7be1139d8bea4
# Parent  8f44afedd6894f89dfdc9ab70fbe6034b98e4cad
thgstatus.py: quicker dirname

diff -r 8f44afedd689 -r 7a043039f9b8 hgext/thgstatus.py
--- a/hgext/thgstatus.py        Die Mai 19 14:52:55 2009 +0200
+++ b/hgext/thgstatus.py        Don Mai 14 08:07:49 2009 +0200
@@ -24,7 +24,7 @@
     return repo.join("thgstatus")
 
 def dirname(f):
-    return '/'.join(f.split('/')[:-1])
+    return f[:max(0, f.rfind("/"))]
 
 def showentry(f, e):
     f("%s %s\n" % (e[0], e[1:-1]))

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to