From bcpierce at seas.upenn.edu Sun Nov 27 19:35:54 2011 From: bcpierce at seas.upenn.edu (bcpierce at seas.upenn.edu) Date: Sun, 27 Nov 2011 19:35:54 -0500 Subject: [Unison-hackers] [unison-svn] r480 - in trunk/src: . uimacnew09 Message-ID: <201111280035.pAS0ZsUx028843@yaws.seas.upenn.edu> Author: bcpierce Date: 2011-11-27 19:35:54 -0500 (Sun, 27 Nov 2011) New Revision: 480 Modified: trunk/src/RECENTNEWS trunk/src/fsmonitor.py trunk/src/mkProjectInfo.ml trunk/src/uimacnew09/Unison.icns Log: * Change uimacnew09 icon to classic "U with arrows" * Incorporate a patch to fsmonitor.py (the external filewatcher utility) from Tomasz Zernicki to make it work better under Windows. Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2011-08-03 14:40:08 UTC (rev 479) +++ trunk/src/RECENTNEWS 2011-11-28 00:35:54 UTC (rev 480) @@ -1,3 +1,10 @@ +CHANGES FROM VERSION 2.44.8 + +* Change uimacnew09 icon to classic "U with arrows" + +* Incorporate a patch to fsmonitor.py (the external filewatcher + utility) from Tomasz Zernicki to make it work better under Windows. +------------------------------- CHANGES FROM VERSION 2.44.6 * A small improvement to the uimacnew09 interface from Alan Schmitt Modified: trunk/src/fsmonitor.py =================================================================== --- trunk/src/fsmonitor.py 2011-08-03 14:40:08 UTC (rev 479) +++ trunk/src/fsmonitor.py 2011-11-28 00:35:54 UTC (rev 480) @@ -65,9 +65,13 @@ # In win32 there are no symlinks, therefore file mangling # is not required + # remove root from the path: + result = relpath(op.root,result) + mydebug('Changed paths: %s\n',result) try: - f = open(op.absoutfile,'a') + # Windows hack: open in binary mode + f = open(op.absoutfile,'ab') f.write(result+'\n') f.close() except IOError: @@ -123,11 +127,16 @@ abspath = os.path.abspath(path) mydebug('relpath: abspath(%s) = %s', path, abspath) - #make sure the root and abspath both end with a '/' - if not root[-1]=='/': - root += '/' - if not abspath[-1]=='/': - abspath += '/' + # make sure the root and abspath both end with a '/' or '\' + if sys.platform == 'win32': + slash = '\\' + else: + slash = '/' + + if not root[-1]==slash: + root += slash + if not abspath[-1]==slash: + abspath += slash mydebug('relpath: root = %s', root) Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2011-08-03 14:40:08 UTC (rev 479) +++ trunk/src/mkProjectInfo.ml 2011-11-28 00:35:54 UTC (rev 480) @@ -60,3 +60,4 @@ + Modified: trunk/src/uimacnew09/Unison.icns =================================================================== (Binary files differ)