Create svn branch from working copy url

Using the SVN command line, how can I create a branch from the URL of my current working copy? (NOT from my local working copy, which may have local changes)

Look for a direct path without missing "svn info" to get the url.

+3
source share
3 answers

How about this?

svn copy ^/@HEAD <Branch URL>

EDIT

As branches, tags and connecting lines are just paths and completely arbitrary in SVN, I don’t think that you can accomplish what you are trying to do without creating a bit of creativity (for example, outside the built-in - in the SVN command). To accomplish what I think you want to do, you can use a bash script (assuming Mac / Linux):

#!/bin/bash

CURRENT_URL=$(svn info | grep ^URL | cut -d" " -f2)

svn copy $CURRENT_URL "^/branches/$1"

Using: svnbranch.sh newbranch

+1
source

svn copy <URL of existing URI> <New URL>

URL- "svn info".

SVN, URL-.

. "" - .

+1

Run `svn help copy 'and carefully read its output. I think the option can help.

+1
source

All Articles