简体   繁体   中英

Deleting svn branch of name “svn:”

Someone at my company accidentally created a new branch called "svn:" (with the colon), and now none of us can seem to be able to delete it. TortoiseSVN gives us errors in Windows, and CLI svn on OSX says the commit failed

svn: E200012: Commit failed (details follow):
svn: E200012: system('/Users/user-name/Desktop/svn_log.txt svn-commit.tmp') returned 32512
svn: E200012: Your commit message was left in a temporary file:
svn: E200012:    '/Users/user-name/Desktop/app/svn-commit.tmp'

with the message in svn-commit.tmp:

--This line, and those below, will be ignored--

D    branches/svn:

Can anyone tell me how we can delete this branch?

EDIT: TortoiseSVN gives this error when I try to browse the branch, which could be the cause of the problem, but still doesn't tell me how to fix it...

在此处输入图片说明

Using SVN 1.9.3 on Windows 10, I cannot reproduce your problem:

> svnadmin create C:\path\to\repo

> svn co "file:///C:/path/to/repo" wc
A    wc\branches
A    wc\tags
A    wc\trunk
Checked out revision 1.

> svn mkdir "file:///C:/path/to/repo/branches/svn:" --parents -m "Creating Branch"
Committing transaction...
Committed revision 2.

> svn ls "file:///C:/path/to/repo/branches" -v
  2 username                   Mar 11 14:00 ./
  2 username                   Mar 11 14:00 svn:/

> svn delete "file:///C:/path/to/repo/branches/svn:" -m "Deleting Branch"
Committing transaction...
Committed revision 3.

Add more information about your environment, and the command you're using to delete the directory.

Does renaming helps? Anyway, if nothing works and you want to get rid of that commit, you can svnadmin dump and svnadmin load excluding the problematic revision. To do that you will need:

  1. svnadmin dump -r0:xx --incremental repositoryURI > 0-xx.dump xx is the problematic revision
  2. svnadmin dump -ryy:zz --incremental repositoryURI > yy-zz.dump yy is the xx revision+1 and zz is the last revision in the repo.
  3. Create new repository on the server.
  4. svnadmin load repository < 0-xx.dump
  5. svnadmin load repository < yy-zz.dump

This is a dangerous procedure though. Make sure to backup the repository before trying to do this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM