Mercurial > hgsubversion
comparison hgsubversion/util.py @ 1127:eaefb3413b87
util: rename pickle_atomic to dump
This is in preparation for an upcoming patch that will add a 'load' method to
util.
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Fri, 23 Aug 2013 10:46:08 -0500 |
parents | 99c503cfcc9c |
children | 2922f4881a04 |
comparison
equal
deleted
inserted
replaced
1126:cb4dccc90ff1 | 1127:eaefb3413b87 |
---|---|
140 string = "" | 140 string = "" |
141 f = open(file_path, 'wb') | 141 f = open(file_path, 'wb') |
142 f.write(str(string)) | 142 f.write(str(string)) |
143 f.close() | 143 f.close() |
144 | 144 |
145 def pickle_atomic(data, file_path): | 145 def dump(data, file_path): |
146 """pickle some data to a path atomically. | 146 """pickle some data to a path atomically. |
147 | 147 |
148 This is present because I kept corrupting my revmap by managing to hit ^C | 148 This is present because I kept corrupting my revmap by managing to hit ^C |
149 during the pickle of that file. | 149 during the pickle of that file. |
150 """ | 150 """ |