Commit ef40ad0e authored by Matthias Putz's avatar Matthias Putz

removed repo program update + sync is working for single project

parent 7bf91ad2
bin
*.pyc *.pyc
.repopickle_* .repopickle_*
This diff is collapsed.
...@@ -8,6 +8,8 @@ import os ...@@ -8,6 +8,8 @@ import os
import platform import platform
import subprocess import subprocess
SYNC_REPO_PROGRAM = False
def isLinux(): def isLinux():
if platform.system() == "Windows": if platform.system() == "Windows":
return False return False
......
...@@ -31,6 +31,7 @@ import xmlrpc ...@@ -31,6 +31,7 @@ import xmlrpc
import threading as _threading import threading as _threading
#except ImportError: #except ImportError:
# import dummy_threading as _threading # import dummy_threading as _threading
import portable
try: try:
import resource import resource
...@@ -578,13 +579,16 @@ later is required to fix a server side protocol bug. ...@@ -578,13 +579,16 @@ later is required to fix a server side protocol bug.
if not opt.local_only: if not opt.local_only:
to_fetch = [] to_fetch = []
now = time.time() now = time.time()
if _ONE_DAY_S <= (now - rp.LastFetch): if portable.SYNC_REPO_PROGRAM and _ONE_DAY_S <= (now - rp.LastFetch):
to_fetch.append(rp) to_fetch.append(rp)
to_fetch.extend(all_projects) to_fetch.extend(all_projects)
to_fetch.sort(key=self._fetch_times.Get, reverse=True) to_fetch.sort(key=self._fetch_times.Get, reverse=True)
fetched = self._Fetch(to_fetch, opt) fetched = self._Fetch(to_fetch, opt)
_PostRepoFetch(rp, opt.no_repo_verify)
if portable.SYNC_REPO_PROGRAM:
_PostRepoFetch(rp, opt.no_repo_verify)
if opt.network_only: if opt.network_only:
# bail out now; the rest touches the working tree # bail out now; the rest touches the working tree
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment