Friedrich Kastner-Masilko avatar Friedrich Kastner-Masilko committed ce8a0e1 Merge

Merged in Ruslan's fix for issue #1.

Comments (0)

Files changed (1)

                 fname = line.strip().split(',')[0]
                 tsdict[fname] = float(-1)
                 tslist.append(fname)
+    tsfile.close()                
 
     for f, mtime in tsdict.items():
         if mtime>=0:
                     fname = line.strip().split(',')[0]
                     tsdict[fname] = float(-1)
                     tslist.append(fname)
+        tsfile.close()
 
         if matchin and len(matchin.files())>0:            
             match = matchin.files()
                     pm.write("%s\n" % fname)
                 else:                    
                     pm.write("%s,%s\n" % (fname, tsdict[fname]))
+            pm.close()
             if (not matchin) or matchin('.hgtimestamp'):
                 pass
             else:
                 matchin.matchfn=matchfn
                 if (len(matchin.files())>0):
                     matchin.files().append('.hgtimestamp')
-            pm.close()
         else:
             repo.ui.debug(_('No tracked timestamp\n'))
                                             
     return repo.timestamp_origcommit(text, user, date, matchin, force, editor, extra)
 
-localrepo.localrepository.timestamp_origcommit = localrepo.localrepository.commit
-localrepo.localrepository.commit = _commit
+if not hasattr(localrepo.localrepository, "timestamp_origcommit"):
+    localrepo.localrepository.timestamp_origcommit = localrepo.localrepository.commit
+    localrepo.localrepository.commit = _commit
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.