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
f94f59b2
Kaydet (Commit)
f94f59b2
authored
May 08, 2018
tarafından
Suleyman Poyraz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
History renklendirildi.
üst
42b8c223
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
ChangeLog
ChangeLog
+3
-0
history.py
inary/cli/history.py
+14
-4
No files found.
ChangeLog
Dosyayı görüntüle @
f94f59b2
...
...
@@ -7,6 +7,9 @@
-> inary.util.colorize ile çok işimiz oluyordu o da kodda okunmazlığa ve kodun uzamasına
sebeb oluyordu. Tertemiz olsun diye info fonksiyonuna renk için bir parametre eklendi.
* History biraz renklendirildi.
-> Paket yöneticisi pavyona döndü. Renkli filan.
2018-05-06 Suleyman Poyraz <zaryob.dev@gmail.com>
* Küçük bir hack:
-> Immm. Artık home-build şansımız var yani geliştirici root yetkisi
...
...
inary/cli/history.py
Dosyayı görüntüle @
f94f59b2
...
...
@@ -23,6 +23,7 @@ _ = __trans.gettext
import
inary.atomicoperations
import
inary.db
import
inary.context
as
ctx
import
inary.util
as
util
import
inary.cli.command
as
command
# Operation names for translation
...
...
@@ -63,12 +64,21 @@ Lists previous operations.""")
def
print_history
(
self
):
for
operation
in
self
.
historydb
.
get_last
(
ctx
.
get_option
(
'last'
)):
print
(
_
(
"Operation #{0}: {1}"
)
.
format
(
operation
.
no
,
opttrans
[
operation
.
type
]))
print
(
_
(
"Date: {0.date} {0.time}"
)
.
format
(
operation
))
msg_oprt
=
util
.
colorize
(
_
(
"Operation "
),
'yellow'
)
\
+
util
.
colorize
(
"#{}: "
.
format
(
operation
.
no
),
"blue"
)
\
+
util
.
colorize
(
"{}:"
.
format
(
opttrans
[
operation
.
type
]),
"white"
)
date_and_time
=
util
.
colorize
(
_
(
"Date: "
),
"cyan"
)
+
"{0.date} {0.time}"
.
format
(
operation
)
print
(
msg_oprt
)
print
(
date_and_time
)
if
operation
.
type
==
"snapshot"
:
print
(
_
(
" * There are
%
d packages in this snapshot."
)
%
len
(
operation
.
packages
))
msg_snap
=
util
.
colorize
(
_
(
" * There are {} packages in this snapshot."
)
.
format
(
len
(
operation
.
packages
)),
"purple"
)
print
(
msg_snap
)
elif
operation
.
type
==
"repoupdate"
:
for
repo
in
operation
.
repos
:
print
(
" *"
,
repo
)
...
...
@@ -85,7 +95,7 @@ Lists previous operations.""")
class
LessPipe
():
def
__init__
(
self
):
import
subprocess
self
.
less
=
subprocess
.
Popen
([
"less"
,
"-K"
,
"-"
],
self
.
less
=
subprocess
.
Popen
([
"less"
,
"-K
-R
"
,
"-"
],
stdin
=
subprocess
.
PIPE
)
def
__del__
(
self
):
...
...
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