Tortoise SVN合并存储库与工作副本

时间:2022-05-02 16:27:51

I've tried searching for answers to my problem but every thread starts talking about branches and trunks and I have no idea what they're talking about.

我已经尝试寻找我的问题的答案,但每个线程开始谈论分支和中继,我不知道他们在谈论什么。

I'm in a team of 2. We've started working on a single excel spreadsheet. I use SVN update before making my changes, however while I'm making changes, my team-mate also makes changes and commits them before I do.

我是一个2人团队。我们已经开始研究一个excel电子表格了。我在进行更改之前使用SVN更新,但是当我进行更改时,我的队友也会做出更改并在我做之前提交它们。

I was first told that I simply have to update again before I commit and it should merge my team-mate's changes with mine. However when I update the .xlsx file, nothing seems to happen. I open up my local copy again and it isn't showing my team-mates changes. I've tried using the merge option and clicked random things in numerous attempts but nothing works. Nothing I've tried will add my team-mates changes to my working copy. Every time I compare my working copy with the repository, the changes from both of us are all highlighted, but nothing I do seems to merge them together.

我第一次被告知在提交之前我必须再次更新,它应该将我的队友的变化与我的合并。但是,当我更新.xlsx文件时,似乎没有任何事情发生。我再次打开我的本地副本,它没有显示我的队友变化。我尝试过使用合并选项并在多次尝试中点击随机内容,但没有任何效果。我尝试过的任何内容都不会将我的队友变更添加到我的工作副本中。每次我将我的工作副本与存储库进行比较时,我们两个人的更改都会突出显示,但我没有做任何事情似乎将它们合并在一起。

The cells we modify in the spreadsheet are different ones, so we don't both make direct changes to the same cell. It should be a simple merge.

我们在电子表格中修改的单元格是不同的,因此我们不会对同一单元格进行直接更改。它应该是一个简单的合并。

This is driving me up the wall, it keeps saying "merge successful" or "update successful" but it isn't doing anything.

这让我起了作用,它一直说“合并成功”或“更新成功”,但它没有做任何事情。

2 个解决方案

#1


.xlsx files are not text-files (they are really zip-archives), don't expect merging of such files from Subversion in any case

.xlsx文件不是文本文件(它们实际上是zip存档),不要指望在任何情况下从Subversion合并这些文件

You can't have easy teamwork with Office's documents

您无法轻松配合Office的文档

#2


First of all, xlsx files are binary rather than textual so SVN cannot merge them very well. So two of you working on one such file at the same time will not work well even if nothing goes wrong.

首先,xlsx文件是二进制文件而不是文本文件,因此SVN无法很好地合并它们。因此,即使没有任何问题,你们两个同时在一个这样的文件上工作也不会很好。

As for why you never saw the changes, probably you still had the file with your changes open in Excel when you did your update, and Excel never prompted to load the new changes.

至于为什么你从未看过这些更改,可能在更新时你仍然在Excel中打开了你的更改文件,并且Excel从未提示加载新的更改。

To correct the immediate situation you can move your version of the file elsewhere, svn update to get the repository version back, and manually compare and resolve the differences.

要纠正当前情况,您可以将文件版本移动到其他位置,svn update以恢复存储库版本,并手动比较和解决差异。

In the future, since SVN is not suited well for merging this type of file, set the svn:needs-lock property on this file, and always be sure to svn lock it before editing to keep your coworkers from making changes at the same time.

将来,由于SVN不适合合并这种类型的文件,请在此文件上设置svn:needs-lock属性,并始终确保在编辑之前svn将其锁定,以防止同事同时进行更改。

If you need simultaneous editing capabilities, look into what cloud services Microsoft offers, or switch to Google Docs or similar.

如果您需要同时编辑功能,请查看Microsoft提供的云服务,或切换到Google Docs或类似服务。

#1


.xlsx files are not text-files (they are really zip-archives), don't expect merging of such files from Subversion in any case

.xlsx文件不是文本文件(它们实际上是zip存档),不要指望在任何情况下从Subversion合并这些文件

You can't have easy teamwork with Office's documents

您无法轻松配合Office的文档

#2


First of all, xlsx files are binary rather than textual so SVN cannot merge them very well. So two of you working on one such file at the same time will not work well even if nothing goes wrong.

首先,xlsx文件是二进制文件而不是文本文件,因此SVN无法很好地合并它们。因此,即使没有任何问题,你们两个同时在一个这样的文件上工作也不会很好。

As for why you never saw the changes, probably you still had the file with your changes open in Excel when you did your update, and Excel never prompted to load the new changes.

至于为什么你从未看过这些更改,可能在更新时你仍然在Excel中打开了你的更改文件,并且Excel从未提示加载新的更改。

To correct the immediate situation you can move your version of the file elsewhere, svn update to get the repository version back, and manually compare and resolve the differences.

要纠正当前情况,您可以将文件版本移动到其他位置,svn update以恢复存储库版本,并手动比较和解决差异。

In the future, since SVN is not suited well for merging this type of file, set the svn:needs-lock property on this file, and always be sure to svn lock it before editing to keep your coworkers from making changes at the same time.

将来,由于SVN不适合合并这种类型的文件,请在此文件上设置svn:needs-lock属性,并始终确保在编辑之前svn将其锁定,以防止同事同时进行更改。

If you need simultaneous editing capabilities, look into what cloud services Microsoft offers, or switch to Google Docs or similar.

如果您需要同时编辑功能,请查看Microsoft提供的云服务,或切换到Google Docs或类似服务。