archival: pass integer to struct.pack int field instead of float
authorMads Kiilerich <madski@unity3d.com>
Thu, 03 Jan 2013 21:07:04 +0100
changeset 18301 49ad7030ecc4
parent 18300 745bc16ccef2
child 18302 16c642a6f07d
archival: pass integer to struct.pack int field instead of float If running in a context with warnings enabled and subsecond mtime it gave a warning: DeprecationWarning: integer argument expected, got float
mercurial/archival.py
--- a/mercurial/archival.py	Fri Jan 11 16:30:29 2013 +0100
+++ b/mercurial/archival.py	Thu Jan 03 21:07:04 2013 +0100
@@ -191,7 +191,7 @@
                                0x5455,     # block type: "extended-timestamp"
                                1 + 4,      # size of this block
                                1,          # "modification time is present"
-                               self.mtime) # time of last modification (UTC)
+                               int(self.mtime)) # last modification (UTC)
         self.z.writestr(i, data)
 
     def done(self):