从SVN更新时是否可以始终(强制)覆盖本地更改?忽略冲突? [英] Is it possible to always (force) overwrite local changes when updating from SVN? Ignore conflicts?

查看:14049
本文介绍了从SVN更新时是否可以始终(强制)覆盖本地更改?忽略冲突?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我应该在我自己的分支上工作,但是我们两个人在一个项目的同一个分支。其中一个Dev做了一个提交,我只是想更新我的本地副本与最新的SVN。运行'svn update'我得到这个输出:

 恢复'index.html'
U somescript.php
在file.xml中发现冲突。
选择:(p)postpone,(df)diff-full,(e)edit,
(mc)mine-conflict,(tc)theirs-conflict,
选项:

是否有覆盖我的本地更改并获取最新文件的选项/从颠覆和忽视所有的冲突?



我看过Stack上的一些其他帖子,他们都不回答这个问题。他们说要删除项目和签出再次,我想如果这是最好的方式,所以是它...但想要更多的细节,为什么我不能强制更新。
感谢



编辑:



所以我选择了'显示所有选项':



(s)显示所有选项:s

 编辑器中合并的文件
(df)diff-full - 显示对合并文件所做的所有更改
(r)resolved - 接受合并的文件版本

冲突 - 显示所有冲突(忽略合并的版本)
(mc)mine-conflict - 接受我的版本的所有冲突(同)
(tc)

(mf)mine-full - 接受我的版本的整个文件(即使是非冲突)
(tf)theirs-full - 接受他们的版本的整个文件b
(p)postpone - 标记冲突以便以后解决
(l)启动 - 启动外部工具来解决冲突
(s)显示所有 - 显示此列表



我想我应该使用选项'tc'?

解决方案

如果你真的想要一个HEAD的副本(repos的最新版本),那么你应该

  svn revert -R< path> //丢弃路径中的所有更改(递归)
svn update //获取所有文件的最新版本(递归)

就是这样。



请注意,自上次提交以来,所有更改都会丢失。



EDIT: -R< path> / 10772060/79536> Isu_guy answer ,以帮助读者找到一个完整的答案


I know I should be working on a branch of my own but a couple of us are on the same branch of a project. One of the Dev's made a commit and I just wanted to update my local copy with the latest from SVN. Running 'svn update' I get this output:

Restored 'index.html'
U    somescript.php
Conflict discovered in file.xml'.
Select: (p) postpone, (df) diff-full, (e) edit,
        (mc) mine-conflict, (tc) theirs-conflict,
        (s) show all options: 

Is there an option/way to overwrite my local changes and get the latest file(s) from subversion and ignore all the conflicts?

I've looked at some of the other posts on Stack and they all don't answer the question. They say to delete the project and checkout again, which I guess if that's the best way so be it... But wanting more details as to why I can't force an update. Thanks

EDIT:

So I selected s 'show all options':

(s) show all options: s

  (e)  edit             - change merged file in an editor
  (df) diff-full        - show all changes made to merged file
  (r)  resolved         - accept merged version of file

  (dc) display-conflict - show all conflicts (ignoring merged version)
  (mc) mine-conflict    - accept my version for all conflicts (same)
  (tc) theirs-conflict  - accept their version for all conflicts (same)

  (mf) mine-full        - accept my version of entire file (even non-conflicts)
  (tf) theirs-full      - accept their version of entire file (same)

  (p)  postpone         - mark the conflict to be resolved later
  (l)  launch           - launch external tool to resolve conflict
  (s)  show all         - show this list

I guess I should go with option 'tc'?

解决方案

If you really want a copy of HEAD (the latest revision in repos), then you should

svn revert -R <path> // discard all your changes inside path (recursive)
svn update           // get latest revision of all files (recursive)

That's it.

Beware that you will lose ALL your changes since your last 'commit'.

EDIT: added the -R <path> from Isu_guy answer for the sake of completeness and helping readers find a single full answer

这篇关于从SVN更新时是否可以始终(强制)覆盖本地更改?忽略冲突?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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