Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert repo from subversion to git #1

Open
dlangille opened this issue Dec 31, 2024 · 5 comments
Open

Convert repo from subversion to git #1

dlangille opened this issue Dec 31, 2024 · 5 comments

Comments

@dlangille
Copy link
Contributor

dlangille commented Dec 31, 2024

The packaging repo (https://svn.freshports.org/viewvc.cgi/freshports-1/packaging/, see also https://github.com/FreshPorts/freshports-1/tree/main/packaging/trunk), contains two main types of items:

  • scripts for creating tagging releases and creating tarballs (no longer needed for GitHub)
  • +MANIFEST files for registering fake packages when working on FreshPorts code

I'm following FreshPorts/docs#1

@dlangille
Copy link
Contributor Author

dlangille commented Dec 31, 2024

[23:46 mydev dvl ~/src/subversion-to-git] % mkdir packaging-svn 
[23:46 mydev dvl ~/src/subversion-to-git] % svn co svn://127.0.0.16/freshports-1/packaging/trunk packaging-svn
A    packaging-svn/README.TXT
A    packaging-svn/+MANIFEST-p5-freshports-modules
A    packaging-svn/+MANIFEST-p5-freshports-scripts
A    packaging-svn/cut-freshsource
A    packaging-svn/cut-fp-listen.sh
A    packaging-svn/+MANIFEST-py39-freshports-git-proc-commit
A    packaging-svn/cut-freshports-modules
A    packaging-svn/cut-freshports-scripts
A    packaging-svn/+MANIFEST-py38-freshports-git-proc-commit
A    packaging-svn/cut-freebsddiary
A    packaging-svn/cut-freshports-database
A    packaging-svn/cut-freshports-freshports
A    packaging-svn/cut-freshports-ingress
A    packaging-svn/cut-freshports-verify
A    packaging-svn/cut-phorum
A    packaging-svn/cut-freshports-periodics
A    packaging-svn/+MANIFEST-py37-freshports-git-proc-commit
A    packaging-svn/+MANIFEST-freshports-helper_scripts
A    packaging-svn/+MANIFEST-freshports-www
A    packaging-svn/+MANIFEST-freshsource-www
Checked out revision 6140.
[23:46 mydev dvl ~/src/subversion-to-git] % 

@dlangille
Copy link
Contributor Author

[23:47 mydev dvl ~/src/subversion-to-git/packaging-svn] % svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors-transform.txt
[23:47 mydev dvl ~/src/subversion-to-git/packaging-svn] % cat authors-transform.txt
dan = dan <dan>
[23:48 mydev dvl ~/src/subversion-to-git/packaging-svn] % cd ..                       
[23:48 mydev dvl ~/src/subversion-to-git] % mkdir packaging-git
[23:48 mydev dvl ~/src/subversion-to-git] % cp packaging-svn/authors-transform.txt packaging-git/author-transformed.txt
[23:48 mydev dvl ~/src/subversion-to-git] % joe packaging-git/author-transformed.txt

@dlangille
Copy link
Contributor Author

[23:54 mydev dvl ~/src/subversion-to-git/packaging-git] % cat author-transformed.txt
dan = Dan Langille <[email protected]>

[23:53 mydev dvl ~/src/subversion-to-git/packaging-git] % git svn clone svn://127.0.0.16/freshports-1/packaging/trunk --authors-file=author-transformed.txt packaging
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 /usr/home/dvl/src/subversion-to-git/packaging-git/packaging/.git/
W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: File not found: revision 100, path '/packaging/trunk'
W: Do not be alarmed at the above message git-svn is just searching aggressively for old history.
This may take a while on large repositories
Checked Ahrough cut-FreshPorts-Modules
	A	cut-FreshPorts-Scripts
r5037 = 4b61c55d7a850874e3f5a0463fa9d49315757a0f (refs/remotes/git-svn)
	M	cut-FreshPorts-Modules
r5038 = 2145deced2523e29310d8dc6e9b038a771c7dbff (refs/remotes/git-svn)
	M	cut-FreshPorts-Modules
	M	cut-FreshPorts-Scripts
r5042 = 00c84b5c9bae0298f130c58ecb6bc13f63928ad4 (refs/remotes/git-svn)
	A	cut-fp-listen
	A	cut-freshport-services
	A	cut-freshports-periodics
	A	cut-freshsource
r5043 = 48d64932b6e386f029cdff6397051dbe489cfe3a (refs/remotes/git-svn)
	D	cut-freshport-services
	A	cut-freshports-services
W: -empty_dir: cut-freshport-services
r5060 = 65a1312dbf298de57cbc8e406fc636f764861835 (refs/remotes/git-svn)
	A	cut-fp-listen.sh
	A	cut-freshports-periodics.sh
	A	cut-freshports-scripts.sh
	A	cut-freshsource.sh
r5096 = 69098095e565f4b6bf7512c0f0e978386abc46a0 (refs/remotes/git-svn)
	D	cut-freshsource.sh
	D	cut-freshports-scripts.sh
W: -empty_dir: cut-freshports-scripts.sh
W: -empty_dir: cut-freshsource.sh
r5097 = f3b4295ecbfc9450e70953d8ca90fddef28f4ac0 (refs/remotes/git-svn)
	M	cut-freshsource
r5098 = 69cb14e1216fe085fb4601acadde026154e18f9f (refs/remotes/git-svn)
	D	cut-fp-listen
	A	cut-freshports-fp-daemon
	A	cut-freshports-fp-listen
W: -empty_dir: cut-fp-listen
r5100 = de0c0b15e9d2cccdaf517ff5fdafc93b8be58e6c (refs/remotes/git-svn)
	M	cut-freshports-periodics.sh
r5101 = 5d5ae79d5c2c7c38a2def9f19578b3d08f6c293a (refs/remotes/git-svn)
	D	cut-freshports-periodics.sh
W: -empty_dir: cut-freshports-periodics.sh
r5102 = 9b66ce988cc8bb96cc98ef03a3efa58a8901c756 (refs/remotes/git-svn)
	M	cut-FreshPorts-Modules
r5108 = 6bcce6df4382a66deb6da92e88fab954ffe089cb (refs/remotes/git-svn)
	M	cut-FreshPorts-Scripts
r5135 = 1c1ddf69809a8a06c0817ffe05ecafc3b919fc76 (refs/remotes/git-svn)
	A	cut-phorum
r5220 = 667ca62c459ab0213412337b6f15dbd6c0d08202 (refs/remotes/git-svn)
	M	cut-freshsource
r5221 = 96f29af73e93caf5a5eb1f7c08dc05dc17315469 (refs/remotes/git-svn)
	M	cut-FreshPorts-Modules
	M	cut-FreshPorts-Scripts
	M	cut-fp-listen.sh
	M	cut-freshports-fp-daemon
	M	cut-freshports-fp-listen
	M	cut-freshports-periodics
	M	cut-freshports-services
	M	cut-freshsource
	M	cut-phorum
r5241 = 0e72f9b4e3867354183356b87f8c28404d2ab206 (refs/remotes/git-svn)
	A	cut-freshports-database
r5251 = 4b8ed42bdfc596697fc1c38d18e7dbcfe2bf7691 (refs/remotes/git-svn)
	M	cut-fp-listen.sh
r5269 = 374fccc831f76866368316c1737ef1ce6e0f5bfe (refs/remotes/git-svn)
	M	cut-FreshPorts-Modules
	M	cut-FreshPorts-Scripts
	M	cut-fp-listen.sh
	M	cut-freshports-database
	M	cut-freshports-fp-daemon
	M	cut-freshports-fp-listen
	M	cut-freshports-periodics
	M	cut-freshports-services
	M	cut-freshsource
	M	cut-phorum
r5345 = 30cb3db1a4506f4dbaab92edce55d723e1f10a58 (refs/remotes/git-svn)
	A	cut-freshports-fp-freshports
	A	cut-freshports-fp-ingress
r5400 = dcd02a92897020fb1c302aca2872fa080fdb03ec (refs/remotes/git-svn)
	D	cut-freshports-fp-freshports
	D	cut-freshports-fp-ingress
	A	cut-freshports-freshports
	A	cut-freshports-ingress
W: -empty_dir: cut-freshports-fp-freshports
W: -empty_dir: cut-freshports-fp-ingress
r5429 = 79460d4356320694b531c1c81908f978596a5231 (refs/remotes/git-svn)
	A	cut-freebsddiary
r5451 = b6b94cd13999e6b1543c4fddb8bf38a2fd6218f3 (refs/remotes/git-svn)
	A	cut-freshports-ingress-svn
r5506 = 295009d45bbbff17d88b611376a6f35ca914a6c2 (refs/remotes/git-svn)
	A	cut-freshports-modules-git
	A	cut-freshports-scripts-git
r5558 = 80fbdc2fc5bfde36936d6afdf27cd7a35183d275 (refs/remotes/git-svn)
	A	cut-fp-listen-git.sh
r5571 = 000b65a2413063ae83fc69ee8f034b3f86704f47 (refs/remotes/git-svn)
	A	cut-freshsource-git
r5576 = b10c8d42163d82f52e807fa50df803e8eeb6e4cb (refs/remotes/git-svn)
	A	+MANIFEST-FreshPorts-Scripts
	A	+MANIFEST-p5-FreshPorts-Modules
	A	+MANIFEST-p5-freshports-modules-git
	A	+MANIFEST-p5-freshports-scripts-git
r5611 = 8c09b7ec7edddd05bc81fd4363c43e66325ad463 (refs/remotes/git-svn)
	A	+MANIFEST-freshports-www
	A	+MANIFEST-freshports-www-git
	A	+MANIFEST-freshsource-www
	A	+MANIFEST-freshsource-www-git
r5612 = 9b3c02b54cd2aae91d23a9ba1402bece99e7d00d (refs/remotes/git-svn)
	A	+MANIFEST-freshports-helper_scripts
r5626 = 144079c68094056f2835c415f545af69765e41ea (refs/remotes/git-svn)
	A	+MANIFEST-py37-freshports-git-proc-commit
r5627 = 9ddd67b706787a39521bfb16ee81a8426a909cf4 (refs/remotes/git-svn)
	M	cut-freshsource-git
r5656 = ca48fccedfcbd090954a8bd86c32feefe917115b (refs/remotes/git-svn)
	A	cut-freshports-verify
r5690 = 7288b2b0f50ca2625905ede408b4acd55c136062 (refs/remotes/git-svn)
	M	cut-FreshPorts-Modules
	M	cut-FreshPorts-Scripts
	M	cut-fp-listen.sh
	M	cut-freshports-fp-daemon
	M	cut-freshports-fp-listen
	M	cut-freshports-periodics
	M	cut-freshports-services
	M	cut-freshsource
r5722 = 81d3c8944af4e0e0db0e6f7326026bc20b3ac884 (refs/remotes/git-svn)
	M	cut-fp-listen-git.sh
	M	cut-freebsddiary
	M	cut-freshports-database
	M	cut-freshports-freshports
	M	cut-freshports-ingress
	M	cut-freshports-ingress-svn
	M	cut-freshports-modules-git
	M	cut-freshports-scripts-git
	M	cut-freshports-verify
	M	cut-freshsource-git
	M	cut-phorum
r5725 = 1d35812c6cc3d782d8c977f42774ec7407f288d6 (refs/remotes/git-svn)
	A	+MANIFEST-py38-freshports-git-proc-commit
r5730 = 668652527209f70b31f8425cd7196293679db829 (refs/remotes/git-svn)
	D	cut-fp-listen.sh
	D	cut-freshports-fp-listen
	D	cut-freshsource
	D	cut-freshports-ingress-svn
W: -empty_dir: cut-fp-listen.sh
W: -empty_dir: cut-freshports-fp-listen
W: -empty_dir: cut-freshports-ingress-svn
W: -empty_dir: cut-freshsource
r5819 = 2ce95249f74e41e3e349b7832f0e1f1e4a60d718 (refs/remotes/git-svn)
	D	cut-freshports-services
	D	cut-freshports-fp-daemon
W: -empty_dir: cut-freshports-fp-daemon
W: -empty_dir: cut-freshports-services
r5820 = 3942e4f9ffceadabf30e086bef9e92c752d321aa (refs/remotes/git-svn)
	D	cut-FreshPorts-Scripts
	D	cut-FreshPorts-Modules
W: -empty_dir: cut-FreshPorts-Modules
W: -empty_dir: cut-FreshPorts-Scripts
r5821 = 093305b7e1c22df953536530b2e55721841ecb5b (refs/remotes/git-svn)
	M	+MANIFEST-FreshPorts-Scripts
	A	README.TXT
r5828 = 866ac03988cb15743506e65d910aa67af18b31bd (refs/remotes/git-svn)
	D	cut-freshports-scripts-git
	D	cut-freshports-modules-git
	A	+MANIFEST-py39-freshports-git-proc-commit
	A	cut-freshports-modules
	A	cut-freshports-scripts
W: -empty_dir: cut-freshports-modules-git
W: -empty_dir: cut-freshports-scripts-git
r5938 = e52eee8f8dc7d91fd98b8db5ff4190ac220d3e3b (refs/remotes/git-svn)
	D	cut-fp-listen-git.sh
	A	cut-fp-listen.sh
W: -empty_dir: cut-fp-listen-git.sh
r5939 = d1390a34f9d0ee92f83f42a6ff6253d233f54549 (refs/remotes/git-svn)
	D	cut-freshsource-git
	A	cut-freshsource
W: -empty_dir: cut-freshsource-git
r5940 = 6d0f17564df842a46b65162c0a4939a8eb8ce2e0 (refs/remotes/git-svn)
	A	+MANIFEST-p5-freshports-modules
	A	+MANIFEST-p5-freshports-scripts
r5956 = 75f08c89c3d025c7acb420ce9d7f529f3c9d154c (refs/remotes/git-svn)
	D	+MANIFEST-p5-freshports-modules
W: -empty_dir: +MANIFEST-p5-freshports-modules
r5971 = 7fa72dbc84144fdcb810f5de4e55a2ee4dfac4f6 (refs/remotes/git-svn)
	D	+MANIFEST-p5-freshports-modules-git
	D	+MANIFEST-freshports-www-git
	D	+MANIFEST-FreshPorts-Scripts
	D	+MANIFEST-p5-FreshPorts-Modules
	D	+MANIFEST-p5-freshports-scripts-git
	D	+MANIFEST-freshsource-www-git
	A	+MANIFEST-p5-freshports-modules
W: -empty_dir: +MANIFEST-FreshPorts-Scripts
W: -empty_dir: +MANIFEST-freshports-www-git
W: -empty_dir: +MANIFEST-freshsource-www-git
W: -empty_dir: +MANIFEST-p5-FreshPorts-Modules
W: -empty_dir: +MANIFEST-p5-freshports-modules-git
W: -empty_dir: +MANIFEST-p5-freshports-scripts-git
r6029 = d3ab65f1d8b37d22f4961f5cf70bbdd075ca6546 (refs/remotes/git-svn)
	M	README.TXT
r6036 = 8abbcd0ebf356854db979fcc68130e8200e8eba0 (refs/remotes/git-svn)
Checked out HEAD:
  svn://127.0.0.16/freshports-1/packaging/trunk r6036

@dlangille
Copy link
Contributor Author

[23:55 mydev dvl ~/src/subversion-to-git/packaging-git] % cd packaging 
[23:57 mydev dvl ~/src/subversion-to-git/packaging-git/packaging] % git branch
* master
[23:57 mydev dvl ~/src/subversion-to-git/packaging-git/packaging] % git branch -M main
[23:57 mydev dvl ~/src/subversion-to-git/packaging-git/packaging] % git branch
* main
[23:57 mydev dvl ~/src/subversion-to-git/packaging-git/packaging] % 
[23:57 mydev dvl ~/src/subversion-to-git/packaging-git/packaging] % git remote add origin [email protected]:FreshPorts/packaging.git
[23:58 mydev dvl ~/src/subversion-to-git/packaging-git/packaging] % git push -u origin main
Enumerating objects: 179, done.
Counting objects: 100% (179/179), done.
Delta compression using up to 72 threads
Compressing objects: 100% (179/179), done.
Writing objects: 100% (179/179), 23.20 KiB | 1.93 MiB/s, done.
Total 179 (delta 115), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (115/115), done.
To github.com:FreshPorts/packaging.git
 * [new branch]      main -> main
branch 'main' set up to track 'origin/main'.
[23:58 mydev dvl ~/src/subversion-to-git/packaging-git/packaging] % 

@dlangille
Copy link
Contributor Author

@calebpower I wanted you to see this repo before I mangled it up by removing all the scripts.

This is where I wanted to say this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant