Mercurial > hgsubversion
changeset 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 | cb4dccc90ff1 |
children | 2922f4881a04 |
files | hgsubversion/layouts/standard.py hgsubversion/svnmeta.py hgsubversion/util.py |
diffstat | 3 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgsubversion/layouts/standard.py +++ b/hgsubversion/layouts/standard.py @@ -76,7 +76,7 @@ class StandardLayout(base.BaseLayout): self._tag_locations = self.ui.configlist('hgsubversion', 'tagpaths', ['tags']) - util.pickle_atomic(self._tag_locations, tag_locations_file) + util.dump(self._tag_locations, tag_locations_file) # ensure nested paths are handled properly self._tag_locations.sort()
--- a/hgsubversion/svnmeta.py +++ b/hgsubversion/svnmeta.py @@ -186,7 +186,7 @@ class SVNMeta(object): '''Save the Subversion metadata. This should really be called after every revision is created. ''' - util.pickle_atomic(self.branches, self.branch_info_file) + util.dump(self.branches, self.branch_info_file) def localname(self, path): """Compute the local name for a branch located at path.
--- a/hgsubversion/util.py +++ b/hgsubversion/util.py @@ -142,7 +142,7 @@ def save_string(file_path, string): f.write(str(string)) f.close() -def pickle_atomic(data, file_path): +def dump(data, file_path): """pickle some data to a path atomically. This is present because I kept corrupting my revmap by managing to hit ^C