Code

Improve tree_entry_interesting() handling code
[git.git] / Documentation / git-svn.txt
index 4cdca0d87435b4995e5c051750a6dd02720006f8..0ade2ce54efee3cd2241fc7e3009909eef5cf8bb 100644 (file)
@@ -56,12 +56,16 @@ COMMANDS
        as well, they take precedence.
 --no-metadata;;
        Set the 'noMetadata' option in the [svn-remote] config.
        as well, they take precedence.
 --no-metadata;;
        Set the 'noMetadata' option in the [svn-remote] config.
+       This option is not recommended, please read the 'svn.noMetadata'
+       section of this manpage before using this option.
 --use-svm-props;;
        Set the 'useSvmProps' option in the [svn-remote] config.
 --use-svnsync-props;;
        Set the 'useSvnsyncProps' option in the [svn-remote] config.
 --rewrite-root=<URL>;;
        Set the 'rewriteRoot' option in the [svn-remote] config.
 --use-svm-props;;
        Set the 'useSvmProps' option in the [svn-remote] config.
 --use-svnsync-props;;
        Set the 'useSvnsyncProps' option in the [svn-remote] config.
 --rewrite-root=<URL>;;
        Set the 'rewriteRoot' option in the [svn-remote] config.
+--rewrite-uuid=<UUID>;;
+       Set the 'rewriteUUID' option in the [svn-remote] config.
 --username=<USER>;;
        For transports that SVN handles authentication for (http,
        https, and plain svn), specify the username.  For other
 --username=<USER>;;
        For transports that SVN handles authentication for (http,
        https, and plain svn), specify the username.  For other
@@ -239,6 +243,19 @@ discouraged.
 where <name> is the name of the SVN repository as specified by the -R option to
 'init' (or "svn" by default).
 
 where <name> is the name of the SVN repository as specified by the -R option to
 'init' (or "svn" by default).
 
+--username;;
+       Specify the SVN username to perform the commit as.  This option overrides
+       the 'username' configuration property.
+
+--commit-url;;
+       Use the specified URL to connect to the destination Subversion
+       repository.  This is useful in cases where the source SVN
+       repository is read-only.  This option overrides configuration
+       property 'commiturl'.
++
+       git config --get-all svn-remote.<name>.commiturl
++
+
 'tag'::
        Create a tag in the SVN repository. This is a shorthand for
        'branch -t'.
 'tag'::
        Create a tag in the SVN repository. This is a shorthand for
        'branch -t'.
@@ -421,7 +438,7 @@ git rebase --onto remotes/git-svn A^ master
 OPTIONS
 -------
 
 OPTIONS
 -------
 
---shared[={false|true|umask|group|all|world|everybody}]::
+--shared[=(false|true|umask|group|all|world|everybody)]::
 --template=<template_directory>::
        Only used with the 'init' command.
        These are passed directly to 'git init'.
 --template=<template_directory>::
        Only used with the 'init' command.
        These are passed directly to 'git init'.
@@ -582,13 +599,22 @@ svn.noMetadata::
 svn-remote.<name>.noMetadata::
        This gets rid of the 'git-svn-id:' lines at the end of every commit.
 +
 svn-remote.<name>.noMetadata::
        This gets rid of the 'git-svn-id:' lines at the end of every commit.
 +
-If you lose your .git/svn/git-svn/.rev_db file, 'git svn' will not
-be able to rebuild it and you won't be able to fetch again,
-either.  This is fine for one-shot imports.
+This option can only be used for one-shot imports as 'git svn'
+will not be able to fetch again without metadata. Additionally,
+if you lose your .git/svn/**/.rev_map.* files, 'git svn' will not
+be able to rebuild them.
 +
 The 'git svn log' command will not work on repositories using
 this, either.  Using this conflicts with the 'useSvmProps'
 option for (hopefully) obvious reasons.
 +
 The 'git svn log' command will not work on repositories using
 this, either.  Using this conflicts with the 'useSvmProps'
 option for (hopefully) obvious reasons.
++
+This option is NOT recommended as it makes it difficult to track down
+old references to SVN revision numbers in existing documentation, bug
+reports and archives.  If you plan to eventually migrate from SVN to git
+and are certain about dropping SVN history, consider
+linkgit:git-filter-branch[1] instead.  filter-branch also allows
+reformatting of metadata for ease-of-reading and rewriting authorship
+info for non-"svn.authorsFile" users.
 
 svn.useSvmProps::
 svn-remote.<name>.useSvmProps::
 
 svn.useSvmProps::
 svn-remote.<name>.useSvmProps::
@@ -616,6 +642,12 @@ svn-remote.<name>.rewriteRoot::
        the repository with a public http:// or svn:// URL in the
        metadata so users of it will see the public URL.
 
        the repository with a public http:// or svn:// URL in the
        metadata so users of it will see the public URL.
 
+svn-remote.<name>.rewriteUUID::
+       Similar to the useSvmProps option; this is for users who need
+       to remap the UUID manually. This may be useful in situations
+       where the original UUID is not available via either useSvmProps
+       or useSvnsyncProps.
+
 svn.brokenSymlinkWorkaround::
        This disables potentially expensive checks to workaround
        broken symlinks checked into SVN by broken clients.  Set this
 svn.brokenSymlinkWorkaround::
        This disables potentially expensive checks to workaround
        broken symlinks checked into SVN by broken clients.  Set this
@@ -625,13 +657,20 @@ svn.brokenSymlinkWorkaround::
        revision fetched.  If unset, 'git svn' assumes this option to
        be "true".
 
        revision fetched.  If unset, 'git svn' assumes this option to
        be "true".
 
-Since the noMetadata, rewriteRoot, useSvnsyncProps and useSvmProps
+svn.pathnameencoding::
+       This instructs git svn to recode pathnames to a given encoding.
+       It can be used by windows users and by those who work in non-utf8
+       locales to avoid corrupted file names with non-ASCII characters.
+       Valid encodings are the ones supported by Perl's Encode module.
+
+Since the noMetadata, rewriteRoot, rewriteUUID, useSvnsyncProps and useSvmProps
 options all affect the metadata generated and used by 'git svn'; they
 *must* be set in the configuration file before any history is imported
 and these settings should never be changed once they are set.
 
 options all affect the metadata generated and used by 'git svn'; they
 *must* be set in the configuration file before any history is imported
 and these settings should never be changed once they are set.
 
-Additionally, only one of these four options can be used per-svn-remote
-section because they affect the 'git-svn-id:' metadata line.
+Additionally, only one of these options can be used per svn-remote
+section because they affect the 'git-svn-id:' metadata line, except
+for rewriteRoot and rewriteUUID which can be used together.
 
 
 BASIC EXAMPLES
 
 
 BASIC EXAMPLES
@@ -690,8 +729,11 @@ have each person clone that repository with 'git clone':
        cd project
        git init
        git remote add origin server:/pub/project
        cd project
        git init
        git remote add origin server:/pub/project
-       git config --add remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
+       git config --replace-all remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
        git fetch
        git fetch
+# Prevent fetch/pull from remote git server in the future,
+# we only want to use git svn for future updates
+       git config --remove-section remote.origin
 # Create a local branch from one of the branches just fetched
        git checkout -b master FETCH_HEAD
 # Initialize 'git svn' locally (be sure to use the same URL and -T/-b/-t options as were used on server)
 # Create a local branch from one of the branches just fetched
        git checkout -b master FETCH_HEAD
 # Initialize 'git svn' locally (be sure to use the same URL and -T/-b/-t options as were used on server)
@@ -816,6 +858,22 @@ independent path component (surrounded by '/' or EOL).   This
 type of configuration is not automatically created by 'init' and
 should be manually entered with a text-editor or using 'git config'.
 
 type of configuration is not automatically created by 'init' and
 should be manually entered with a text-editor or using 'git config'.
 
+It is also possible to fetch a subset of branches or tags by using a
+comma-separated list of names within braces. For example:
+
+------------------------------------------------------------------------
+[svn-remote "huge-project"]
+       url = http://server.org/svn
+       fetch = trunk/src:refs/remotes/trunk
+       branches = branches/{red,green}/src:refs/remotes/branches/*
+       tags = tags/{1.0,2.0}/src:refs/remotes/tags/*
+------------------------------------------------------------------------
+
+Note that git-svn keeps track of the highest revision in which a branch
+or tag has appeared. If the subset of branches or tags is changed after
+fetching, then .git/svn/.metadata must be manually edited to remove (or
+reset) branches-maxRev and/or tags-maxRev as appropriate.
+
 SEE ALSO
 --------
 linkgit:git-rebase[1]
 SEE ALSO
 --------
 linkgit:git-rebase[1]