# HG changeset patch
# User Sune Foldager <c...@cyanite.org>
# Date 1322751604 -3600
# Branch stable
# Node ID 4d7e202a735ff7fb3062ffeba31dbb4d75e61c22
# Parent  d3d9c6af529a0dc9fe69389a9b851b7339c2f5b2
thgrepo: don't instantiate bundlerepository objects directly

Use mercurial.hg.repository instead, to ensure proper wrapping.

diff -r d3d9c6af529a -r 4d7e202a735f tortoisehg/hgqt/thgrepo.py
--- a/tortoisehg/hgqt/thgrepo.py        Wed Nov 30 23:51:08 2011 -0600
+++ b/tortoisehg/hgqt/thgrepo.py        Thu Dec 01 16:00:04 2011 +0100
@@ -39,14 +39,9 @@
     '''Returns a subclassed Mercurial repository to which new
     THG-specific methods have been added. The repository object
     is obtained using mercurial.hg.repository()'''
-    if bundle:
-        if _ui is None:
-            _ui = uimod.ui()
-        repo = bundlerepo.bundlerepository(_ui, path, bundle)
-        repo.__class__ = _extendrepo(repo)
-        repo._pyqtobj = ThgRepoWrapper(repo)
-        return repo
-    if create or path not in _repocache:
+    if create or bundle or path not in _repocache:
+        if bundle:
+            path = 'bundle:%s+%s' % (path, bundle)
         if _ui is None:
             _ui = uimod.ui()
         try:

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to