Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

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

Changeset 93c29ea40f6e

Parent 8f44afedd689

by Simon Heimberg

Changes to one file · Browse files at 93c29ea40f6e Showing diff from parent 8f44afedd689 Diff from another changeset...

Change 1 of 1 Show Entire File thgutil/​hglib.py Stacked
 
113
114
115
116
 
117
118
119
 
 
 
 
 
 
 
120
121
122
 
113
114
115
 
116
117
 
 
118
119
120
121
122
123
124
125
126
127
@@ -113,10 +113,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):