changeset 742:0d3139ba2d66

remove redundant calls to fd.flush() prior to doing fd.close().
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Tue, 09 Nov 2010 13:49:30 +0100
parents b3128fec5d54
children 045120d3a110
files hgsubversion/maps.py hgsubversion/svnmeta.py
diffstat 2 files changed, 0 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/maps.py
+++ b/hgsubversion/maps.py
@@ -69,7 +69,6 @@ class AuthorMap(dict):
 
         f.close()
         if writing:
-            writing.flush()
             writing.close()
 
     def __getitem__(self, author):
@@ -147,7 +146,6 @@ class Tags(dict):
         assert self.endrev is None
         f = open(self.path, 'w')
         f.write('%s\n' % self.VERSION)
-        f.flush()
         f.close()
 
     def update(self, other):
@@ -169,7 +167,6 @@ class Tags(dict):
         hash, revision = info
         f = open(self.path, 'a')
         f.write('%s %s %s\n' % (node.hex(hash), revision, tag))
-        f.flush()
         f.close()
         dict.__setitem__(self, tag, hash)
 
@@ -218,7 +215,6 @@ class RevMap(dict):
     def _write(self):
         f = open(self.path, 'w')
         f.write('%s\n' % self.VERSION)
-        f.flush()
         f.close()
 
     def __setitem__(self, key, hash):
@@ -226,7 +222,6 @@ class RevMap(dict):
         f = open(self.path, 'a')
         b = branch or ''
         f.write(str(revnum) + ' ' + node.hex(hash) + ' ' + b + '\n')
-        f.flush()
         f.close()
         if revnum > self.youngest or not self.youngest:
             self.youngest = revnum
@@ -362,7 +357,6 @@ class BranchMap(dict):
 
         f.close()
         if writing:
-            writing.flush()
             writing.close()
 
 class TagMap(dict):
@@ -420,5 +414,4 @@ class TagMap(dict):
 
         f.close()
         if writing:
-            writing.flush()
             writing.close()
--- a/hgsubversion/svnmeta.py
+++ b/hgsubversion/svnmeta.py
@@ -141,7 +141,6 @@ class SVNMeta(object):
             if uuid:
                 f = open(os.path.join(self.meta_data_dir, 'uuid'), 'w')
                 f.write(uuid)
-                f.flush()
                 f.close()
             else:
                 raise hgutil.Abort('unable to operate on unrelated repository')