Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
cb406128
Commit
cb406128
authored
Jul 18, 1995
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change obsolete isfile to isvalid; add lock and unlock commands
parent
bad014f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
Demo/pdist/rrcs.py
Demo/pdist/rrcs.py
+10
-2
No files found.
Demo/pdist/rrcs.py
View file @
cb406128
...
@@ -48,7 +48,7 @@ def checkin(x, copts, fn):
...
@@ -48,7 +48,7 @@ def checkin(x, copts, fn):
f
=
open
(
fn
)
f
=
open
(
fn
)
data
=
f
.
read
()
data
=
f
.
read
()
f
.
close
()
f
.
close
()
new
=
not
x
.
is
file
(
fn
)
new
=
not
x
.
is
valid
(
fn
)
if
not
new
and
same
(
x
,
copts
,
fn
,
data
):
if
not
new
and
same
(
x
,
copts
,
fn
,
data
):
print
"%s: unchanged since last checkin"
%
fn
print
"%s: unchanged since last checkin"
%
fn
return
return
...
@@ -64,6 +64,12 @@ def checkout(x, copts, fn):
...
@@ -64,6 +64,12 @@ def checkout(x, copts, fn):
f
.
write
(
data
)
f
.
write
(
data
)
f
.
close
()
f
.
close
()
def
lock
(
x
,
copts
,
fn
):
x
.
lock
(
fn
)
def
unlock
(
x
,
copts
,
fn
):
x
.
unlock
(
fn
)
def
info
(
x
,
copts
,
fn
):
def
info
(
x
,
copts
,
fn
):
dict
=
x
.
info
(
fn
)
dict
=
x
.
info
(
fn
)
keys
=
dict
.
keys
()
keys
=
dict
.
keys
()
...
@@ -77,7 +83,7 @@ def head(x, copts, fn):
...
@@ -77,7 +83,7 @@ def head(x, copts, fn):
print
fn
,
head
print
fn
,
head
def
list
(
x
,
copts
,
fn
):
def
list
(
x
,
copts
,
fn
):
if
x
.
is
file
(
fn
):
if
x
.
is
valid
(
fn
):
print
fn
print
fn
def
log
(
x
,
copts
,
fn
):
def
log
(
x
,
copts
,
fn
):
...
@@ -148,6 +154,8 @@ commands = {
...
@@ -148,6 +154,8 @@ commands = {
'info'
:
(
''
,
info
),
'info'
:
(
''
,
info
),
'head'
:
(
''
,
head
),
'head'
:
(
''
,
head
),
'list'
:
(
''
,
list
),
'list'
:
(
''
,
list
),
'lock'
:
(
''
,
lock
),
'unlock'
:
(
''
,
unlock
),
'log'
:
(
'bhLRtd:l:r:s:w:V:'
,
log
),
'log'
:
(
'bhLRtd:l:r:s:w:V:'
,
log
),
'diff'
:
(
'c'
,
diff
),
'diff'
:
(
'c'
,
diff
),
}
}
...
...
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