db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r1836454 - in /db/jdo: authors-transform.txt svn2git.html
Date Sun, 22 Jul 2018 19:40:53 GMT
Author: mbo
Date: Sun Jul 22 19:40:52 2018
New Revision: 1836454

URL: http://svn.apache.org/viewvc?rev=1836454&view=rev
Log:
JDO-770 svn2git description

Added:
    db/jdo/authors-transform.txt
    db/jdo/svn2git.html

Added: db/jdo/authors-transform.txt
URL: http://svn.apache.org/viewvc/db/jdo/authors-transform.txt?rev=1836454&view=auto
==============================================================================
--- db/jdo/authors-transform.txt (added)
+++ db/jdo/authors-transform.txt Sun Jul 22 19:40:52 2018
@@ -0,0 +1,11 @@
+andyj = Andy Jefferson <andyj@apache.org>
+bayard = Henri Yandell <bayard@apache.org>
+brazil = Michael Watzek <brazil@apache.org>
+brianm = Brian McCallister <brianm@apache.org>
+btopping = Brian Topping <btopping@apache.org>
+clr = Craig L Russell <clr@apache.org>
+geirm = Geir Magnusson Jr <geirm@apache.org>
+madams = Matthew T. Adams <madams@apache.org>
+mbo = Michael Bouschen <mbo@apache.org>
+mcaisse = Michelle Caisse <mcaisse@apache.org>
+mzaun = Martin Zaun <mzaun@apache.org>

Added: db/jdo/svn2git.html
URL: http://svn.apache.org/viewvc/db/jdo/svn2git.html?rev=1836454&view=auto
==============================================================================
--- db/jdo/svn2git.html (added)
+++ db/jdo/svn2git.html Sun Jul 22 19:40:52 2018
@@ -0,0 +1,99 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+  <head>
+    <meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8">
+    <title>Converting a Subversion repository to Git</title>
+  </head>
+
+<body>
+<h1>Converting a Subversion repository to Git</h1>
+The description is taken from John Albin's blog 
+<a href="http://john.albin.net/git/convert-subversion-to-git">
+Converting a Subversion repository to Git</a>.
+
+<ol>
+  <li>Checkout the project in a new clean workspace
+    <pre>
+% mkdir svn2git
+% cd svn2git
+% svn checkout https://svn.apache.org/repos/asf/db/jdo
+    </pre>
+  </li>
+  <li>Retrieve a list of all Subversion committers
+    <p>Run the following command that creates the file authors-transform.txt. Then
edit authors-transform.txt and add full anme and email on each line. </p>
+    <pre>% svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print
$2" = "$2" <"$2">"}' | sort -u > authors-transform.txt</pre>
+  </li>
+  <li>Clone the Subversion repository using git-svn
+    <p>The following command will place the git repository in the "~/temp" folder inside
your home directory. The command will fail, if there are authors not included in authors-transform.txt.
Then you need to extend authors-transform.txt, remove the files being checked out so far and
run thecommand again.</p>
+    <pre>% git svn clone https://svn.apache.org/repos/asf/db/jdo --no-metadata -A authors-transform.txt
--stdlayout ~/temp</pre>
+  </li>
+  <li>Convert svn:ignore properties to .gitignore
+  </li>
+    <pre>% cd ~/temp
+% git svn show-ignore > .gitignore
+% git add .gitignore
+% git commit -m 'Convert svn:ignore properties to .gitignore.'
+    </pre>
+  <li>Find empty directories
+    <p>Git does not handle empty directories. That means they are removed after the
migration from svn to git. If they are imporant for emaple for the build process you should
create a file (e.g. README.txt) in the directory.
+  </li>
+  <li>Push repository to a bare git repository
+    <p>Create a bare repository</p>
+    <pre>% git init --bare ~/new-bare.git
+% cd ~/new-bare.git
+% git symbolic-ref HEAD refs/heads/trunk
+    </pre>
+    <p>Then push the temp repository to the new bare repository.</p>
+    <pre>
+% cd ~/temp
+% git remote add bare ~/new-bare.git
+% git config remote.bare.push 'refs/remotes/*:refs/heads/*'
+% git push bare
+% rm -rf ~/temp
+    </pre>
+  </li>
+  <li>Rename "trunk" branch to "master"
+    <pre>
+% cd ~/new-bare.git
+% git branch -m trunk master
+    </pre>
+  </li>
+  <li>Clean up branches and tags
+    <pre>
+% cd ~/new-bare.git
+% git for-each-ref --format='%(refname)' refs/heads/tags |
+cut -d / -f 4 |
+while read ref
+do
+  git tag "$ref" "refs/heads/tags/$ref";
+  git branch -D "tags/$ref";
+done
+    </pre>
+  </li>
+  <li>Copy Git repo from ~/new-bare.git to remote repository
+  <pre>
+% git remote rm origin
+% git remote add origin  https://gitbox.apache.org/repos/asf/db-jdo.git
+% git push --all
+% git push --tags
+  </li>
+</ol>
+
+<hr>
+</body> </html>



Mime
View raw message