Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
I
inary
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
1
Konular (issue)
1
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
inary
Commits
c47e0b6e
Kaydet (Commit)
c47e0b6e
authored
Nis 11, 2006
tarafından
S.Çağlar Onur
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bahadırın ufak betiğine biraz ekleme yaptım, history çıkarma v.s ilerde...
üst
dd41f233
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
92 additions
and
0 deletions
+92
-0
repo-diff.py
tools/repo-diff.py
+92
-0
No files found.
tools/repo-diff.py
0 → 100755
Dosyayı görüntüle @
c47e0b6e
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2005, TUBITAK/UEKAE
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# Please read the COPYING file.
import
os
import
sys
from
pisi.specfile
import
SpecFile
from
pisi.util
import
join_path
def
findPspec
(
folder
):
pspecList
=
[]
for
root
,
dirs
,
files
in
os
.
walk
(
folder
):
if
"pspec.xml"
in
files
:
pspecList
.
append
(
root
)
# dont walk into the versioned stuff
if
".svn"
in
dirs
:
dirs
.
remove
(
".svn"
)
return
pspecList
def
getVersion
(
pspecList
):
sources
=
{}
for
pspec
in
pspecList
:
specFile
=
SpecFile
(
join_path
(
pspec
,
"pspec.xml"
))
sources
[
specFile
.
source
.
name
]
=
(
specFile
.
source
.
version
,
specFile
.
source
.
release
)
return
sources
def
listIntersection
(
firstRepo
,
secondRepo
):
keys
=
list
(
set
(
firstRepo
.
keys
())
.
__and__
(
set
(
secondRepo
.
keys
())))
keys
.
sort
()
for
i
in
keys
:
if
firstRepo
[
i
]
!=
secondRepo
[
i
]:
print
"
%
s:
%
s (r
%
s) ->
%
s (r
%
s)"
%
(
i
,
firstRepo
[
i
][
0
],
firstRepo
[
i
][
1
],
secondRepo
[
i
][
0
],
secondRepo
[
i
][
1
])
def
listComplement
(
firstRepo
,
secondRepo
):
keys
=
list
(
set
(
firstRepo
.
keys
())
-
set
(
secondRepo
.
keys
()))
keys
.
sort
()
for
i
in
keys
:
print
"
%
s"
%
i
def
usage
(
miniMe
):
print
"""Usage:
%
s pathToSvn component (ex:
%
s /home/caglar/svn/pardus/ system/devel)
"""
%
(
miniMe
,
miniMe
)
sys
.
exit
(
1
)
if
__name__
==
"__main__"
:
try
:
svnRoot
=
sys
.
argv
[
1
]
except
IndexError
:
usage
(
sys
.
argv
[
0
])
try
:
postfix
=
sys
.
argv
[
2
]
except
IndexError
:
postfix
=
"system/devel"
tag
=
getVersion
(
findPspec
(
join_path
(
svnRoot
,
"tags/pardus-1.0/"
,
postfix
)))
stable
=
getVersion
(
findPspec
(
join_path
(
svnRoot
,
"stable/pardus-1/"
,
postfix
)))
devel
=
getVersion
(
findPspec
(
join_path
(
svnRoot
,
"devel/"
,
postfix
)))
print
"Tag --> Stable"
listIntersection
(
tag
,
stable
)
print
print
"Tag has, Stable hasn't"
listComplement
(
tag
,
stable
)
print
print
"Stable has, Tag hasn't"
listComplement
(
stable
,
tag
)
print
print
"Stable --> Devel"
listIntersection
(
stable
,
devel
)
print
print
"Stable has, Devel hasn't"
listComplement
(
stable
,
devel
)
print
print
"Devel has, Stable hasn't"
listComplement
(
devel
,
stable
)
print
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment