SVN的“local edit, incoming delete upon update”问题

本文讨论了在使用SVN进行版本控制时遇到的一个常见问题:误删目录后的解决方法。通过使用svnrevert命令并添加-R参数,可以成功恢复误删的目录,并在后续操作中正确执行删除操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

今天svn更新的时候,删了一个目录,出现了这个问题。在网上查,说是:svn revert file

但是这个命令只能解决一个文件的local edit问题。我这是目录出错。看了一下svn的help:

revert: Restore pristine working copy file (undo most local edits).

usage: revert PATH...

  Note:  this subcommand does not require network access, and resolves  any conflicted states.



Valid options:

  --targets ARG            : pass contents of file ARG as additional args

  -R [--recursive]         : descend recursively, same as --depth=infinity

  --depth ARG              : limit operation by depth ARG ('empty', 'files',

                             'immediates', or 'infinity')

  -q [--quiet]             : print nothing, or only summary information

  --changelist [--cl] ARG  : operate only on members of changelist ARG



Global options:

  --username ARG           : specify a username ARG

  --password ARG           : specify a password ARG

  --no-auth-cache          : do not cache authentication tokens

  --non-interactive        : do no interactive prompting

  --trust-server-cert      : accept SSL server certificates from unknown

                             certificate authorities without prompting (but only

                             with '--non-interactive')

  --config-dir ARG         : read user configuration files from directory ARG

  --config-option ARG      : set user configuration option in the format:

                                 FILE:SECTION:OPTION=[VALUE]

                             For example:

                                 servers:global:http-library=serf

所以在其后面加上-R的参数。

例如:svn revert dir -R  就可以成功恢复文件,之后再svn update 即可将要删的文件夹删除。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

奔跑滴小羊

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值