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
2f555cdd
Kaydet (Commit)
2f555cdd
authored
May 11, 2020
tarafından
Your Name
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge branch 'develop' of
https://gitlab.com/sulinos/devel/inary
into develop
üst
466397cc
0fdce424
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
history.py
inary/cli/history.py
+7
-5
history.py
inary/data/history.py
+3
-3
No files found.
inary/cli/history.py
Dosyayı görüntüle @
2f555cdd
...
...
@@ -29,7 +29,8 @@ import inary.cli.command as command
# Operation names for translation
opttrans
=
{
"upgrade"
:
_
(
"upgrade"
),
"remove"
:
_
(
"remove"
),
"emerge"
:
_
(
"emerge"
),
"install"
:
_
(
"install"
),
"snapshot"
:
_
(
"snapshot"
),
"takeback"
:
_
(
"takeback"
),
"repoupdate"
:
_
(
"repository update"
)}
"snapshot"
:
_
(
"snapshot"
),
"takeback"
:
_
(
"takeback"
),
"repoupdate"
:
_
(
"repository update"
),
"reset"
:
_
(
"reset history"
)}
class
History
(
command
.
PackageOp
,
metaclass
=
command
.
autocommand
):
...
...
@@ -140,12 +141,13 @@ Lists previous operations.""")
self
.
takeback
(
opno
)
return
elif
ctx
.
get_option
(
'reset'
):
ctx
.
ui
.
info
(
_
(
"Resetting history casts"
),
verbose
=
True
)
util
.
clean_dir
(
ctx
.
config
.
history_dir
())
util
.
makedirs
(
ctx
.
config
.
history_dir
())
# FIXME: we must add reset info in h
istory
#import inary.data.history as History
#history = History.History(
)
#history.add("reset"
)
import
inary.data.history
as
H
istory
history
=
History
.
History
()
history
.
create
(
"reset"
)
history
.
update
(
)
return
else
:
self
.
redirect_output
(
self
.
print_history
())
inary/data/history.py
Dosyayı görüntüle @
2f555cdd
...
...
@@ -100,7 +100,7 @@ class History(xmlfile.XmlFile, metaclass=autoxml.autoxml):
def
create
(
self
,
operation
):
if
operation
not
in
[
"downgrade"
,
"upgrade"
,
"remove"
,
"emerge"
,
"install"
,
"snapshot"
,
"takeback"
,
"repoupdate"
]:
"repoupdate"
,
"reset"
]:
raise
Exception
(
_
(
"Unknown package operation"
))
opno
=
self
.
_get_latest
()
...
...
@@ -122,7 +122,7 @@ class History(xmlfile.XmlFile, metaclass=autoxml.autoxml):
# @param otype is currently only used to hold if an upgrade is from "delta"
def
add
(
self
,
pkgBefore
=
None
,
pkgAfter
=
None
,
operation
=
None
,
otype
=
None
):
if
operation
not
in
[
"upgrade"
,
"remove"
,
"install"
,
"reinstall"
,
"downgrade"
,
"snapshot"
,
"reset"
]:
if
operation
not
in
[
"upgrade"
,
"remove"
,
"install"
,
"reinstall"
,
"downgrade"
,
"snapshot"
]:
raise
Exception
(
_
(
"Unknown package operation"
))
package
=
Package
()
...
...
@@ -151,7 +151,7 @@ class History(xmlfile.XmlFile, metaclass=autoxml.autoxml):
files
=
[
h
for
h
in
os
.
listdir
(
ctx
.
config
.
history_dir
())
if
h
.
endswith
(
".xml"
)]
if
not
files
:
return
"0
o
01"
return
"001"
# files.sort(key=lambda x,y:int(x.split("_")[0]) - int(y.split("_")[0]))
files
.
sort
(
key
=
lambda
x
:
int
(
x
.
split
(
"_"
)[
0
]
.
replace
(
"0o"
,
"0"
)))
...
...
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