# HG changeset patch
# User Simon Heimberg <[email protected]>
# Date 1242801578 -7200
# Node ID c5b0b0072934f073695a6ad88f4a87918bc93d39
# Parent e9fe5216a4fc90bd09aa9dfcc08da5f2582fabec
hglib: adapt to new mq object
use "in repo.__dict__" instead of "hasattr" for not creating the mq object
use mq.invalidate when it exists
diff -r e9fe5216a4fc -r c5b0b0072934 thgutil/hglib.py
--- a/thgutil/hglib.py Mit Mai 20 08:27:34 2009 +0200
+++ b/thgutil/hglib.py Mit Mai 20 08:39:38 2009 +0200
@@ -115,10 +115,15 @@
def invalidaterepo(repo):
repo.invalidate()
repo.dirstate.invalidate()
- if hasattr(repo, 'mq'):
+ if 'mq' in repo.__dict__: #do not create if it did not exist
mq = repo.mq
- mqclass = mq.__class__
- repo.mq = mqclass(mq.ui, mq.basepath, mq.path)
+ if hasattr(mq, 'invalidate'):
+ #Mercurial 1.3
+ mq.invalidate()
+ else:
+ #Mercurial 1.2
+ mqclass = mq.__class__
+ repo.mq = mqclass(mq.ui, mq.basepath, mq.path)
def hgcmd_toq(path, q, *args):
------------------------------------------------------------------------------
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