English 中文(简体)
Subversion - Always resolve conflicts using mine for a set of files
原标题:
  • 时间:2010-01-04 20:48:47
  •  标签:
  • svn
  • conflict

We ve got a sizable chunk of auto-generated code that we keep around in subversion. Sometimes I m working on a piece of the generator while another coworker is working on a different piece of the generator. One of us checks in, and the other gets the latest. Now our generated code is in conflict. Because it s generated it ll be correct after the next time the generator is run, but subversion has flagged it as conflicted. It s a bit of a pain to go around, find these conflicts, verify that they are indeed due to generated code, and then manually "accept mine" to clear the conflicts.

Is there a way to have subversion recognize that for all the files in a given folder I just want to automatically accept mine? I d like to stay away from dedicated batch files, as most of the office uses Tortoise SVN and I m looking for a solution that everyone can use.

最佳回答

You should probably avoid having generated files in SVN in the first place - as you can tell, this is a source of conflicts. Better to have them be ignored, and build them as part of the build.

But as to your question, you should be able to use the --accept mine-full option to svn update, which makes conflicts automatically resolve to mine. See the Subversion manual and man pages for more details.

问题回答

svn update --accept [postpone|base|mine-full|theirs-full|edit|launch]

That should be

svn resolve --accept [postpone|base|mine-full|theirs-full|edit|launch]

No?





相关问题
Best practices for Subversion and Visual Studio projects

I ve recently started working on various C# projects in Visual Studio as part of a plan for a large scale system that will be used to replace our current system that s built from a cobbling-together ...

Changing username in SVN+SSH URI on the fly in working copy

I am using SVN+SSH to check out a working copy of repository from an SVN server on which all developers are members of a developer group and have full read/write permissions on the repository ...

ASP.NET MVC: How should it work with subversion?

So, I have an asp.net mvc app that is being worked on by multiple developers in differing capacities. This is our first time working on a mvc app and my first time working with .NET. Our app does not ...

How to search for file in subversion server?

Is there a way to search for a file in a subversion repository? Something similar to Unix find command, with which I can find the location of a file in a repository. I know there is svn list, but ...

热门标签