Changeset ad38ef205d7b…
Parent 514f6627b6f8…
by
Changes to 2 files · Browse files at ad38ef205d7b Showing diff from parent 514f6627b6f8 Diff from another changeset...
@@ -7,6 +7,8 @@ * Don't fetch ^{} objects from remote hosts, as requesting them
causes a hangup.
+ * Always write pack to disk completely before calculating checksum.
+
FEATURES
* Allow disabling thin packs when talking to remote hosts.
|
@@ -96,7 +96,7 @@ for pack in self.packs:
if sha in pack:
return pack.get_raw(sha, self.get_raw)
- # FIXME: Are pack deltas ever against on-disk shafiles ?
+ # FIXME: Are thin pack deltas ever against on-disk shafiles ?
ret = self._get_shafile(sha)
if ret is not None:
return ret.as_raw_string()
@@ -152,6 +152,8 @@ fd, path = tempfile.mkstemp(dir=self.pack_dir(), suffix=".pack")
f = os.fdopen(fd, 'w')
def commit():
+ os.fdatasync(fd)
+ f.close()
if os.path.getsize(path) > 0:
self.move_in_thin_pack(path)
return f, commit
@@ -165,6 +167,8 @@ fd, path = tempfile.mkstemp(dir=self.pack_dir(), suffix=".pack")
f = os.fdopen(fd, 'w')
def commit():
+ os.fdatasync(fd)
+ f.close()
if os.path.getsize(path) > 0:
self.move_in_pack(path)
return f, commit
|
Loading...