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
4d4ee8bd
Kaydet (Commit)
4d4ee8bd
authored
Nis 27, 1995
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
major update
üst
097c55ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
28 deletions
+8
-28
rrcs.py
Demo/pdist/rrcs.py
+8
-28
No files found.
Demo/pdist/rrcs.py
Dosyayı görüntüle @
4d4ee8bd
#! /usr/local/bin/python
#! /usr/local/bin/python
"Remote RCS -- command line interface"
import
sys
import
sys
import
os
import
os
import
getopt
import
getopt
import
string
import
string
import
md5
import
md5
import
tempfile
import
tempfile
from
rcsclient
import
openrcsclient
def
main
():
def
main
():
sys
.
stdout
=
sys
.
stderr
sys
.
stdout
=
sys
.
stderr
try
:
try
:
opts
,
rest
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
'h:p:qv'
)
opts
,
rest
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
'h:p:
d:
qv'
)
if
not
rest
:
if
not
rest
:
raise
getopt
.
error
,
"missing command"
cmd
=
'head'
cmd
,
rest
=
rest
[
0
],
rest
[
1
:]
else
:
cmd
,
rest
=
rest
[
0
],
rest
[
1
:]
if
not
commands
.
has_key
(
cmd
):
if
not
commands
.
has_key
(
cmd
):
raise
getopt
.
error
,
"unknown command"
raise
getopt
.
error
,
"unknown command"
coptset
,
func
=
commands
[
cmd
]
coptset
,
func
=
commands
[
cmd
]
...
@@ -31,7 +35,7 @@ def main():
...
@@ -31,7 +35,7 @@ def main():
print
" diff # diff rcs file and work file"
print
" diff # diff rcs file and work file"
print
"if no files are given, all remote rcs files are assumed"
print
"if no files are given, all remote rcs files are assumed"
sys
.
exit
(
2
)
sys
.
exit
(
2
)
x
=
openclient
(
opts
)
x
=
open
rcs
client
(
opts
)
if
not
files
:
if
not
files
:
files
=
x
.
listfiles
()
files
=
x
.
listfiles
()
for
fn
in
files
:
for
fn
in
files
:
...
@@ -40,30 +44,6 @@ def main():
...
@@ -40,30 +44,6 @@ def main():
except
(
IOError
,
os
.
error
),
msg
:
except
(
IOError
,
os
.
error
),
msg
:
print
"
%
s:
%
s"
%
(
fn
,
msg
)
print
"
%
s:
%
s"
%
(
fn
,
msg
)
def
openclient
(
opts
):
import
client
import
RCSProxy
host
=
'spam'
port
=
4127
verbose
=
client
.
VERBOSE
for
o
,
a
in
opts
:
if
o
==
'-h'
:
host
=
a
if
':'
in
host
:
i
=
string
.
find
(
host
,
':'
)
host
,
p
=
host
[:
i
],
host
[
i
+
1
:]
if
p
:
port
=
string
.
atoi
(
p
)
if
o
==
'-p'
:
port
=
string
.
atoi
(
a
)
if
o
==
'-v'
:
verbose
=
verbose
+
1
if
o
==
'-q'
:
verbose
=
0
address
=
(
host
,
port
)
x
=
RCSProxy
.
RCSProxyClient
(
address
,
verbose
)
return
x
def
checkin
(
x
,
copts
,
fn
):
def
checkin
(
x
,
copts
,
fn
):
f
=
open
(
fn
)
f
=
open
(
fn
)
data
=
f
.
read
()
data
=
f
.
read
()
...
...
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