Mercurial and Git clients can push and pull from this alias URL to interact with this repository. You can change to which repository an alias points by going to the Aliases link on the project page.
## Simple TortoiseSVN-like Mercurial plugin for the Windows Shell# Published under the GNU GPL, v2 or later.# Copyright (C) 2007 Jelmer Vernooij <jelmer@samba.org># Copyright (C) 2007 Henry Ludemann <misc@hl.id.au># Copyright (C) 2007 TK Soh <teekaysoh@gmail.com>#importosimportsysimport_winregifhasattr(sys,"frozen")andsys.frozen=='dll':importwin32traceutil# specify version string, otherwise 'hg identify' will be used:version=''importtortoise.versiontortoise.version.remember_version(version)# shell extension classesfromtortoise.contextmenuimportContextMenuExtensionfromtortoise.iconoverlayimportChangedOverlay,AddedOverlay,UnchangedOverlaybin_path=os.path.dirname(os.path.join(os.getcwd(),sys.argv[0]))print"bin path = ",bin_path# TortoiseHg registry setupdefregister_tortoise_path(unregister=False):key=r"Software\TortoiseHg"cat=_winreg.HKEY_LOCAL_MACHINEif(unregister):_winreg.DeleteKey(cat,key)print"TortoiseHg unregistered"else:_winreg.SetValue(cat,key,_winreg.REG_SZ,bin_path)print"TortoiseHg registered"# for COM registration via py2exedefDllRegisterServer():RegisterServer(ContextMenuExtension)RegisterServer(ChangedOverlay)RegisterServer(AddedOverlay)RegisterServer(UnchangedOverlay)register_tortoise_path()# for COM registration via py2exedefDllUnregisterServer():UnregisterServer(ContextMenuExtension)UnregisterServer(ChangedOverlay)UnregisterServer(AddedOverlay)UnregisterServer(UnchangedOverlay)register_tortoise_path(unregister=True)defRegisterServer(cls):# Add mercurial to the library pathtry:importmercurialexceptImportError:fromwin32com.serverimportregisterregister.UnregisterClasses(cls)raise"Error: Failed to find mercurial module!"hg_path=os.path.dirname(os.path.dirname(mercurial.__file__))try:key="CLSID\\%s\\PythonCOMPath"%cls._reg_clsid_path=_winreg.QueryValue(_winreg.HKEY_CLASSES_ROOT,key)_winreg.SetValue(_winreg.HKEY_CLASSES_ROOT,key,_winreg.REG_SZ,"%s;%s"%(path,hg_path))except:pass # Add the appropriate shell extension registry keys
for category, keyname in cls.registry_keys:
_winreg.SetValue(category, keyname, _winreg.REG_SZ, cls._reg_clsid_)
++ # register the extension on Approved list+ try:+ apath = r'SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved'+ key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, apath, 0, _winreg.KEY_WRITE)+ _winreg.SetValueEx(key, cls._reg_clsid_, 0, _winreg.REG_SZ, 'TortoiseHg')+ except:+ pass print cls._reg_desc_, "registration complete."
defUnregisterServer(cls):forcategory,keynameincls.registry_keys:try:_winreg.DeleteKey(category,keyname)exceptWindowsError,details: import errno
if details.errno != errno.ENOENT:
raise
++ # unregister the extension from Approved list+ try:+ apath = r'SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved'+ key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, apath, 0, _winreg.KEY_WRITE)+ _winreg.DeleteValue(key, cls._reg_clsid_)+ except:+ pass+ print cls._reg_desc_, "unregistration complete."
if __name__=='__main__':
fromwin32com.serverimportregisterregister.UseCommandLine(ContextMenuExtension,finalize_register=lambda:RegisterServer(ContextMenuExtension),finalize_unregister=lambda:UnregisterServer(ContextMenuExtension))forclsin(ChangedOverlay,AddedOverlay,UnchangedOverlay):register.UseCommandLine(cls,finalize_register=lambda:RegisterServer(cls),finalize_unregister=lambda:UnregisterServer(cls))if"--unregister"insys.argv[1:]:register_tortoise_path(unregister=True)else:register_tortoise_path()
Attach a Trello Card
Add a tag
Your session has expired
You are no longer logged in. Please log in and try your request again.
Filter RSS Feed
This RSS feed URL allows you to see the contents of your current filter using any feed reader.
This link includes a special authentication token. If you share the URL with anyone else, they can see this RSS feed's activity. You can disable these tokens when needed.
Your current filter is unsaved; changing it won't affect this RSS feed.