2010-02-08 7 views
2

J'ai créé mon propre dépôt SVN localement. Puis utilisé:Subversion: Migrer du cloud SVN repo au dépôt local SVN ... histoire perdue?

svnsync init DEST SRC 
svnsync sync DEST 
svnsync checkout DEST 

La caisse a travaillé avec succès et j'ai tous les fichiers du repo SVN original et qui est certainement une bonne chose!

Mais quand je l'ai fait:

svn log 

Tout ce que je reçois est le message:

svn: Item is not readable 

Est-ce que le fichier n'ont une histoire?

Ai-je migré le dépôt SVN de manière incorrecte?

J'ai suivi les instructions que j'ai trouvé mieux que je pouvais ...


P.S. FWIW voici les commandes que j'Exécuté sous la forme d'un script shell bash:

#!/bin/bash 
#=============================================================================== 
#= Function: Script to migrate an old svn repository to a new svn repository 
#= Purpose: The process is kinda tricky... need to write it down to prevent 
#=   reinventing the wheel 
#=============================================================================== 

# User input parameters for this script 
DEFAULT_REPO_PATH = "srv/svn/repos"; 
NEW_REPO_NAME = "name"; 
SRC_REPOSITORY_URL = "https://example.googlecode.com/svn"; 

# Create the folder for all your svn repositories before creating the repository 
sudo mkdir --parents /$(DEFAULT_REPO_PATH)/$(NEW_REPO_NAME)/ 

# Create the new repository 
sudo svnadmin create /$(DEFAULT_REPO_PATH)/$(NEW_REPO_NAME)/ 

# -- The new repository is not ready for receiving the old repository. 
# -- There are a number of actions that need to be completed before you can 
# load the old repository onto the new repository. 

# 1.) Setup the pre-revprop-change hook 
cd /$(DEFAULT_REPO_PATH)/$(NEW_REPO_NAME)/hooks/ 
sudo touch pre-revprop-change 
sudo chmod +x pre-revprop-change 

# 2.) Eventually we are calling svnsync init $(SRC_URL) $(SRC_URL) but 
#  the new repository is not accessible via any URL because there is 
#  no server setup 
#  
#  Example URLS: 
#  -- svn://$(SERVER)/$(SRC_REPO_NAME) 
#  -- ssh+svn://$(SERVER)/$(SRC_REPO_NAME) 
#  -- https://$(SERVER)/$(SRC_REPO_NAME) 
# 
#  To make the new repository accesible via URL I will setup an svn 
#  server using the built in "svnserve" command. 
# 
#  Svnserve command line switches: 
#  -d, --daemon 
#   Causes svnserve to run in daemon mode. svnserve backgrounds 
#   itself and accepts and serves TCP/IP connections on the svn port 
#   (3690, by default). 
#  -r root, --root=root 
#   Sets the virtual root for repositories served by svnserve. The 
#   pathname in URLs provided by the client will be interpreted rela‐ 
#   tive to this root, and will not be allowed to escape this root. 
svnserve -d -r /$(DEFAULT_REPO_PATH)/ 

# 3.) Almost ready, the last step is to give write permission to the new repository 
#  
#  By default a new repository is read only. 
# 
# 3.1) To give write permission you have to edit both the 
# 3.2) "svnserve.conf" and 
# 3.3) "passwd" file 
#  /$(DEFAULT_REPO_PATH)/$(NEW_REPO_NAME)/conf/svnserve.conf file 
sudo vim /$(DEFAULT_REPO_PATH)/$(NEW_REPO_NAME)/conf/svnserve.conf 
# 3.4) uncomment: "anon-access = read" 
# 3.5) uncomment: "auth-access = write" 
# 3.6) uncomment: "authz-db = authz" 
sudo vim /$(DEFAULT_REPO_PATH)/$(NEW_REPO_NAME)/conf/passwd 
# 3.9) add a line for the new authorized user 
#  " 
#  $(USER1) = $(USER1_PASSWD) 
#  " 
# 3.10) add a line for the authorization permissions 
#   (groups... like anonymous or authorized get... or set up 
#   specific permissions for specific users or groups) 
#   " 
#   [/] 
#   $authenticated = rw 
#   " 
# 3.11) You have to enable the new svnserve settings by restarting the svn 
#   server. To do this you "kill" the svn server. 
sudo kill $(PID_OF_SVNSERVE) 
# 3.12) Restart the svn server by calling svnserve again 
svnserve -d -r /$(DEFAULT_REPO_PATH)/ 

# 4.) Synchronize the new repository with the old repository 
# NOTE: It took about 0.5 seconds for each revision... I only had about 
sudo svnsync init svn://$(DEFAULT_REPO_PATH)/$(NEW_REPO_NAME) $(SRC_REPOSITORY_URL) 
sudo svnsync sync svn://$(DEFAULT_REPO_PATH)/$(NEW_REPO_NAME) 

Répondre

1

Avez-vous configuré/migrer les paramètres d'autorisation?

+0

Puis-je obtenir un lien sur la façon de "configurer/migrer les paramètres d'autorisation"? –

2

pour SVN problème de journal: Vous avez une mauvaise configuration (ou Subversion a un bug :)).

Quoi qu'il en soit, il peut être fixé en changeant dans "svnserve.conf" fichier la ligne:

[general] 
anon-access = none 

Une autre solution pour changer uniquement le fichier "auzh" la ligne:

[/] 
* = r 

Cette solution est donné anonyme lit votre référentiel qui n'est pas bon. Si vous devez utiliser uniquement le référentiel d'autorisation, utilisez la première solution. (a été testé avec svn 1.6.17, mais pense qu'il ne dépend pas de la version)

Questions connexes