仅将某些 SVN 修订版从一个存储库复制到另一个存储库

发布于 2024-09-07 05:32:29 字数 845 浏览 6 评论 0原文

我在 Linux 服务器上运行 SVN 服务器。我要出城一周,去某个无法访问互联网的地方,因此无法访问 SVN。

因此,我试图弄清楚如何在我的笔记本电脑上拍摄存储库的快照,然后当我回来时将新修订版本合并回现有存储库...

  • 我的笔记本电脑运行 Windows 7,所以首先,我认为 VisualSVN Server 可能是我在本地运行的服务器。

  • 我应该能够转储我当前的存储库,然后将其加载到我的笔记本电脑上的新存储库

  • <但我不确定的是,我什么时候从城外回来。我将在我的笔记本电脑上的 SVN 服务器上保存所有这些新修订。我如何转储然后仅将这些新修订加载到我的 Linux 服务器上的存储库中?

  • 如果我使用 >svnadmin dump --revision 50:75 (假设修订版 50 到 75 代表我在笔记本电脑上所做的新修订版),我可以简单地将该转储文件加载到我现有的文件中吗?我的 Linux 服务器上有存储库吗?有那么容易吗?我知道有一些与存储库 UUID 有关的内容可能会导致一些问题...

  • 还有一点需要注意的是,我是目前唯一对此 SVN 存储库做出贡献的开发人员。因此不需要合并代码。

更新

我不知道我可以简单地使用 file:/// 在本地访问存储库。因此,这可能比必须运行 VisualSVN Server 效果更好。然而,主要问题仍然存在:如何将新修订版从一个存储库转移到另一个存储库?

I run an SVN server on a linux server. I'm going out of town for a week somewhere with no internet access, and therefore no SVN access.

So I'm trying to figure out how to take a snapshot of the repository with me on my laptop, and then merge the new revisions back into the existing repository when I get back...

  • My laptop runs Windows 7, so first off, I think that VisualSVN Server is probably the server I'll run locally.

  • I should be able to dump my current repository, and then load it into a new repository on my laptop

  • But what I'm not sure about, is when I get back from out of town. I'll have all these new revisions on the SVN server on my laptop. How do I dump and then load only these new revisions into the repository on my linux server?

  • If I use >svnadmin dump --revision 50:75 (assuming revisions 50 thru 75 represent the new revisions I made on my laptop), can I simply load that dump file into my existing repository on my linux server? Is it that easy? I know there is some stuff with regards to repository UUIDs that might cause some issues...

  • One more note, I'm the only developer contributing to this SVN repository at the moment. So no code merging will be required.

UPDATE

I wasn't aware that I could access a repository locally simply using file:///. So that will probably work better than having to run VisualSVN Server. However, the primary question still remains: How do I get the new revisions from one repository to another?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

遮了一弯 2024-09-14 05:32:29

如果您是唯一的开发人员,也许您可​​以随身携带存储库。

在您离开时使用 file:/// 协议访问它,然后在您返回时将其放回到服务器上。 。 。

If you're the only developer, perhaps you could just take the repository with you.

Access it with the file:/// protocol while you're away, then put it back on the server when you return. . .

我不会写诗 2024-09-14 05:32:29

要从存储库中提取一组修订(nn 到 mm):

svnadmin dump --incremental -r nn:mm /path/to/repository > /path/to/dumpfile.svn

--incremental 选项允许您合并这组更改,而无需在导入时引入整个基线。

要将这些修订应用到存储库:

svnadmin load --ignore-uuid /path/to/repository < /path/to/dumpfile.svn

--ignore-uuid 选项允许导入从源存储库中删除 uuid 信息。

我会将此操作限制为具有共同修订继承的存储库,否则加载可能会失败。

To extract a set of revisions (nn to mm) from a repository:

svnadmin dump --incremental -r nn:mm /path/to/repository > /path/to/dumpfile.svn

The --incremental option allows you to merge this set of changes without bringing the entire baseline along with the import.

To apply those revisions to a repository:

svnadmin load --ignore-uuid /path/to/repository < /path/to/dumpfile.svn

The --ignore-uuid option allows the import to strip out uuid information from the source repository.

I would restrict this operation to repositories with a common revision heritage otherwise the load would probably fail.

你曾走过我的故事 2024-09-14 05:32:29

我建议在本地工作副本之上创建一个 git 或 Mercurial 本地存储库。

您可以将 .svn 文件夹和工件添加到 .hgignore 或 .gitignore 文件中以保持存储库干净,然后当您返回时,您可以对更改进行 svn 提交,或者如果您想要更喜欢这样做当你在旅途中签入 Mercurial/git 时,分阶段提交回颠覆的每个重要工作单元。

这两个存储库都使您可以轻松地将自己的本地工作副本保留在修订控制中,并轻松同步到历史记录中定义的签入点。

I would recommend making a git or mercurial local repository right on top of your local working copy.

You can add the .svn folders and the artifacts to the .hgignore or the .gitignore files to keep the repository clean, and then when you get back you can just do an svn commit of the changes, or if you want to get fancy do a staged commit back to subversion for every significant unit of work you checked into mercurial/git while you were on the road.

Both of those repos make it really easy to keep your own local working copy in revision control, and to easily sync to defined check in points in the history.

爱的那么颓废 2024-09-14 05:32:29

一种简单的方法是简单地检查你需要的一切,工作一些,玩一些,再工作一些,享受周围的环境,结识一些新朋友,再工作一些,然后当你回来时,做出承诺。如果没有做出承诺,一周似乎是很长的时间,但是当我离开时,尤其是那些非互联网的地方,我往往不会做我想要做的那么多工作。

如果您需要时不时拍摄“保存游戏”快照,WinZip 可以提供帮助。

A non-sophisticated approach would be to simply checkout everything you'll need, work some, play some, work some more, enjoy your surroundings, meet some new people, work some more, and then when you get back, commit. A week can seem like a long time to go without committing, but when I'm away, especially those non-internet places, I tend to not do NEARLY as much work as I had intended.

WinZip can help if you need to take a "save game" snapshot now and then.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文