No se puede determinar la información de SVN del historial de HEAD


¿Por qué recibo este mensaje de error?

 58
Author: Chad, 2009-08-13

10 answers

(Publicado la "pregunta" de Chad como respuesta, formato fijo y errores tipográficos.)

Hay un par de causas para este mensaje de error.

El primero, siendo el más común. Tienes dos historiales disjuntos en tu repositorio git: El historial que hiciste en git y el historial del repositorio svn remoto.

Para arreglar esto, necesitas hacer que tu repositorio git y el repositorio svn compartan un ancestro común para que git pueda averiguar qué cambios han cambiado en las confirmaciones lo.

El siguiente Artículo , discute cómo solucionar el problema:

La segunda causa posible del problema es si tiene una versión temprana de git (posible, paquete msysGit de windows) y acaba de crear un nuevo repositorio git que se comunica con un repositorio svn remoto.

Por ejemplo:

git svn init svn://svn.xxx.xxx/xxx/trunk
git svn fetch -r BASE:10

O

git clone svn://svn.xxx.xxx/xxx/trunk // Adds all the files in the revision...

Y obtiene los mensajes de error follow, al usar los siguientes comandos.

git svn info

No se puede determinar svn aguas arriba información del árbol de trabajo o

git svn rebase

No se puede determinar el historial del árbol de trabajo de la información svn de origen ascendente o

  git svn dcommit

No se puede determinar la información de SVN del historial de HEAD

Si recibes los mensajes de error anteriores, el primer paso es comprobar tu versión de git. Si está ejecutando una versión anterior de git

Lo siguiente El artículo discute el problema con más detalle.

 32
Author: bstpierre,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-11-06 15:26:38

Recibí este mensaje debido a la clonación del repositorio svn con la opción --no-metadata. Tal vez ese sea el caso con Tu problema también.

Al clonarlo sin esa opción todo está bien.

La opción --no-metadata está destinada a clonar un repositorio SVN cuando el nuevo clon git va a ser la fuente canónica en el futuro. Carece de la capacidad de comprometerse de nuevo al SVN upstream, porque no tiene forma de rastrear las diferencias entre el clon de git y el SVN upstream.

 25
Author: slafs,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-02-29 17:26:49

En mi caso, el HEAD del repositorio svn debería haber sido emparejado con el HEAD del repositorio git. Esto {[3] } debería resolver el problema:

git update-ref refs/remotes/git-svn refs/remotes/origin/master
 14
Author: axel22,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-09-26 11:55:50

Recibí este mensaje después de agregar incorrectamente el -s/--stdlayout parámetro del comando git svn clone para un repositorio de Subversion que tenía no el "diseño estándar de Subversion" de trunk, tags, y branches rutas relativas.

(Los repositorios de Subversion que normalmente clono tienen las rutas relativas estándar, así que cuando cloné un repositorio de Subversion que no los tenía usando mi comando habitual git svn clone, recibí este mensaje críptico. El mensaje es 100% correcto, pero casi 100% inútil cuando se intenta averiguar cuál es el problema.)

 9
Author: Ed Ruder,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-07-19 20:26:55

Tiene el mismo problema, aquí está la solución basada en http://eikke.com/importing-a-git-tree-into-a-subversion-repository / artículo:

$ git svn init http://server.com/svn/project/trunk/prototypes/proto1/
$ git svn fetch
  W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: '/svn/!svn/bc/100/dcom/trunk/prototypes/ws' path not found
  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
  r147367 = 37c9910f794cb9cff7ca0d5d2eb26e1f0dabbc4d (refs/remotes/git-svn)
$ svn log http://server.com/svn/project/trunk/prototypes/proto1/
  ------------------------------------------------------------------------
  r147367 | user | 2014-01-16 18:02:43 +0100 (Thu, 16 Jan 2014) | 1 line
  proto1 home
  ------------------------------------------------------------------------
$ git log --pretty=oneline master | tail -n1
  71ceab2f4776089ddbc882b8636aacec1ba5e832 Creating template
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ #1

$ git show-ref git-svn
  37c9910f794cb9cff7ca0d5d2eb26e1f0dabbc4d refs/remotes/git-svn
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ #2

$ echo "71ceab2f4776089ddbc882b8636aacec1ba5e832 37c9910f794cb9cff7ca0d5d2eb26e1f0dabbc4d" >> .git/info/grafts

$ git svn dcommit
  Committing to http://server.com/svn/project/trunk/prototypes/proto1 ...
    A   README.md
    A   pom.xml
A   src/main/java/.gitkeep
A   src/main/resources/.gitkeep
A   src/main/webapp/WEB-INF/web.xml
A   src/main/webapp/index.html
A   webapps/.gitkeep
  Committed r147419
    A   README.md
    A   pom.xml
