代码例子已托管到svnserve
20190928添加:
cpptest - Revision 1: / https://svnserve.com/cpptest/
apt install subversion
[email protected]:/home/hxh/cpptest# svn --version
svn, version 1.9.7 (r1800392)
compiled Mar 28 2018, 08:49:13 on x86_64-pc-linux-gnu
svn checkout https://svnserve.com/cpptest --username Ivanhan2019
mv cpp/* cpptest
cd cpptest
svn add *
svn commit -m "cpptest"
CentOS 7下安装Mono
rpm --import "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
su -c ‘curl https://download.mono-project.com/repo/centos7-stable.repo | tee /etc/yum.repos.d/mono-centos7-stable.repo‘
yum install mono-devel
[[email protected] ~]# mono --version
Mono JIT compiler version 6.4.0.198 (tarball Mon Sep 23 20:53:41 UTC 2019)
[[email protected] ~]# yum install subversion
[[email protected] ~]# svn --version
svn, version 1.7.14 (r1542130)
compiled Apr 11 2018, 02:40:28
[[email protected] cstest]# ls
Hello.cs
[[email protected] cstest]# mcs Hello.cs
[[email protected] cstest]# ls
Hello.cs Hello.exe
[[email protected] cstest]# mono Hello.exe
3
5
[[email protected] cstest]# vi Hello2.cs
[[email protected] cstest]# ls
Hello2.cs Hello.cs Hello.exe
[[email protected] cstest]# mcs Hello2.cs
[[email protected] cstest]# ls
Hello2.cs Hello2.exe Hello.cs Hello.exe
[[email protected] cstest]# mono Hello2.exe
1 man
[[email protected] cstest]# svn diff Hello.cs
Index: Hello.cs
===================================================================
--- Hello.cs(revision 2)
+++ Hello.cs(working copy)
@@ -1,5 +1,5 @@
using System;
-//第一个C#程序“Hello World!”
+// 第一个C#程序
namespace HelloWorld
{
class Hello
@@ -16,4 +16,4 @@
Console.WriteLine(shapes[3].Length);//5
}
}
-}
\ No newline at end of file
+}
[[email protected] cstest]# svn commit -m "modify *.cs by unix2dos" Hello.cs
Sending Hello.cs
Transmitting file data .
Committed revision 3.
[[email protected] cstest]# svn status
? Hello2.cs
? Hello2.exe
[[email protected] cstest]# svn add *
A Hello2.cs
A (bin) Hello2.exe
[[email protected] cstest]# svn ci -m ""
Adding Hello2.cs
Adding (bin) Hello2.exe
Transmitting file data ..
Committed revision 4.
[email protected]_cn:/home/yiyou/gopath/cpptest/gotest# go version
go version go1.12.1 linux/amd64
[email protected]_cn:/home/yiyou/gopath/cpptest/gotest# svn --version
svn, version 1.9.7 (r1800392)
compiled Mar 28 2018, 08:49:13 on x86_64-pc-linux-gnu
[email protected]_cn:/home/yiyou/gopath# cd /home/yiyou/gopath/cpptest/gotest/jiekou1
[email protected]_cn:/home/yiyou/gopath/cpptest/gotest/jiekou1# ls
jiekou1.exe jiekou1.go
[email protected]_cn:/home/yiyou/gopath/cpptest/gotest/jiekou1# go build
[email protected]_cn:/home/yiyou/gopath/cpptest/gotest/jiekou1# ls
jiekou1 jiekou1.exe jiekou1.go
[email protected]_cn:/home/yiyou/gopath/cpptest/gotest/jiekou1# ./jiekou1
Hello!
你好!
[email protected]_cn:/home/yiyou/gopath/cpptest/gotest/jiekou1# cd ..
[email protected]_cn:/home/yiyou/gopath/cpptest/gotest# svn status
? jiekou1
[email protected]_cn:/home/yiyou/gopath/cpptest/gotest# svn add jiekou1
A jiekou1
A (bin) jiekou1/jiekou1
A (bin) jiekou1/jiekou1.exe
A jiekou1/jiekou1.go
[email protected]_cn:/home/yiyou/gopath/cpptest/gotest# svn ci -m "golang test"
Adding jiekou1
Adding (bin) jiekou1/jiekou1
Adding (bin) jiekou1/jiekou1.exe
Adding jiekou1/jiekou1.go
Transmitting file data ...done
Committing transaction...
Committed revision 6.
r[email protected]_cn:/home/yiyou/gopath/cpptest/javatest# apt install openjdk-11-jre-headless
[email protected]_cn:/home/yiyou/gopath/cpptest/javatest# java --version
openjdk 11.0.4 2019-07-16
OpenJDK Runtime Environment (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3)
OpenJDK 64-Bit Server VM (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3, mixed mode, sharing)
[email protected]_cn:/home/yiyou/gopath/cpptest/javatest#apt install openjdk-11-jre-headless
[email protected]_cn:/home/yiyou/gopath/cpptest/javatest# file Int2Str.java
Int2Str.java: C source, ISO-8859 text, with CRLF line terminators
[email protected]_cn:/home/yiyou/gopath/cpptest/javatest# cp Int2Str.java Int2Str.temp;iconv -f gbk -t utf-8 Int2Str.temp -o Int2Str.java
[email protected]_cn:/home/yiyou/gopath/cpptest/javatest# ls
Int2Str.java Int2Str.temp IP2Long.java
[email protected]_cn:/home/yiyou/gopath/cpptest/javatest# file Int2Str.java
Int2Str.java: C source, UTF-8 Unicode text, with CRLF line terminators
[email protected]_cn:/home/yiyou/gopath/cpptest/javatest# javac Int2Str.java
[email protected]_cn:/home/yiyou/gopath/cpptest/javatest# ls
Int2Str.class Int2Str.java Int2Str.temp IP2Long.java
[email protected]_cn:/home/yiyou/gopath/cpptest/javatest# java Int2Str
黄宝石 的整数形式为:5
整数2转化成字符串:战士
[email protected]_cn:/home/yiyou/gopath/cpptest/javatest# svn add Int2Str*
A (bin) Int2Str.class
A Int2Str.java
A Int2Str.temp
[email protected]_cn:/home/yiyou/gopath/cpptest/javatest# svn ci -m "java test"
Adding (bin) Int2Str.class
Adding Int2Str.java
Adding Int2Str.temp
Transmitting file data ...done
Committing transaction...
Committed revision 7.
原文地址:https://www.cnblogs.com/Ivanhan2019/p/11602480.html