Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
0a8f0d9e
Commit
0a8f0d9e
authored
13 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Use log() only if write()/writeln() are not defined.
Add all the regular commands to .protocol.
parent
c78e72b6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
exec/load/cvslib.js
+48
-17
48 additions, 17 deletions
exec/load/cvslib.js
with
48 additions
and
17 deletions
exec/load/cvslib.js
+
48
−
17
View file @
0a8f0d9e
...
@@ -268,9 +268,10 @@ CVS = new (function () {
...
@@ -268,9 +268,10 @@ CVS = new (function () {
log
(
LOG_INFO
,
directory
+
(
entries
.
split
(
'
/
'
).
pop
())
+
"
removed from repository.
"
);
log
(
LOG_INFO
,
directory
+
(
entries
.
split
(
'
/
'
).
pop
())
+
"
removed from repository.
"
);
break
;
break
;
case
'
M
'
:
case
'
M
'
:
log
(
LOG_INFO
,
cmd
[
1
]);
if
(
js
.
global
.
writeln
)
if
(
js
.
global
.
writeln
)
writeln
(
cmd
[
1
]);
writeln
(
cmd
[
1
]);
else
log
(
LOG_INFO
,
cmd
[
1
]);
break
;
break
;
case
'
MT
'
:
case
'
MT
'
:
var
m
=
cmd
[
1
].
split_cmd
(
'
'
,
2
);
var
m
=
cmd
[
1
].
split_cmd
(
'
'
,
2
);
...
@@ -280,23 +281,26 @@ CVS = new (function () {
...
@@ -280,23 +281,26 @@ CVS = new (function () {
writeln
(
''
);
writeln
(
''
);
break
;
break
;
case
'
text
'
:
case
'
text
'
:
log
(
LOG_INFO
,
m
[
1
]);
if
(
js
.
global
.
write
)
if
(
js
.
global
.
write
)
write
(
m
[
1
]);
write
(
m
[
1
]);
else
log
(
LOG_INFO
,
m
[
1
]);
break
;
break
;
default
:
default
:
if
(
m
.
length
>
1
)
{
if
(
m
.
length
>
1
)
{
log
(
LOG_INFO
,
m
[
1
]);
if
(
js
.
global
.
write
)
if
(
js
.
global
.
write
)
write
(
m
[
1
]);
write
(
m
[
1
]);
else
log
(
LOG_INFO
,
m
[
1
]);
}
}
break
;
break
;
}
}
break
;
break
;
case
'
E
'
:
case
'
E
'
:
log
(
LOG_ERR
,
cmd
[
1
]);
if
(
js
.
global
.
alert
)
if
(
js
.
global
.
writeln
)
alert
(
cmd
[
1
]);
writeln
(
cmd
[
1
]);
else
log
(
LOG_ERR
,
cmd
[
1
]);
break
;
break
;
case
'
F
'
:
case
'
F
'
:
break
;
break
;
...
@@ -352,15 +356,44 @@ CVS = new (function () {
...
@@ -352,15 +356,44 @@ CVS = new (function () {
//TODO ---> http://www.cvsnt.org/cvsclient/Requests.html
//TODO ---> http://www.cvsnt.org/cvsclient/Requests.html
/* request a list of valid server requests */
rcmd
:
function
(
cmd
,
arg
)
{
'
valid-requests
'
:
function
()
{
this
.
parent
.
request
(
cmd
+
(
arg
?
"
"
+
arg
:
''
));
this
.
parent
.
request
(
'
valid-requests
'
);
var
response
=
this
.
parent
.
response
;
var
request
=
this
.
parent
.
response
;
if
(
response
!=
'
ok
'
)
{
if
(
request
!=
'
ok
'
)
{
log
(
LOG_ERR
,
"
Unhandled response: '
"
+
response
+
"
'
"
);
log
(
LOG_ERR
,
"
Unhandled response: '
"
+
request
+
"
'
"
);
}
}
},
},
'
valid-requests
'
:
function
()
{
this
.
rcmd
(
'
valid-requests
'
);
},
'
expand-modules
'
:
function
()
{
this
.
rcmd
(
'
expand-modules
'
);
},
ci
:
function
()
{
this
.
rcmd
(
'
ci
'
);
},
diff
:
function
()
{
this
.
rcmd
(
'
diff
'
);
},
tag
:
function
()
{
this
.
rcmd
(
'
tag
'
);
},
status
:
function
()
{
this
.
rcmd
(
'
status
'
);
},
admin
:
function
()
{
this
.
rcmd
(
'
admin
'
);
},
history
:
function
()
{
this
.
rcmd
(
'
history
'
);
},
watchers
:
function
()
{
this
.
rcmd
(
'
watchers
'
);
},
editors
:
function
()
{
this
.
rcmd
(
'
editors
'
);
},
annotate
:
function
()
{
this
.
rcmd
(
'
annotate
'
);
},
log
:
function
()
{
this
.
rcmd
(
'
log
'
);
},
co
:
function
()
{
this
.
rcmd
(
'
co
'
);
},
export
:
function
()
{
this
.
rcmd
(
'
export
'
);
},
rdiff
:
function
()
{
this
.
rcmd
(
'
rdiff
'
);
},
rtag
:
function
()
{
this
.
rcmd
(
'
rtag
'
);
},
init
:
function
(
root
)
{
this
.
rcmd
(
'
init
'
,
root
);
},
update
:
function
()
{
this
.
rcmd
(
'
update
'
);
},
import
:
function
()
{
this
.
rcmd
(
'
import
'
);
},
add
:
function
()
{
this
.
rcmd
(
'
add
'
);
},
remove
:
function
()
{
this
.
rcmd
(
'
remove
'
);
},
'
watch-on
'
:
function
()
{
this
.
rcmd
(
'
watch-on
'
);
},
'
watch-off
'
:
function
()
{
this
.
rcmd
(
'
watch-off
'
);
},
'
watch-add
'
:
function
()
{
this
.
rcmd
(
'
watch-add
'
);
},
'
watch-remove
'
:
function
()
{
this
.
rcmd
(
'
watch-remove
'
);
},
release
:
function
()
{
this
.
rcmd
(
'
release
'
);
},
noop
:
function
()
{
this
.
rcmd
(
'
noop
'
);
},
'
update-patches
'
:
function
()
{
this
.
rcmd
(
'
update-patches
'
);
},
'
wrapper-sendme-rcsOptions
'
:
function
()
{
this
.
rcmd
(
'
wrapper-sendme-rcsOptions
'
);
},
/* tell server what responses we can handle */
/* tell server what responses we can handle */
'
Valid-responses
'
:
function
()
{
'
Valid-responses
'
:
function
()
{
var
str
=
"
Valid-responses
"
;
var
str
=
"
Valid-responses
"
;
...
@@ -378,15 +411,12 @@ CVS = new (function () {
...
@@ -378,15 +411,12 @@ CVS = new (function () {
/* specify directory on server */
/* specify directory on server */
'
Directory
'
:
function
(
dir
,
repository
)
{
'
Directory
'
:
function
(
dir
,
repository
)
{
this
.
parent
.
request
(
"
Directory
"
+
local
-
directory
);
this
.
parent
.
request
(
"
Directory
"
+
dir
+
"
\n
"
+
repository
);
/*
repository \n
*/
},
},
/* tell server local file revision */
/* tell server local file revision */
'
Entry
'
:
function
(
str
)
{
'
Entry
'
:
function
(
str
)
{
this
.
parent
.
request
(
"
Entry
"
+
str
);
},
},
/* tell server that a file has not been modified since last update or checkout */
/* tell server that a file has not been modified since last update or checkout */
...
@@ -406,6 +436,7 @@ CVS = new (function () {
...
@@ -406,6 +436,7 @@ CVS = new (function () {
/* notify server that an edit/unedit command took place */
/* notify server that an edit/unedit command took place */
'
Notify
'
:
function
(
filename
)
{
'
Notify
'
:
function
(
filename
)
{
throw
(
"
Notify is not implemented!
"
);
this
.
parent
.
request
(
"
Notify
"
+
filename
);
this
.
parent
.
request
(
"
Notify
"
+
filename
);
/*
/*
notification-type \t time \t clienthost \t
notification-type \t time \t clienthost \t
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment