trucos tag ramificacion que name hace conectar con commits commands comentarios git git-svn

tag - ramificacion en git



Git Svn-Posible punto de ramificación encontrado (3)

Mi problema era que debido a un SVN tan grande (archivos y registros) que seguía fallando en algunos puntos y cuando reinicié creó varias líneas de las ramas y etiquetas dentro de mi archivo .git / config.

branches = branches/*:refs/remotes/svn/branches/* tags = tags/*:refs/remotes/svn/tags/*

Simplemente quité las entradas duplicadas de estos y reinicié con mi comando

git svn fetch

Estoy tratando de usar git svn para clonar un repositorio SVN en Git.

Ejecuto el siguiente comando:

C: / Proyectos> git svn clone -T trunk -b branches -t etiquetas -no-metadata https://svn.mycompany.com/Projects/MyProject MyProject

Y obtengo el siguiente error:

Se encuentra un posible punto de ramificación: https://svn.mycompany.com/Projects/MyProject/trunk => https://svn.mycompany.com/Projects/MyProject/tags/11.1.9.33334 , 33334

Uso del valor no inicializado en la sustitución (s ///) en /usr/lib/perl5/site_perl/Git/SVN.pm línea 106.

Uso del valor no inicializado en la concatenación (.) O cadena en /usr/lib/perl5/site_perl/Git/SVN.pm línea 106.refs / remotos / MyProject-10.2: '' https://svn.mycompany.com/Projects '' no encontrado en ''''

La versión de git es:

1.8.1.msysgit.1


Mismo error. Estoy convirtiendo mi repositorio SVN a Git.

git version 2.8.2.windows.1 Windows 8.1 Pro 64bits, running Git For Windows 32bits.

v1, la dirección del troncal es incorrecta, establecida por error como la raíz del repositorio:

C:/Windows/system32>git svn clone https://mycompany.svn.beanstalkapp.com/myproject --no-metadata -A c:/temp/svn_to_git_users.txt --trunk=https://mycompany.svn.beanstalkapp.com/myproject --tags=https://mycompany.svn.beanstalkapp.com/myproject/tags --branches=https://mycompany.svn.beanstalkapp.com/myproject/branches c:/code/Git_myproject [...] W: +empty_dir: branches/20080918_DBDEPLOY/vendor/src/csharp/MS WCSF Contrib/src/Services W: +empty_dir: branches/20080918_DBDEPLOY/vendor/src/csharp/RealWorldControls/References r530 = c276e3b039d8e38759c6fb17443349732552d7a2 (refs/remotes/origin/trunk) Found possible branch point: https://mycompany.svn.beanstalkapp.com/myproject/trunk => https://mycompany.svn.beanstalkapp.com/myproject/branches/20080918_DBDEPLOY, 529 Use of uninitialized value $u in substitution (s///) at /mingw32/share/perl5/site_perl/Git/SVN.pm line 101. Use of uninitialized value $u in concatenation (.) or string at /mingw32/share/perl5/site_perl/Git/SVN.pm line 101. refs/remotes/origin/trunk: ''https://mycompany.svn.beanstalkapp.com/myproject'' not found in '''' C:/Windows/system32>

v2 funciona: corrigió las rutas (y usando relativo en lugar de absoluto para acortar la línea)

C:/Windows/system32>git svn clone https://mycompany.svn.beanstalkapp.com/myproject --no-metadata -A c:/temp/svn_to_git_users.txt --trunk=trunk --tags=tags --branches=branches c:/code/Git_myproject [...] r529 = 40442d32486f4ca6f713e659b3785a446bd19de6 (refs/remotes/origin/trunk) Found possible branch point: https://mycompany.svn.beanstalkapp.com/myproject/trunk => https://mycompany.svn.beanstalkapp.com/myproject/branches/20080918_DBDEPLOY, 529 Found branch parent: (refs/remotes/origin/20080918_DBDEPLOY) 40442d32486f4ca6f713e659b3785a446bd19de6 Following parent with do_switch Successfully followed parent r530 = 9fefc1b3a892555e315d55c2024cdf3d3a05010f (refs/remotes/origin/20080918_DBDEPLOY) A src/database/sds.dbd [...]

Según lo sugerido por otros, abrí el archivo de configuración (C: / code / Git_myproject.git / config) y la primera versión (rota) fue la siguiente. La búsqueda es probablemente lo incorrecto al comparar con v2 (las ramas y las etiquetas también se duplican, algunas personas dicen que también podría causar problemas).

[svn-remote "svn"] noMetadata = 1 url = https://mycompany.svn.beanstalkapp.com/myproject fetch = :refs/remotes/origin/trunk branches = branches/*:refs/remotes/origin/* tags = tags/*:refs/remotes/origin/tags/* branches = branches/*:refs/remotes/origin/* tags = tags/*:refs/remotes/origin/tags/*

y la 2da versión (en funcionamiento) era:

[svn-remote "svn"] noMetadata = 1 url = https://mycompany.svn.beanstalkapp.com/myproject fetch = trunk:refs/remotes/origin/trunk branches = branches/*:refs/remotes/origin/* tags = tags/*:refs/remotes/origin/tags/*

Mirando svn.pm, puedo ver que estamos en find_parent_branch() que find_parent_branch() el mensaje "Found possible branch point" . Luego llama a other_gs($new_url, $url, $branch_from, $r, $self->{ref_id}); que a su vez llama: Git::SVN->find_by_url($new_url, $url, $branch_from); que llama a resolve_local_globs($u, $fetch, $globspec); y resolve_local_globs es donde se produce el error en la línea 100/101:

my $u = (::cmt_metadata("$refname"))[0]; $u =~ s!^/Q$url/E(/|$)!! or die

Cometí un error en mi línea de comandos, al arreglar mi ruta troncal eliminé el error. Nunca quité las líneas duplicadas en el archivo de configuración, se ajustaron automáticamente al volver a ejecutar el comando.


Tuve el mismo error y lo resolví actualizando a git version 2.6.2.windows.1