def _thg_path(): # check if caja-thg.py is a symlink first pfile = __file__ if pfile.endswith('.pyc'): pfile = pfile[:-1] path = os.path.dirname(os.path.dirname(os.path.realpath(pfile))) thgpath = os.path.normpath(path) testpath = os.path.join(thgpath, 'tortoisehg') if os.path.isdir(testpath) and thgpath not in sys.path: sys.path.insert(0, thgpath) _thg_path() from tortoisehg.util import paths, debugthg, cachethg if debugthg.debug('N'): debugf = debugthg.debugf else: debugf = debugthg.debugf_No # avoid breaking other Python caja extensions demandimport.disable() nofilecmds = 'about serve synch repoconfig userconfig merge unmerge'.split() class HgExtensionDefault: def __init__(self): self.scanStack = [] self.allvfs = {} self.inv_dirs = set()
excs = QueryValueEx(hkey, 'ExcludePath')[0] debugging = QueryValueEx(hkey, 'OverlayDebug')[0] in ('1', 'True') for p in incs.split(';'): path = p.strip() if path: includepaths.append(path) for p in excs.split(';'): path = p.strip() if path: excludepaths.append(path) except EnvironmentError: pass except ImportError: from time import time as GetTickCount CACHE_TIMEOUT = 5.0 debugging = debugthg.debug('O') if debugging: debugf = debugthg.debugf debugf('Enabled %s', enabled) debugf('LocalDisksOnly %s', localonly) debugf('IncludePaths %s', includepaths) debugf('ExcludePaths %s', excludepaths) else: debugf = debugthg.debugf_No STATUS_STATES = 'MAR!?IC' MODIFIED, ADDED, REMOVED, DELETED, UNKNOWN, IGNORED, UNCHANGED = STATUS_STATES NOT_IN_REPO = ' ' ROOT = "r" UNRESOLVED = 'U'
debugging = QueryValueEx(hkey, "OverlayDebug")[0] in ("1", "True") for p in incs.split(";"): path = p.strip() if path: includepaths.append(path) for p in excs.split(";"): path = p.strip() if path: excludepath.append(path) except EnvironmentError: pass except ImportError: from time import time as GetTickCount CACHE_TIMEOUT = 5.0 debugging = debugthg.debug("O") if debugging: debugf = debugthg.debugf debugf("Enabled %s", enabled) debugf("LocalDisksOnly %s", localonly) debugf("IncludePaths %s", includepaths) debugf("ExcludePaths %s", excludepaths) else: debugf = debugthg.debugf_No STATUS_STATES = "MAR!?IC" MODIFIED, ADDED, REMOVED, DELETED, UNKNOWN, IGNORED, UNCHANGED = STATUS_STATES NOT_IN_REPO = " " ROOT = "r" UNRESOLVED = "U"
# check if nautilus-thg.py is a symlink first pfile = __file__ if pfile.endswith('.pyc'): pfile = pfile[:-1] path = os.path.dirname(os.path.dirname(os.path.realpath(pfile))) thgpath = os.path.normpath(path) testpath = os.path.join(thgpath, 'tortoisehg') if os.path.isdir(testpath) and thgpath not in sys.path: sys.path.insert(0, thgpath) _thg_path() from tortoisehg.util import hglib, paths, debugthg, cachethg if debugthg.debug('N'): debugf = debugthg.debugf else: debugf = debugthg.debugf_No # avoid breaking other Python nautilus extensions demandimport.disable() nofilecmds = 'about serve synch repoconfig userconfig merge unmerge'.split() class HgExtensionDefault(GObject.GObject): def __init__(self): self.scanStack = [] self.allvfs = {} self.inv_dirs = set()