Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
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)
0
Konular (issue)
0
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ç
Batuhan Osman TASKAYA
cpython
Commits
d98c6773
Kaydet (Commit)
d98c6773
authored
Nis 23, 2015
tarafından
Christian Heimes
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #24031: make patchcheck now supports git checkouts, too.
üst
71f73ca7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
9 deletions
+29
-9
NEWS
Misc/NEWS
+4
-0
patchcheck.py
Tools/scripts/patchcheck.py
+25
-9
No files found.
Misc/NEWS
Dosyayı görüntüle @
d98c6773
...
...
@@ -225,6 +225,10 @@ Documentation
- Issue #24029: Document the name binding behavior for submodule imports.
Tools/Demos
-----------
- Issue #24031: make patchcheck now supports git checkouts, too.
What's New in Python 3.4.3?
===========================
...
...
Tools/scripts/patchcheck.py
Dosyayı görüntüle @
d98c6773
...
...
@@ -49,15 +49,31 @@ def mq_patches_applied():
@status
(
"Getting the list of files that have been added/changed"
,
info
=
lambda
x
:
n_files_str
(
len
(
x
)))
def
changed_files
():
"""Get the list of changed or added files from Mercurial."""
if
not
os
.
path
.
isdir
(
os
.
path
.
join
(
SRCDIR
,
'.hg'
)):
sys
.
exit
(
'need a checkout to get modified files'
)
cmd
=
'hg status --added --modified --no-status'
if
mq_patches_applied
():
cmd
+=
' --rev qparent'
with
subprocess
.
Popen
(
cmd
.
split
(),
stdout
=
subprocess
.
PIPE
)
as
st
:
return
[
x
.
decode
()
.
rstrip
()
for
x
in
st
.
stdout
]
"""Get the list of changed or added files from Mercurial or git."""
if
os
.
path
.
isdir
(
os
.
path
.
join
(
SRCDIR
,
'.hg'
)):
cmd
=
'hg status --added --modified --no-status'
if
mq_patches_applied
():
cmd
+=
' --rev qparent'
with
subprocess
.
Popen
(
cmd
.
split
(),
stdout
=
subprocess
.
PIPE
)
as
st
:
return
[
x
.
decode
()
.
rstrip
()
for
x
in
st
.
stdout
]
elif
os
.
path
.
isdir
(
os
.
path
.
join
(
SRCDIR
,
'.git'
)):
cmd
=
'git status --porcelain'
filenames
=
[]
with
subprocess
.
Popen
(
cmd
.
split
(),
stdout
=
subprocess
.
PIPE
)
as
st
:
for
line
in
st
.
stdout
:
line
=
line
.
decode
()
.
rstrip
()
status
=
set
(
line
[:
2
])
# modified, added or unmerged files
if
not
status
.
intersection
(
'MAU'
):
continue
filename
=
line
[
3
:]
if
' -> '
in
filename
:
# file is renamed
filename
=
filename
.
split
(
' -> '
,
2
)[
1
]
.
strip
()
filenames
.
append
(
filename
)
return
filenames
else
:
sys
.
exit
(
'need a Mercurial or git checkout to get modified files'
)
def
report_modified_files
(
file_paths
):
...
...
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