Commits

Peter Bex committed 4a1abf0

Flush meta-file after writing to it. This allows us to properly probe whether it's been changed or not

Comments (0)

Files changed (1)

     # reopen and write out the new string
     mf = repo.wfile(meta_file, 'w')
     mf.write(s)
+    mf.flush()
     mf.close
 
-    # This doesn't work because repo.status operates on a cache or something
-    #if len(repo.status(match=matchmod.exact('.', '.', [meta_file]))[0]) == 0:
-    #    ui.status(_('Meta-file %s was already up-to-date\n') % meta_file)
-    #else:
-    ui.status(_('Meta-file %s is updated\n') % meta_file)
+    # Let the user know the file has been updated (or not, if unchanged)
+    if len(repo.status(match=matchmod.exact('.', '.', [meta_file]))[0]) == 0:
+        ui.status(_('Meta-file %s was already up-to-date\n') % meta_file)
+    else:
+        ui.status(_('Meta-file %s is updated\n') % meta_file)
 
 cmdtable = {
     "eggtag": (eggtag,