1. TortoiseHg
  2. TortoiseHg
  3. thg

Commits

Steve Borho  committed 5db8a62

hglib: updatedir() was moved between mercurial modules

  • Participants
  • Parent commits 93f0e36
  • Branches stable

Comments (0)

Files changed (3)

File tortoisehg/hgtk/commit.py

View file
                     pfiles = {}
                     patch.internalpatch(fp, ui, 1, repo.root, files=pfiles,
                                         eolmode=None)
-                    patch.updatedir(ui, repo, pfiles)
+                    hglib.updatedir(ui, repo, pfiles)
                 except patch.PatchError, err:
                     s = str(err)
                     if s:

File tortoisehg/util/hglib.py

View file
 import time
 import inspect
 
+from mercurial import demandimport
+demandimport.disable()
+try:
+    # hg >= 1.7
+    from mercurial.cmdutil import updatedir
+except ImportError:
+    # hg <= 1.6
+    from mercurial.patch import updatedir
+demandimport.enable()
+
 from mercurial import ui, util, extensions, match, bundlerepo, url, cmdutil
 from mercurial import dispatch, encoding, templatefilters, filemerge
 

File tortoisehg/util/hgshelve.py

View file
                     fp.seek(0)
                     pfiles = {}
                     internalpatch(fp, ui, 1, repo.root, files=pfiles)
-                    patch.updatedir(ui, repo, pfiles)
+                    hglib.updatedir(ui, repo, pfiles)
                     patchdone = 1
                 except:
                     if opts['force']: