📜 ⬆️ ⬇️

GitHub improves svn support

About a year and a half ago, we announced support for svn , which allowed limited use of GitHub repositories through subversion clients.

Today we are launching new improved svn support.

What's new?



')

URL


You no longer need to use svn.github.com, now you can use the same url in the svn client as in git. Repositories are still available on svn.github.com , but you should migrate them, because svn.github.com will be off soon.

$ git clone github.com/nickh/dynashard git-ds
Cloning into git-ds ...
remote: Counting objects: 135, done.
remote: Compressing objects: 100% (71/71), done.
remote: Total 135 (delta 65), reused 128 (delta 58)
Receiving objects: 100% (135/135), 31.19 KiB, done.
Resolving deltas: 100% (65/65), done.

$ svn checkout github.com/nickh/dynashard svn-ds
A svn-ds / branches
A svn-ds / branches / shard_names
A svn-ds / branches / shard_names / .document
A svn-ds / branches / shard_names / .gitignore
...
A svn-ds / trunk / spec / support
A svn-ds / trunk / spec / support / factories.rb
A svn-ds / trunk / spec / support / models.rb
Checked out revision 25.


Brunches


Repositories are mapped so that they look in svn "standard". For example, your master branch will become trunk, and the remaining branches will be deposited in branches /

$ git ls-remote --heads origin
7523fabdfea89c38b10afde0ec2f07095de8c9a2 refs / heads / master
2ed6303f260abe2bd76d231fe173aeef833b1c9e refs / heads / shard_names

$ svn ls
branches /
trunk /

$ svn ls trunk
.document
.gitignore
...
dynashard.gemspec
lib /
spec /

$ svn ls branches
shard_names /


Partial checkout


Checkout and up only those parts of the repository that you need.

$ svn co -N github.com/nickh/dynashard svn-ds
Checked out revision 25.

$ svn up -N branches
A branches
Updated to revision 25.

$ svn up trunk
A trunk
A trunk / .document
A trunk / .gitignore
...
A trunk / spec / support
A trunk / spec / support / factories.rb
A trunk / spec / support / models.rb
Updated to revision 25.


Commits


Edit files, create brunches and upload your changes.

$ svn cp trunk branches / wip
$ svn commit -m 'Created a topic branch'
Adding branches / wip
Committed revision 26.

$ git ls-remote --heads origin
7523fabdfea89c38b10afde0ec2f07095de8c9a2 refs / heads / master
2ed6303f260abe2bd76d231fe173aeef833b1c9e refs / heads / shard_names
7523fabdfea89c38b10afde0ec2f07095de8c9a2 refs / heads / wip

$ echo '# Important change' >> branches / wip / README.md
$ svn commit -m 'Made an important change'
Sending branches / wip / README.md
Transmitting file data.
Committed revision 27.


Plans:


We will continue to improve integration with subversion to make it easier for mixed teams to work together. Expect the following changes:

Source: https://habr.com/ru/post/130883/


All Articles