SVN存储库移动后的git-svn? [英] git-svn after an SVN repository is moved?

查看:67
本文介绍了SVN存储库移动后的git-svn?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们最近将SVN服务器从一个数据中心移到了另一个数据中心,并且服务器的IP已经更改.我用svn switch --relocate old_url new_url更新了我的实际工作副本,这很高兴.

We recently moved our SVN server from one data center to another, and the IP of the server has changed. I used svn switch --relocate old_url new_url to update my actual working copy, and that was happy.

但是,我的大部分工作都是在本地git版本的存储库中进行的(显然是使用git-svn).移动SVN服务器后,我在.git/config中更新了存储库的URL,但是当我尝试使用dcommit时,出现此错误:

However, I do most of my work in a local git version of the repository (using git-svn, obviously). After moving the SVN server, I updated the URL for the repo in .git/config, but when I try to use dcommit, I receive this error:

Unable to determine upstream SVN information from HEAD history.
Perhaps the repository is empty. at /home/me/libexec/git-core/git-svn line 520.

我想念什么?

推荐答案

通常,这不是git-svn直接支持的.最大的障碍是git-svn使用"git-svn-id"(在每次提交的提交日志中可见)唯一地标识来自SVN的提交-SVN URL是此ID的一部分.如果URL更改,则几乎使所有现有历史记录无效.

In general, this isn't something that git-svn supports directly. The biggest hurdle is that git-svn uses the "git-svn-id" (visible in the commit log for each commit) to uniquely identify commits from SVN -- and the SVN URL is part of this ID. If the URL changes, it pretty much invalidates all of your existing history.

此处中描述了一些解决方法,看起来它们应该可以工作,但它们不是很简单,我自己也没有尝试过.

There are workarounds described here which look like they should work, but they aren't exactly simple and I haven't tried any of them myself.

这篇关于SVN存储库移动后的git-svn?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