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.
'''Binary document diff wrapper scriptThis script is converted into an executable by py2exe for use inTortoiseHg binary packages. It is then used by TortoiseHg as a visualdiff application for binary document types.It takes two (diff) or four (merge) arguments, determines the file typebased on the file extension, then launches the appropriate document diffscript that THG has borrowed from the TortoiseSVN project.This script is quite useless outside of a TortoiseHg binary install.'''importosimportsysimportsubprocessimportshutilimportwin32conimportwin32apiimportwin32processimportlocalefrommercurialimportutilscripts={'doc':('diff-doc.js','merge-doc.js'),# MS Word'docx':('diff-doc.js','merge-doc.js'),'docm':('diff-doc.js','merge-doc.js'),'ppt':('diff-ppt.js',),# MS PowerPoint'pptx':('diff-ppt.js',),'pptm':('diff-ppt.js',),'xls':('diff-xls.vbs',),# MS Excel'xlsx':('diff-xls.vbs',),'xlsm':('diff-xls.vbs',),'xlsb':('diff-xls.vbs',),'xlam':('diff-xls.vbs',),'ods':('diff-odt.vbs','merge-ods.vbs'),# OpenOffice Text'odt':('diff-odt.vbs','merge-ods.vbs'),'sxw':('diff-sxw.vbs','merge-ods.vbs'),# OpenOffice Calc'nb':('diff-nb.vbs',),# Mathematica Notebook}def safe_encode(string, encoding):
if isinstance(string, unicode):
return string.encode(encoding)
-+ return string
-+def main():
args = sys.argv[1:]
if len(args) not in (2, 4):
print'Two or four arguments expected:'printsys.argv[0],'[local] [other]'printsys.argv[0],'[local] [base] [other] [output]'sys.exit(1)eliflen(args)==2:local,other=[os.path.abspath(f)forfinargs]base,ext=os.path.splitext(local)else:local,base,other,output=[os.path.abspath(f)forfinargs]base,ext=os.path.splitext(output)ifnotextorext.lower()[1:]notinscripts.keys():print'Unsupported file type',extsys.exit(1)proc=win32api.GetCurrentProcess()try:# This will fail on windows < NTfilename=win32process.GetModuleFileNameEx(proc,0)except:filename=win32api.GetModuleFileName(0)path=os.path.join(os.path.dirname(filename),'diff-scripts')ifnotos.path.isdir(path):print'Diff scripts not found at',pathsys.exit(1)use=scripts[ext.lower()[1:]]if'xls'inuse[0]andos.path.basename(local)==os.path.basename(other):# XLS hack; Excel will not diff two files if they have the same# basename.othertmp=other+'~x1'shutil.copy(other,othertmp)other=othertmpiflen(args)==2:script=os.path.join(path,use[0])cmd=['wscript',script,other,local]eliflen(use)==1:print'Unsupported file type for merge',localsys.exit(1)else:script=os.path.join(path,use[1])cmd=['wscript',script,output,other,local,base]encoding=locale.getpreferredencoding(do_setlocale=True)cmd=[util.shellquote(safe_encode(arg,encoding))forargincmd]cmdline=util.quotecommand(' '.join(cmd))proc=subprocess.Popen(cmdline,shell=True,creationflags=win32con.CREATE_NO_WINDOW,stderr=subprocess.PIPE,stdout=subprocess.PIPE,stdin=subprocess.PIPE)returnproc.communicate()if__name__=='__main__':main()
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.