Commits

Steve Borho committed 5db8a62

hglib: updatedir() was moved between mercurial modules

Comments (0)

Files changed (3)

tortoisehg/hgtk/commit.py

                     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:

tortoisehg/util/hglib.py

 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
 

tortoisehg/util/hgshelve.py

                     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']: