clean-git creates local branches only to delete them again -- no change in the end
clean-git creates local branches only to delete them again -- no change in the end
.... Creating the local branch 'origin/tags/2.1.0T22' for Subversion branch 'refs/remotes/origin/tags/2.1.0T22'. Creating the local branch 'origin/tags/2.1.0T24' for Subversion branch 'refs/remotes/origin/tags/2.1.0T24'. ..... Deleting Git branch 'origin/tags/2.1.0T22' not in Subversion. Deleted branch origin/tags/2.1.0T22 (was 9be49d2). Deleting Git branch 'origin/tags/2.1.0T24' not in Subversion. Deleted branch origin/tags/2.1.0T24 (was 7e13db9). ...
Comments (21)
-
Account Deactivated -
Account Deleted I actually report the above issue and was wonder what the fine state of the repository should look like after clean-git? If I follow the steps in https://www.atlassian.com/git/tutorials/migrating-overview to the letter my bit bucket repository has no branches from my svn repo.
Is this stil the recommended approach for moving from SVN to BitBucket or is there a better approach?
Thank you,
Scott
-
Is this a duplicate of issue #8 ?
-
I don't think that this is a #8 duplicate.
This is a really painful bug because although --no-delete makes ist possible to remain the local branches the remote branches will not be deleted (I suppose that should be done). Thus no real cleaning happens.
-
I confirm the observation off Gustavo Refosco
But do not really understand what happens Tags whre also not created as expected, but whre organiesed als branches under a tags Folder (sourceTree)
$ java -Dfile.encoding=utf-8 -jar /d/_sw_rep/dev/atlassian/svn-migration-scripts.jar clean-git --force # Creating annotated tags... # Creating local branches... Creating the local branch 'origin/V1.0-12' for Subversion branch 'refs/remotes/origin/V1.0-12'. Creating the local branch 'origin/tags/V1.0-12' for Subversion branch 'refs/remotes/origin/tags/V1.0-12'. Creating the local branch 'origin/tags/V1.0-15' for Subversion branch 'refs/remotes/origin/tags/V1.0-15'. Creating the local branch 'origin/tags/V1.2-2' for Subversion branch 'refs/remotes/origin/tags/V1.2-2'. Creating the local branch 'origin/tags/V2.1-2' for Subversion branch 'refs/remotes/origin/tags/V2.1-2'. Creating the local branch 'origin/trunk' for Subversion branch 'refs/remotes/origin/trunk'. # Checking for obsolete tags... No obsolete tags to remove. # Checking for obsolete branches... Deleting Git branch 'origin/tags/V1.0-15' not in Subversion. Deleted branch origin/tags/V1.0-15 (was abc8c0b). Deleting Git branch 'origin/V1.0-12' not in Subversion. Deleted branch origin/V1.0-12 (was 321e2e4). Deleting Git branch 'origin/trunk' not in Subversion. Deleted branch origin/trunk (was 3122e03). Deleting Git branch 'origin/tags/V1.2-2' not in Subversion. Deleted branch origin/tags/V1.2-2 (was cbfa7ef). Deleting Git branch 'origin/tags/V1.0-12' not in Subversion. Deleted branch origin/tags/V1.0-12 (was 3744888). Deleting Git branch 'origin/tags/V2.1-2' not in Subversion. Deleted branch origin/tags/V2.1-2 (was fbd1e5a). # Cleaning tag names # Cleaning branch names $ java -Dfile.encoding=utf-8 -jar /d/_sw_rep/dev/atlassian/svn-migration-scripts.jar clean-git --force --no-delete # Creating annotated tags... # Creating local branches... Creating the local branch 'origin/V1.0-12' for Subversion branch 'refs/remotes/origin/V1.0-12'. Creating the local branch 'origin/tags/V1.0-12' for Subversion branch 'refs/remotes/origin/tags/V1.0-12'. Creating the local branch 'origin/tags/V1.0-15' for Subversion branch 'refs/remotes/origin/tags/V1.0-15'. Creating the local branch 'origin/tags/V1.2-2' for Subversion branch 'refs/remotes/origin/tags/V1.2-2'. Creating the local branch 'origin/tags/V2.1-2' for Subversion branch 'refs/remotes/origin/tags/V2.1-2'. Creating the local branch 'origin/trunk' for Subversion branch 'refs/remotes/origin/trunk'. # Checking for obsolete tags... No obsolete tags to remove. # Checking for obsolete branches... Deleting Git branch 'origin/tags/V1.0-15' not in Subversion. Deleting Git branch 'origin/V1.0-12' not in Subversion. Deleting Git branch 'origin/trunk' not in Subversion. Deleting Git branch 'origin/tags/V1.2-2' not in Subversion. Deleting Git branch 'origin/tags/V1.0-12' not in Subversion. Deleting Git branch 'origin/tags/V2.1-2' not in Subversion. # Cleaning tag names # Cleaning branch names
-
Same issue here. Is there any movement on this project anymore?
-
Just ran into the same issue.
-
Account Deactivated Hi, same issue here. Any news?
-
+1 on this issue. After git-cleaning the converted repo, no local branches and tags are created
-
How to solve now this issue? I need my tags (but not under branches directory).
-
The best option I've found is to switch to
svn2git
instead. Does the same thing, but seems to be maintained and works well in this scenario. -
Hey thanks for the very fast repsonse in 2 minutes -;) !!! Praise God!
-
Account Deactivated Same choice here: migration done with svn2git
-
The svn-migration-scripts.jar work for git versions v1.x . But since v2.x the svn clone command implies the prefix "origin" which was empty by default in the 1.x version. You can specify that origin prefix during the clone with
git svn clone --prefix="" --authors-file=./authors.txt --stdlayout Remote_SVN_Path Clone_In_Directory
Now the svn-migration-scripts.jar clean-git command gets the expected format of the remote definitions and thus handles them correctly. In other words svn-migration-scripts.jar does not support the prefix option of "git svn clone" and thus you should force it to be empty until supported. The change in default behavior of git svn resulted in this "bug".
-
There seems to be a pull request for this already: https://bitbucket.org/atlassian/svn-migration-scripts/pull-requests/36/adding-prefix-option/diff
-
This issue is still not fixed. Anyone have an update? The --prefix=”” option “fixes” it for git svn clone, but a subsequent git svn fetch still encounters the issue when running a clean-git. Is there a workaround for that too?
-
So sad, same problem at this date. Thanks Giuseppe for the svn2git suggestion. Wish me luck guys.
-
Here I am in 2020 still hitting the same problem when following the official Atlassian migration guide (which also hasn’t been updated to even note there’s an issue and send people here)…
-
Just ran into this in 2021 still, with the latest copy of the migration scripts. Apparently not fixed yet…
-
Likewise @Anthony Newton.
-
Just has the same problem
- Log in to comment
I was able to maintain the branches by adding the --no-delete option to the command, so I run it as:
I got the following output:
Ignore the message about the tags - I just don't have the tags directory. Even though it says the branches are being deleted again, they are actually maintained.