def gitcommit(fname): f = "/tmp/%s" % fname p = Push(f) if p.reindex == True: rp = ses.query(Repo).all() for r in rp: repos[r.id] = RepoView(r, True, pisi20repo) d = p.db() bra = p.ref rep = p.data['repository']["full_name"].replace("https://github.com/", "") if check_branch_db(rep, bra) == True: tar = p.data['repository']['updated_at'] tar = tar.replace("Z", "").replace("T", " ") t = datetime.strptime(tar, "%Y-%m-%d %H:%M:%S") for _id, com in p.db2().items(): print "gitcommit, com.modified :", com['modified'] id = com['id'] url = com['url'] print com['timestamp'], len(com['modified']) for pkg in com['modified']: pkg = pkg.strip() pkgid = paketID(pkg) if pkgid == None: ppp = Paket(adi=pkg, aciklama="%s icin aciklama eklenmeli" % pkg) ses.add(ppp) ses.commit() pkgid = paketID(pkg) if commitCheck(pkgid, id) == 0: deplist = [] for repoid, repo in repos.items(): if pkg in repo.paketler.keys(): deplist = repo.depcheck(pkg) drm = 0 state = True for dep in deplist: state = state and dep if state == False: drm = 2 k = Kuyruk(tarih=t, paket_id=pkgid, commit_id=id, \ commit_url=url, durum=drm, repository=rep, \ branch=bra) ses.add(k) ses.commit() ses.flush() else: print pkg, " sorun var" return p.ref return p.ref
def gitcommit(fname): f = "/tmp/%s" % fname p = Push(f) if p.reindex == True: rp = ses.query(Repo).all() for r in rp: repos[r.id] = RepoView(r, True, pisi20repo) d = p.db() bra = p.ref rep = p.data['repository']["full_name"].replace("https://github.com/", "") if check_branch_db(rep, bra) == True: tar = p.data['repository']['updated_at'] tar = tar.replace("Z","").replace("T"," ") t = datetime.strptime(tar,"%Y-%m-%d %H:%M:%S") for _id, com in p.db2().items(): print "gitcommit, com.modified :",com['modified'] id = com['id'] url = com['url'] print com['timestamp'], len(com['modified']) for pkg in com['modified']: pkg = pkg.strip() pkgid = paketID(pkg) if pkgid == None: ppp = Paket(adi=pkg, aciklama="%s icin aciklama eklenmeli" % pkg) ses.add(ppp) ses.commit() pkgid = paketID(pkg) if commitCheck(pkgid, id) == 0: deplist = [] for repoid, repo in repos.items(): if pkg in repo.paketler.keys(): deplist = repo.depcheck(pkg) drm = 0 state = True for dep in deplist: state = state and dep if state == False: drm = 2 k = Kuyruk(tarih=t, paket_id=pkgid, commit_id=id, \ commit_url=url, durum=drm, repository=rep, \ branch=bra) ses.add(k) ses.commit() ses.flush() else: print pkg, " sorun var" return p.ref return p.ref
def gitcommit(fname): f = "/tmp/%s" % fname p = Push(f) d = p.db() bra = p.ref rep = p.data['repository']["full_name"].replace("https://github.com/", "") if check_branch_db(rep, bra) == True: tar = p.data['repository']['updated_at'] tar = tar.replace("Z","").replace("T"," ") t = datetime.strptime(tar,"%Y-%m-%d %H:%M:%S") for _id, com in p.db().items(): id = com['id'] url = com['url'] for pkg in com['modified']: pkgid = paketID(pkg) if commitCheck(pkgid, id) == 0: print id k = Kuyruk(tarih=t, paket_id=pkgid, commit_id=id, \ commit_url=url, durum=0, repository=rep, \ branch=bra) ses.add(k) ses.commit() return p.ref return p.ref