root@kube2:/data/amk# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
root@kube2:/data/amk# svn2git http://192.168.1.2:13000/svn/bgpbo/ --authors /data/amk/authors.txt --username sync
Initialized empty Git repository in /data/amk/.git/
Authentication realm: <http://192.168.1.2:13000> SVN repository: BGPBO (prev)
Password for 'sync': No input requested.
No input requested.
### Ручное добавление пароля в ~/.subversion/auth/svn.simple/01868dff98ac872415817fc650c00e78
root@kube2:/data/amk# svn2git http://192.168.1.2:13000/svn/bgpbo/ --authors /data/amk/authors.txt --username sync
Initialized empty Git repository in /data/amk/.git/
### Примерно 10 сек задумчивости
command failed:
git checkout -f master
root@kube2:/data/amk# git branch
root@kube2:/data/amk# git branch -m master
error: refname refs/heads/master not found
fatal: Branch rename failed
root@kube2:/data/amk# git branch master
fatal: Not a valid object name: 'master'.
root@kube2:/data/amk# git branch new
fatal: Not a valid object name: 'master'.
gem install svn2git
amk:/data1/amk # cat /etc/os-release
NAME="openSUSE Tumbleweed"
# VERSION="20221001"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20221001"
amk:/data1/amk # gem install svn2git
Fetching svn2git-2.4.0.gem
Successfully installed svn2git-2.4.0
Ignoring nokogiri-1.13.8 because its extensions are not built. Try: gem pristine nokogiri --version 1.13.8
Parsing documentation for svn2git-2.4.0
Installing ri documentation for svn2git-2.4.0
Done installing documentation for svn2git after 0 seconds
1 gem installed
amk:/data1/amk # svn2git
If 'svn2git' is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf svn2git
amk:/data1/amk # find / -name svn2git
/usr/lib64/ruby/gems/3.1.0/gems/svn2git-2.4.0/lib/svn2git
/usr/lib64/ruby/gems/3.1.0/gems/svn2git-2.4.0/bin/svn2git
amk:/data1/amk # /usr/lib64/ruby/gems/3.1.0/gems/svn2git-2.4.0/bin/svn2git http://192.168.1.2:13000/svn/bgpbo/ --authors /data/amk/authors.txt --username sync
Ignoring nokogiri-1.13.8 because its extensions are not built. Try: gem pristine nokogiri --version 1.13.8
Ignoring ruby-augeas-0.5.0 because its extensions are not built. Try: gem pristine ruby-augeas --version 0.5.0
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
Initialized empty Git repository in /data1/amk/.git/
Authentication realm: <http://192.168.1.2:13000> SVN repository: BGPBO (prev)
Password for 'sync': #<Thread:0x00007fb3a89e7010 /usr/lib64/ruby/gems/3.1.0/gems/svn2git-2.4.0/lib/svn2git/migration.rb:431 run> terminated with exception (report_on_exception is true):
/usr/lib64/ruby/gems/3.1.0/gems/svn2git-2.4.0/lib/svn2git/migration.rb:438:in `block (3 levels) in run_command': undefined local variable or method `stdin'
### Ручное добавление пароля в ~/.subversion/auth/svn.simple/01868dff98ac872415817fc650c00e78
amk:/data1/amk # /usr/lib64/ruby/gems/3.1.0/gems/svn2git-2.4.0/bin/svn2git http://192.168.1.2:13000/svn/bgpbo/ --authors /data1/amk/authors.txt --username sync
Ignoring nokogiri-1.13.8 because its extensions are not built. Try: gem pristine nokogiri --version 1.13.8
Ignoring ruby-augeas-0.5.0 because its extensions are not built. Try: gem pristine ruby-augeas --version 0.5.0
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
Initialized empty Git repository in /data1/amk/.git/
### Примерно 10 сек задумчивости
command failed:
git checkout -f master
amk:/data1/amk # git branch -m master
amk:/data1/amk # git branch master
fatal: not a valid object name: 'master'
amk:/data1/amk # git branch new
fatal: not a valid object name: 'master'
root@kube2:/data/amk# svn2git http://192.168.1.2:13000/svn/amk/ --authors /data/amk/authors.txt
Initialized empty Git repository in /data/amk/.git/
command failed:
git checkout -f master
root@kube2:/data/amk# git checkout master
error: pathspec 'master' did not match any file(s) known to git
root@kube2:/data/amk# git branch
root@kube2:/data/amk#
Действительно, все красиво. Диск 16Г, занимает 4.1Г
Тут возник второй вопрос.
Эта машина - "шаблон", сделанный из-за отсутствия функции клонирования на данной редакции esxi.
Для простого копирования в новую при необходимости и переименования vmkfstools -E.
Только вот именно при копировании ср "разреженный" диск уже копируется как полноценный файл.
Соответственно, пришлось прочитать документацию и поменять алгоритм на более логичный.
https://kb.vmware.com/s/article/1029513
Сначала клонировать vmkfstools -i ... -d thin, а уже потом копировать склонированные .vmdk и -flat.vmdk