Commits

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