Changeset 6442338a58b6…
Parent c8e1bd3a14ec…
by
Changes to 6 files · Browse files at 6442338a58b6 Showing diff from parent c8e1bd3a14ec Diff from another changeset...
@@ -7,7 +7,7 @@
import os
-from mercurial import ui, scmutil, util, error
+from mercurial import ui, util, error
from PyQt4.QtCore import *
from PyQt4.QtGui import *
@@ -820,7 +820,7 @@ self.saveToPath([fn])
def saveGlobal(self):
- self.saveToPath(scmutil.user_rcpath())
+ self.saveToPath(hglib.user_rcpath())
def saveToPath(self, path):
fn, cfg = qtlib.loadIniFile(path, self)
|
@@ -46,8 +46,8 @@ 'from folder<p>%s</p>' % cwd))
return ('', '')
try:
- fname = util.canonpath(self.root, cwd, pats[0])
- target = util.canonpath(self.root, cwd, pats[1])
+ fname = hglib.canonpath(self.root, cwd, pats[0])
+ target = hglib.canonpath(self.root, cwd, pats[1])
except:
pass
os.chdir(self.root)
@@ -278,7 +278,7 @@
cmdline, vcl = self.compose_command(src, dest)
self.show_command((cmdline, vcl))
- new_name = util.canonpath(self.root, self.root, new_name)
+ new_name = hglib.canonpath(self.root, self.root, new_name)
if self.isCaseFoldingOnWin():
# We do the rename ourselves if it's a pure casefolding
# action on Windows. Because there is no way to make Hg
|
@@ -22,7 +22,7 @@ from PyQt4.QtGui import *
import mercurial.ui as uimod
-from mercurial import hg, scmutil, util, fancyopts, cmdutil, extensions, error
+from mercurial import hg, util, fancyopts, cmdutil, extensions, error
from tortoisehg.hgqt.i18n import agettext as _
from tortoisehg.util import hglib, paths, shlib, i18n
@@ -168,7 +168,7 @@ files = []
for f in lines:
try:
- cpath = scmutil.canonpath(root, cwd, f)
+ cpath = hglib.canonpath(root, cwd, f)
# canonpath will abort on .hg/ paths
except util.Abort:
continue
|
@@ -7,7 +7,7 @@
import os
-from mercurial import ui, scmutil, util, error
+from mercurial import ui, util, error
from tortoisehg.util import hglib, settings, paths, wconfig, i18n, bugtraq
from tortoisehg.hgqt.i18n import _
@@ -703,7 +703,7 @@
self.conftabs = QTabWidget()
layout.addWidget(self.conftabs)
- utab = SettingsForm(rcpath=scmutil.user_rcpath(), focus=focus)
+ utab = SettingsForm(rcpath=hglib.user_rcpath(), focus=focus)
self.conftabs.addTab(utab, qtlib.geticon('settings_user'),
_("%s's global settings") % username())
utab.restartRequested.connect(self._pushRestartRequest)
@@ -974,7 +974,7 @@ w = func(opts)
w.installEventFilter(self)
if e.globalonly:
- w.setEnabled(self.rcpath == scmutil.user_rcpath())
+ w.setEnabled(self.rcpath == hglib.user_rcpath())
lbl = QLabel(e.label)
lbl.installEventFilter(self)
lbl.setToolTip(e.tooltip)
|
@@ -14,7 +14,7 @@ from PyQt4.QtCore import *
from PyQt4.QtGui import *
-from mercurial import hg, ui, url, scmutil, util, error, demandimport
+from mercurial import hg, ui, url, util, error, demandimport
from mercurial import merge as mergemod
from tortoisehg.util import hglib, wconfig
@@ -1232,7 +1232,7 @@ qtlib.openhelpcontents('sync.html#security')
def accept(self):
- path = scmutil.user_rcpath()
+ path = hglib.user_rcpath()
fn, cfg = qtlib.loadIniFile(path, self)
if not hasattr(cfg, 'write'):
qtlib.WarningMsgBox(_('Unable to save authentication'),
|
@@ -12,7 +12,16 @@
from mercurial import ui, util, extensions, match, bundlerepo, url, cmdutil
from mercurial import dispatch, encoding, templatefilters, filemerge, error
-from mercurial import scmutil
+from mercurial import demandimport
+
+demandimport.disable()
+try:
+ # hg >= 1.9
+ from mercurial.scmutil import canonpath, user_rcpath
+except (ImportError, AttributeError):
+ # hg <= 1.8
+ from mercurial.util import canonpath, user_rcpath
+demandimport.enable()
_encoding = encoding.encoding
_encodingmode = encoding.encodingmode
@@ -321,13 +330,13 @@ root = paths.find_root(cwd)
for f in list:
try:
- canonpats.append(scmutil.canonpath(root, cwd, f))
+ canonpats.append(canonpath(root, cwd, f))
except util.Abort:
# Attempt to resolve case folding conflicts.
fu = f.upper()
cwdu = cwd.upper()
if fu.startswith(cwdu):
- canonpats.append(scmutil.canonpath(root, cwd, f[len(cwd+os.sep):]))
+ canonpats.append(canonpath(root, cwd, f[len(cwd+os.sep):]))
else:
# May already be canonical
canonpats.append(f)
|
Loading...