A   src/main/java/.gitkeep
A   src/main/resources/.gitkeep
A   src/main/webapp/WEB-INF/web.xml
A   src/main/webapp/index.html
A   webapps/.gitkeep
  r147419 = 6a8bda7262739306d0a6e17eaad2802737dedc35 (refs/remotes/git-svn)
  No changes between current HEAD and refs/remotes/git-svn
  Resetting to the latest refs/remotes/git-svn
  Unstaged changes after reset:
    M   pom.xml
    M   src/main/webapp/index.html
    A   .gitignore
  Committed r147420
    M   pom.xml
    M   src/main/webapp/index.html
    A   .gitignore
  r147420 = 749b5acec55c341672bca08d07de8c336b5a4701 (refs/remotes/git-svn)
  No changes between current HEAD and refs/remotes/git-svn
  Resetting to the latest refs/remotes/git-svn
  ...etc...
 8
Author: andrej,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-01-17 10:55:39

También puede obtener este error, cuando tenga el repositorio SVN recién creado de checkout.

He resuelto esto por

  1. Primero haciendo una confirmación inicial a través del comando svn
  2. Luego clona el repositorio usando el comando git svn.
 7
Author: mohammadthalif,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-05-21 10:52:15

Otra causa para este problema es una opción incorrecta svn-remote.svn.rewriteRoot (vea esta respuesta para obtener instrucciones sobre cómo usar esto).

La línea git-svn-id en sus commits importados desde Subversion tiene que coincidir con la URL rewriteRoot si está establecida.

 2
Author: Daniel Hershcovich,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-05-23 12:34:18

Recibí este mensaje porque usé un FQDN para el comando git svn init pero la integración preexistente de git-svn estaba usando solo el nombre de host.

Por ejemplo, grep git-svn-id mostró:

git-svn-id: svn://host/repo/...

Pero lo hice:

git svn init -Ttrunk svn://host.domain.com/repo

(Tenemos una máquina que sincroniza regularmente un repositorio de git con svn, luego todos los demás tienen git config --add remote.origin.fetch refs/remotes/*:refs/remotes/* para obtener las ramas sincronizadas de svn.)

 2
Author: Nathan Kidd,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-05-01 22:33:12

Otra posible causa: Si tiene un svn-remote..rewriteUUID config set, git-svn puede tener problemas para localizar los metadatos correctos para el repositorio. Por ejemplo, podría tener algo como esto (vea la página man de git-svn para una discusión de por qué querría hacer esto):

[svn-remote "svn"]
    url = svn://read-write.test.org
    fetch = trunk/project:refs/remotes/trunk
    rewriteRoot = http://read-only.test.org/svn
    rewriteUUID = 1234-abcd

... donde 1234-abcd es el UUID del espejo de solo lectura. Cuando 'git svn fetch', puede terminar con este archivo:

.git/svn/refs/remotes/trunk/.rev_map.5678-dcba

... donde 56780-dcba es el UUID del repositorio de lectura-escritura. La solución es:

$ mv .git/svn/refs/remotes/trunk/.rev_map.5678-dcba \
    .git/svn/refs/remotes/trunk/.rev_map.1234-abcd

No se puede decir con certeza si esa es una solución duradera, es decir, podría confundirse la próxima vez que 'git svn fetch'. Podría intentar un enlace simbólico en lugar de 'mv', no he experimentado con eso.

 0
Author: szager,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-04-11 18:29:34

Vi esto después de usar BFG Repo-Cleaner https://rtyley.github.io/bfg-repo-cleaner / y reescribió el historial de git (intencionalmente), y luego intentó git svn fetch de nuevo. El mensaje muestra que la coincidencia svn de git se ha perdido.

Para resolver esto, lea https://git-scm.com/docs/git-svn
En la parte inferior muestra:

G GIT_DIR/svn/*/.rev_map.

Mapeo entre la revisión de Subversion numbers and Git commit names (en inglés). En un repositorio donde el noMetadata opción no está establecida, esto se puede reconstruir desde las líneas git-svn-id: que están al final de cada commit (ver el svn.noMetadata en la sección de arriba para más detalles).

Necesita tener los comentarios git-svn-id en los comentarios de confirmación para hacer esto. Si lo hace, puede eliminar el .rev_map.* archivo y reconstruirlo.

rm .git/svn/refs/remotes/git-svn/.rev_map.*
git svn info

Esto debería mostrar:

Rebuilding .git/svn/refs/remotes/git-svn/.rev_map.{snip} ...
...
Done rebuilding .git/svn/refs/remotes/git-svn/.rev_map.{snip}
Path: .
...and then regular git svn info output
 0
Author: mash,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-08-01 15:58:45