コード例 #1
0
ファイル: dirstate.py プロジェクト: html-shell/mozilla-build
 def _writedirstate(self, st):
     # use the modification time of the newly created temporary file as the
     # filesystem's notion of 'now'
     now = util.statmtimesec(util.fstat(st)) & _rangemask
     st.write(parsers.pack_dirstate(self._map, self._copymap, self._pl, now))
     st.close()
     self._lastnormaltime = 0
     self._dirty = self._dirtypl = False
コード例 #2
0
ファイル: dirstate.py プロジェクト: CSCI-362-02-2015/RedTeam
 def _writedirstate(self, st):
     # use the modification time of the newly created temporary file as the
     # filesystem's notion of 'now'
     now = util.statmtimesec(util.fstat(st)) & _rangemask
     st.write(parsers.pack_dirstate(self._map, self._copymap, self._pl,
                                    now))
     st.close()
     self._lastnormaltime = 0
     self._dirty = self._dirtypl = False
コード例 #3
0
ファイル: dirstate.py プロジェクト: leetaizhu/Odoo_ENV_MAC_OS
 def write(self):
     if not self._dirty:
         return
     st = self._opener("dirstate", "w", atomictemp=True)
     # use the modification time of the newly created temporary file as the
     # filesystem's notion of 'now'
     now = util.fstat(st).st_mtime
     st.write(parsers.pack_dirstate(self._map, self._copymap, self._pl, now))
     st.close()
     self._lastnormaltime = 0
     self._dirty = self._dirtypl = False
コード例 #4
0
    def write(self):
        if not self._dirty:
            return
        st = self._opener("dirstate", "w", atomictemp=True)

        def finish(s):
            st.write(s)
            st.close()
            self._lastnormaltime = 0
            self._dirty = self._dirtypl = False

        # use the modification time of the newly created temporary file as the
        # filesystem's notion of 'now'
        now = util.fstat(st).st_mtime
        finish(parsers.pack_dirstate(self._map, self._copymap, self._pl, now))
コード例 #5
0
ファイル: dirstate.py プロジェクト: CS76/ipo-galaxy
    def write(self):
        if not self._dirty:
            return

        # enough 'delaywrite' prevents 'pack_dirstate' from dropping
        # timestamp of each entries in dirstate, because of 'now > mtime'
        delaywrite = self._ui.configint('debug', 'dirstate.delaywrite', 0)
        if delaywrite:
            import time # to avoid useless import
            time.sleep(delaywrite)

        st = self._opener("dirstate", "w", atomictemp=True)
        # use the modification time of the newly created temporary file as the
        # filesystem's notion of 'now'
        now = util.fstat(st).st_mtime
        st.write(parsers.pack_dirstate(self._map, self._copymap, self._pl, now))
        st.close()
        self._lastnormaltime = 0
        self._dirty = self._dirtypl = False
コード例 #6
0
ファイル: dirstate.py プロジェクト: CSCI-362-02-2015/RedTeam
    def write(self):
        if not self._dirty:
            return

        # enough 'delaywrite' prevents 'pack_dirstate' from dropping
        # timestamp of each entries in dirstate, because of 'now > mtime'
        delaywrite = self._ui.configint('debug', 'dirstate.delaywrite', 0)
        if delaywrite > 0:
            import time # to avoid useless import
            time.sleep(delaywrite)

        st = self._opener(self._filename, "w", atomictemp=True)
        # use the modification time of the newly created temporary file as the
        # filesystem's notion of 'now'
        now = util.fstat(st).st_mtime
        st.write(parsers.pack_dirstate(self._map, self._copymap, self._pl, now))
        st.close()
        self._lastnormaltime = 0
        self._dirty = self._dirtypl = False