From 2670ddce53b9061edf2fdcd912dd4736b53bb3fe Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 30 Sep 2008 01:01:34 +0200 Subject: Replace svn.foo.org with svn.example.com in git-svn docs (RFC 2606) foo.org is an existing domain, use RFC 2606 complying example.com instead as used in other docs as well. Signed-off-by: Michael Prokop Signed-off-by: Shawn O. Pearce --- Documentation/git-svn.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 1e644ca6dc..82d03b4ced 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -473,7 +473,7 @@ Tracking and contributing to the trunk of a Subversion-managed project: ------------------------------------------------------------------------ # Clone a repo (like git clone): - git svn clone http://svn.foo.org/project/trunk + git svn clone http://svn.example.com/project/trunk # Enter the newly cloned directory: cd trunk # You should be on master branch, double-check with git-branch @@ -495,7 +495,7 @@ Tracking and contributing to an entire Subversion-managed project ------------------------------------------------------------------------ # Clone a repo (like git clone): - git svn clone http://svn.foo.org/project -T trunk -b branches -t tags + git svn clone http://svn.example.com/project -T trunk -b branches -t tags # View all branches and tags you have cloned: git branch -r # Reset your master to trunk (or any other branch, replacing 'trunk' @@ -514,7 +514,7 @@ have each person clone that repository with 'git-clone': ------------------------------------------------------------------------ # Do the initial import on a server - ssh server "cd /pub && git svn clone http://svn.foo.org/project + ssh server "cd /pub && git svn clone http://svn.example.com/project # Clone locally - make sure the refs/remotes/ space matches the server mkdir project cd project @@ -523,7 +523,7 @@ have each person clone that repository with 'git-clone': git config --add remote.origin.fetch '+refs/remotes/*:refs/remotes/*' git fetch # Initialize git-svn locally (be sure to use the same URL and -T/-b/-t options as were used on server) - git svn init http://svn.foo.org/project + git svn init http://svn.example.com/project # Pull the latest changes from Subversion git svn rebase ------------------------------------------------------------------------ -- cgit v1.2.3 From 5de70efbd9236e44f122348ec2a1c2967d3bfde8 Mon Sep 17 00:00:00 2001 From: Florian Ragwitz Date: Sat, 4 Oct 2008 19:35:17 -0700 Subject: Add git-svn branch to allow branch creation in SVN repositories [ew: fixed a warning to stderr causing t9108 to fail] Signed-off-by: Florian Ragwitz Signed-off-by: Deskin Miller Acked-by: Eric Wong Signed-off-by: Shawn O. Pearce --- Documentation/git-svn.txt | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 82d03b4ced..84c8f3cde0 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -149,6 +149,22 @@ and have no uncommitted changes. is very strongly discouraged. -- +'branch':: + Create a branch in the SVN repository. + +-m;; +--message;; + Allows to specify the commit message. + +-t;; +--tag;; + Create a tag by using the tags_subdir instead of the branches_subdir + specified during git svn init. + +'tag':: + Create a tag in the SVN repository. This is a shorthand for + 'branch -t'. + 'log':: This should make it easy to look up svn log messages when svn users refer to -r/--revision numbers. @@ -372,7 +388,8 @@ Passed directly to 'git-rebase' when using 'dcommit' if a -n:: --dry-run:: -This can be used with the 'dcommit' and 'rebase' commands. +This can be used with the 'dcommit', 'rebase', 'branch' and 'tag' +commands. For 'dcommit', print out the series of git arguments that would show which diffs would be committed to SVN. @@ -381,6 +398,9 @@ For 'rebase', display the local branch associated with the upstream svn repository associated with the current branch and the URL of svn repository that will be fetched from. +For 'branch' and 'tag', display the urls that will be used for copying when +creating the branch or tag. + -- ADVANCED OPTIONS @@ -498,6 +518,8 @@ Tracking and contributing to an entire Subversion-managed project git svn clone http://svn.example.com/project -T trunk -b branches -t tags # View all branches and tags you have cloned: git branch -r +# Create a new branch in SVN + git svn branch waldo # Reset your master to trunk (or any other branch, replacing 'trunk' # with the appropriate name): git reset --hard remotes/trunk -- cgit v1.2.3 From 9e77353e0ea6e9e6d88ad1943570afb526d54a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kr=C3=BCger?= Date: Fri, 14 Nov 2008 18:45:14 +0100 Subject: Documentation: git-svn: fix example for centralized SVN clone MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The example that tells users how to centralize the effort of the initial git svn clone operation doesn't work properly. It uses rebase but that only works if HEAD exists. This adds one extra command to create a somewhat sensible HEAD that should work in all cases. Signed-off-by: Jan Krüger Acked-by: Eric Wong Signed-off-by: Junio C Hamano --- Documentation/git-svn.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 82d03b4ced..e160b99bdb 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -522,6 +522,8 @@ have each person clone that repository with 'git-clone': git remote add origin server:/pub/project git config --add remote.origin.fetch '+refs/remotes/*:refs/remotes/*' git fetch +# 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) git svn init http://svn.example.com/project # Pull the latest changes from Subversion -- cgit v1.2.3 From a0178ae2cfd79a1da5d7ddfacadb1e41560bb464 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Thu, 27 Nov 2008 08:32:01 +0100 Subject: Fix typos in the documentation. Signed-off-by: Ralf Wildenhues Signed-off-by: Junio C Hamano --- Documentation/git-svn.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index e160b99bdb..5d6d30f764 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -109,7 +109,7 @@ COMMANDS This works similarly to `svn update` or 'git-pull' except that it preserves linear history with 'git-rebase' instead of -'git-merge' for ease of dcommiting with 'git-svn'. +'git-merge' for ease of dcommitting with 'git-svn'. This accepts all options that 'git-svn fetch' and 'git-rebase' accept. However, '--fetch-all' only fetches from the current -- cgit v1.2.3 From e82f0d73f02e89a95d9477911774d314f70f1063 Mon Sep 17 00:00:00 2001 From: Pete Harlan Date: Sat, 17 Jan 2009 20:10:14 -0800 Subject: git-svn: Add --localtime option to "fetch" By default git-svn stores timestamps of fetched commits in Subversion's UTC format. Passing --localtime to fetch will convert them to the timezone of the server on which git-svn is run. This makes the timestamps of a resulting "git log" agree with what "svn log" shows for the same repository. Signed-off-by: Pete Harlan Acked-by: Eric Wong --- Documentation/git-svn.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 8d0c421b80..63d2f5e962 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -92,6 +92,17 @@ COMMANDS .git/config file may be specified as an optional command-line argument. +--localtime;; + Store Git commit times in the local timezone instead of UTC. This + makes 'git-log' (even without --date=local) show the same times + that `svn log` would in the local timezone. + +This doesn't interfere with interoperating with the Subversion +repository you cloned from, but if you wish for your local Git +repository to be able to interoperate with someone else's local Git +repository, either don't use this option or you should both use it in +the same local timezone. + 'clone':: Runs 'init' and 'fetch'. It will automatically create a directory based on the basename of the URL passed to it; -- cgit v1.2.3 From 6076b843a0a15d344f367ac46645eb864085477c Mon Sep 17 00:00:00 2001 From: "Vitaly \\\"_Vi\\\" Shukela" Date: Mon, 26 Jan 2009 00:21:41 +0200 Subject: git-svn: documented --ignore-paths Documented --ignore-paths option of git-svn to inform users about the feature and provide some examples. Signed-off-by: Vitaly "_Vi" Shukela Acked-by: Eric Wong [ew: trailing whitespace removed] --- Documentation/git-svn.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 63d2f5e962..7b654f7928 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -103,6 +103,19 @@ repository to be able to interoperate with someone else's local Git repository, either don't use this option or you should both use it in the same local timezone. +--ignore-paths=;; + This allows one to specify Perl regular expression that will + cause skipping of all matching paths from checkout from SVN. + Examples: + + --ignore-paths="^doc" - skip "doc*" directory for every fetch. + + --ignore-paths="^[^/]+/(?:branches|tags)" - skip "branches" + and "tags" of first level directories. + + Regular expression is not persistent, you should specify + it every time when fetching. + 'clone':: Runs 'init' and 'fetch'. It will automatically create a directory based on the basename of the URL passed to it; -- cgit v1.2.3 From 4c58a7111d9fb4f62ca041fc73e8aec0a2f9c800 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 31 Jan 2009 17:31:12 -0800 Subject: git-svn: allow disabling expensive broken symlink checks Since dbc6c74d0858d77e61e092a48d467e725211f8e9, git-svn has had an expensive check for broken symlinks that exist in some repositories. This leads to a heavy performance hit on repositories with many empty blobs that are not supposed to be symlinks. The workaround is enabled by default; and may be disabled via: git config svn.brokenSymlinkWorkaround false Reported by Markus Heidelberg. Signed-off-by: Eric Wong --- Documentation/git-svn.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 7b654f7928..3d456545d7 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -499,6 +499,14 @@ svn-remote..rewriteRoot:: the repository with a public http:// or svn:// URL in the metadata so users of it will see the public URL. +svn.brokenSymlinkWorkaround:: +This disables potentially expensive checks to workaround broken symlinks +checked into SVN by broken clients. Set this option to "false" if you +track a SVN repository with many empty blobs that are not symlinks. +This option may be changed while "git-svn" is running and take effect on +the next revision fetched. If unset, git-svn assumes this option to be +"true". + -- Since the noMetadata, rewriteRoot, useSvnsyncProps and useSvmProps -- cgit v1.2.3 From 0df84059d4127ed06e040998ec0e6ce6f61d3d1f Mon Sep 17 00:00:00 2001 From: Peter Oberndorfer Date: Mon, 23 Feb 2009 12:02:53 +0100 Subject: git-svn: read the dcommit url from the config file on a per remote basis The commit url for dcommit is determined in the following order: commandline option --commit-url svn.commiturl svn-remote..commiturl svn-remote..url Signed-off-by: Peter Oberndorfer Acked-by: Eric Wong --- Documentation/git-svn.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 3d456545d7..cda3389331 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -169,6 +169,10 @@ and have no uncommitted changes. reused if a user is later given access to an alternate transport method (e.g. `svn+ssh://` or `https://`) for commit. +config key: svn-remote..commiturl + +config key: svn.commiturl (overwrites all svn-remote..commiturl options) + Using this option for any other purpose (don't ask) is very strongly discouraged. -- -- cgit v1.2.3 From 49750f30767b3eb4683e8d2f4d742354dd5d03d3 Mon Sep 17 00:00:00 2001 From: Simon Arlott Date: Mon, 30 Mar 2009 19:31:41 +0100 Subject: git-svn: add a double quiet option to hide git commits People may expect/prefer -q to still show git commits, so this change allows a second -q to hide them. Signed-off-by: Michael Poole Signed-off-by: Simon Arlott Acked-by: Eric Wong --- Documentation/git-svn.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index cda3389331..8163a19843 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -385,7 +385,8 @@ config key: svn.authorsfile -q:: --quiet:: - Make 'git-svn' less verbose. + Make 'git-svn' less verbose. Specify a second time to make it + even less verbose. --repack[=]:: --repack-flags=:: -- cgit v1.2.3 From 0e5e69a355b7bdd1af6ca33ac7ee35299bda368e Mon Sep 17 00:00:00 2001 From: "Wesley J. Landaker" Date: Wed, 1 Apr 2009 16:05:01 -0600 Subject: Documentation: git-svn: fix trunk/fetch svn-remote key typo Fix the git-svn documentation svn-remote example section talking about tags and branches by using the proper key "fetch" instead of "trunk". Using "trunk" actually might be nice, but it doesn't currently work. The fetch line for the trunk was also reordered to be at the top of the list, since most people think about the trunk/tags/branches trio in that logical order. Signed-off-by: Wesley J. Landaker Acked-by: Eric Wong Signed-off-by: Junio C Hamano --- Documentation/git-svn.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 8163a19843..b7b1af813d 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -673,9 +673,9 @@ listed below are allowed: ------------------------------------------------------------------------ [svn-remote "project-a"] url = http://server.org/svn + fetch = trunk/project-a:refs/remotes/project-a/trunk branches = branches/*/project-a:refs/remotes/project-a/branches/* tags = tags/*/project-a:refs/remotes/project-a/tags/* - trunk = trunk/project-a:refs/remotes/project-a/trunk ------------------------------------------------------------------------ Keep in mind that the '*' (asterisk) wildcard of the local ref -- cgit v1.2.3 From c2abd83fea0c332e907f5bc23bea4eeca091a86b Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Mon, 6 Apr 2009 16:37:59 -0400 Subject: git-svn: add fetch --parent option Signed-off-by: Jason Merrill Acked-By: Eric Wong --- Documentation/git-svn.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index b7b1af813d..85b2c8da5d 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -97,6 +97,9 @@ COMMANDS makes 'git-log' (even without --date=local) show the same times that `svn log` would in the local timezone. +--parent;; + Fetch only from the SVN parent of the current HEAD. + This doesn't interfere with interoperating with the Subversion repository you cloned from, but if you wish for your local Git repository to be able to interoperate with someone else's local Git -- cgit v1.2.3 From 0d8bee71af1cda3d13d896c210773216dcf87b7c Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Sat, 11 Apr 2009 10:46:17 -0700 Subject: git-svn: Add per-svn-remote ignore-paths config The --ignore-paths option to fetch is very useful for working on a subset of a SVN repository. For proper operation, every command that causes a fetch (explicit or implied) must include a matching --ignore-paths option. This patch adds a persistent svn-remote.$repo_id.ignore-paths config by promoting Fetcher::is_path_ignored to a member function and initializing $self->{ignore_regex} in Fetcher::new. Command line --ignore-paths is still recognized and acts in addition to the config value. Signed-off-by: Ben Jackson Acked-by: Eric Wong --- Documentation/git-svn.txt | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 85b2c8da5d..aad5e65c70 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -107,17 +107,25 @@ repository, either don't use this option or you should both use it in the same local timezone. --ignore-paths=;; - This allows one to specify Perl regular expression that will + This allows one to specify a Perl regular expression that will cause skipping of all matching paths from checkout from SVN. - Examples: + The '--ignore-paths' option should match for every 'fetch' + (including automatic fetches due to 'clone', 'dcommit', + 'rebase', etc) on a given repository. - --ignore-paths="^doc" - skip "doc*" directory for every fetch. +config key: svn-remote..ignore-paths - --ignore-paths="^[^/]+/(?:branches|tags)" - skip "branches" - and "tags" of first level directories. + If the ignore-paths config key is set and the command + line option is also given, both regular expressions + will be used. - Regular expression is not persistent, you should specify - it every time when fetching. +Examples: + + --ignore-paths="^doc" - skip "doc*" directory for every + fetch. + + --ignore-paths="^[^/]+/(?:branches|tags)" - skip + "branches" and "tags" of first level directories. 'clone':: Runs 'init' and 'fetch'. It will automatically create a -- cgit v1.2.3 From 88ec205477e18e612ab854f20ef87aa244b8debe Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Sat, 11 Apr 2009 10:46:18 -0700 Subject: git-svn: Save init/clone --ignore-paths in config The --ignored-paths argument is now stored as "svn-remote.$REMOTE_NAME.ignore-paths" in the config file. [ew: edited subject and message] Signed-off-by: Ben Jackson Acked-by: Eric Wong --- Documentation/git-svn.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index aad5e65c70..9229d45ad9 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -85,6 +85,10 @@ COMMANDS specified, the prefix must include a trailing slash. Setting a prefix is useful if you wish to track multiple projects that share a common repository. +--ignore-paths=;; + When passed to 'init' or 'clone' this regular expression will + be preserved as a config key. See 'fetch' for a description + of '--ignore-paths'. 'fetch':: Fetch unfetched revisions from the Subversion remote we are -- cgit v1.2.3 From 4ddef0e67d879bf7e18ce2655b057243d894adc1 Mon Sep 17 00:00:00 2001 From: "Wesley J. Landaker" Date: Wed, 22 Apr 2009 09:48:57 -0600 Subject: Documentation: git-svn: fix spurious bolding that mangles the output Without this fix, the output looks like: "Keep in mind that the (asterisk) wildcard of the local ref (right of the :) *must be the ..." -- with half the sentence spuriously bold. This fixes the problem by simply escaping asciidoc syntax as suggested by Jeff King . Signed-off-by: Wesley J. Landaker Signed-off-by: Junio C Hamano --- Documentation/git-svn.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 9229d45ad9..3e22e4096f 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -693,7 +693,7 @@ listed below are allowed: tags = tags/*/project-a:refs/remotes/project-a/tags/* ------------------------------------------------------------------------ -Keep in mind that the '*' (asterisk) wildcard of the local ref +Keep in mind that the '\*' (asterisk) wildcard of the local ref (right of the ':') *must* be the farthest right path component; however the remote wildcard may be anywhere as long as it's own independent path component (surrounded by '/' or EOL). This -- cgit v1.2.3 From bad542f0b1bca3b57e300a21fc7268c1800e6752 Mon Sep 17 00:00:00 2001 From: "Wesley J. Landaker" Date: Wed, 22 Apr 2009 09:48:58 -0600 Subject: Documentation: git-svn: fix a grammatical error without awkwardness The way the sentence is currently written, there needs to be an "its", but this leads to: "however the remote wildcard may be anywhere as long as it's its own" which is awkward to read. Instead, this patch fixes he grammar in a simpler way. Signed-off-by: Wesley J. Landaker Signed-off-by: Junio C Hamano --- Documentation/git-svn.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 3e22e4096f..1c40894669 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -695,7 +695,7 @@ listed below are allowed: Keep in mind that the '\*' (asterisk) wildcard of the local ref (right of the ':') *must* be the farthest right path component; -however the remote wildcard may be anywhere as long as it's own +however the remote wildcard may be anywhere as long as it's an 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'. -- cgit v1.2.3 From 36db1eddf972c88edf402b99e2366ad533635ab8 Mon Sep 17 00:00:00 2001 From: Mark Lodato Date: Thu, 14 May 2009 21:27:15 -0400 Subject: git-svn: add --authors-prog option Add a new option, --authors-prog, to git-svn that allows a more flexible alternative (or supplement) to --authors-file. This allows more advanced username operations than the authors file will allow. For example, one may look up Subversion users via LDAP, or may generate the name and email address from the Subversion username. Notes: * If both --authors-name and --authors-prog are given, the former is tried first, falling back to the later. * The program is called once per unique SVN username, and the result is cached. * The command-line argument must be the path to a program, not a generic shell command line. The absolute path to this program is taken at startup since the git-svn script changes directory during operation. * The option is not enabled for `git svn log'. [ew: fixed case where neither --authors-(name|prog) were defined] Signed-off-by: Mark Lodato Acked-by: Eric Wong --- Documentation/git-svn.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 1c40894669..ca3fc3de1f 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -398,6 +398,14 @@ after the authors-file is modified should continue operation. config key: svn.authorsfile +--authors-prog=:: + +If this option is specified, for each SVN committer name that does not +exist in the authors file, the given file is executed with the committer +name as the first argument. The program is expected to return a single +line of the form "Name ", which will be treated as if included in +the authors file. + -q:: --quiet:: Make 'git-svn' less verbose. Specify a second time to make it -- cgit v1.2.3 From ccf497de97f9d22e55e9e5ae90b8a65503d48099 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Sat, 20 Jun 2009 13:27:15 +0200 Subject: git-svn documentation: fix typo in 'rebase vs. pull/merge' section Signed-off-by: Miklos Vajna Signed-off-by: Junio C Hamano --- Documentation/git-svn.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 5d6d30f764..b6577dd4c4 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -541,7 +541,7 @@ pulled or merged from. This is because the author favored If you use `git svn set-tree A..B` to commit several diffs and you do not have the latest remotes/git-svn merged into my-branch, you should use `git svn rebase` to update your work branch instead of `git pull` or -`git merge`. `pull`/`merge' can cause non-linear history to be flattened +`git merge`. `pull`/`merge` can cause non-linear history to be flattened when committing into SVN, which can lead to merge commits reversing previous commits in SVN. -- cgit v1.2.3 From 5eec27e35f0a6231d2b0c50d94c726a67f14b23e Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Fri, 29 May 2009 17:09:42 +0200 Subject: git-svn: let 'dcommit $rev' work on $rev instead of HEAD 'git svn dcommit' takes an optional revision argument, but the meaning of it was rather scary. It completely ignored the current state of the HEAD, only looking at the revisions between SVN and $rev. If HEAD was attached to $branch, the branch lost all commits $rev..$branch in the process. Considering that 'git svn dcommit HEAD^' has the intuitive meaning "dcommit all changes on my branch except the last one", we change the meaning of the revision argument. git-svn temporarily checks out $rev for its work, meaning that * if a branch is specified, that branch (_not_ the HEAD) is rebased as part of the dcommit, * if some other revision is specified, as in the example, all work happens on a detached HEAD and no branch is affected. Signed-off-by: Thomas Rast Acked-by: Eric Wong --- Documentation/git-svn.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index bb22d8e712..5027f9fbd7 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -170,8 +170,9 @@ and have no uncommitted changes. It is recommended that you run 'git-svn' fetch and rebase (not pull or merge) your commits against the latest changes in the SVN repository. - An optional command-line argument may be specified as an - alternative to HEAD. + An optional revision or branch argument may be specified, and + causes 'git-svn' to do all work on that revision/branch + instead of HEAD. This is advantageous over 'set-tree' (below) because it produces cleaner, more linear history. + -- cgit v1.2.3 From 195643f2fc80b4d06a75b954b9a8ef2300976755 Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Wed, 3 Jun 2009 20:45:52 -0700 Subject: Add 'git svn reset' to unwind 'git svn fetch' Add a command to unwind the effects of fetch by moving the rev_map and refs/remotes/git-svn back to an old SVN revision. This allows revisions to be re-fetched. Ideally SVN revs would be immutable, but permissions changes in the SVN repository or indiscriminate use of '--ignore-paths' can create situations where fetch cannot make progress. Signed-off-by: Ben Jackson Acked-by: Eric Wong --- Documentation/git-svn.txt | 59 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 5027f9fbd7..3f0fa5e6f1 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -216,7 +216,7 @@ config key: svn.commiturl (overwrites all svn-remote..commiturl options) The following features from `svn log' are supported: + -- ---revision=[:];; +-r/--revision=[:];; is supported, non-numeric args are not: HEAD, NEXT, BASE, PREV, etc ... -v/--verbose;; @@ -314,6 +314,63 @@ Any other arguments are passed directly to 'git-log' Shows the Subversion externals. Use -r/--revision to specify a specific revision. +'reset':: + Undoes the effects of 'fetch' back to the specified revision. + This allows you to re-'fetch' an SVN revision. Normally the + contents of an SVN revision should never change and 'reset' + should not be necessary. However, if SVN permissions change, + or if you alter your --ignore-paths option, a 'fetch' may fail + with "not found in commit" (file not previously visible) or + "checksum mismatch" (missed a modification). If the problem + file cannot be ignored forever (with --ignore-paths) the only + way to repair the repo is to use 'reset'. + +Only the rev_map and refs/remotes/git-svn are changed. Follow 'reset' +with a 'fetch' and then 'git-reset' or 'git-rebase' to move local +branches onto the new tree. + +-r/--revision=;; + Specify the most recent revision to keep. All later revisions + are discarded. +-p/--parent;; + Discard the specified revision as well, keeping the nearest + parent instead. +Example:;; +Assume you have local changes in "master", but you need to refetch "r2". + +------------ + r1---r2---r3 remotes/git-svn + \ + A---B master +------------ + +Fix the ignore-paths or SVN permissions problem that caused "r2" to +be incomplete in the first place. Then: + +[verse] +git svn reset -r2 -p +git svn fetch + +------------ + r1---r2'--r3' remotes/git-svn + \ + r2---r3---A---B master +------------ + +Then fixup "master" with 'git-rebase'. +Do NOT use 'git-merge' or your history will not be compatible with a +future 'dcommit'! + +[verse] +git rebase --onto remotes/git-svn A^ master + +------------ + r1---r2'--r3' remotes/git-svn + \ + A'--B' master +------------ + + -- OPTIONS -- cgit v1.2.3 From ab81a3643ba3a68aae8a60d2c84f164b2c301b86 Mon Sep 17 00:00:00 2001 From: Marc Branchaud Date: Fri, 26 Jun 2009 16:49:19 -0400 Subject: git svn: Doc update for multiple branch and tag paths Signed-off-by: Marc Branchaud Acked-by: Eric Wong --- Documentation/git-svn.txt | 44 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 9 deletions(-) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 3f0fa5e6f1..7e9b9a0423 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -3,7 +3,7 @@ git-svn(1) NAME ---- -git-svn - Bidirectional operation between a single Subversion branch and git +git-svn - Bidirectional operation between a Subversion repository and git SYNOPSIS -------- @@ -15,13 +15,12 @@ DESCRIPTION It provides a bidirectional flow of changes between a Subversion and a git repository. -'git-svn' can track a single Subversion branch simply by using a -URL to the branch, follow branches laid out in the Subversion recommended -method (trunk, branches, tags directories) with the --stdlayout option, or -follow branches in any layout with the -T/-t/-b options (see options to -'init' below, and also the 'clone' command). +'git-svn' can track a standard Subversion repository, +following the common "trunk/branches/tags" layout, with the --stdlayout option. +It can also follow branches and tags in any layout with the -T/-t/-b options +(see options to 'init' below, and also the 'clone' command). -Once tracking a Subversion branch (with any of the above methods), the git +Once tracking a Subversion repository (with any of the above methods), the git repository can be updated from Subversion by the 'fetch' command and Subversion updated from git by the 'dcommit' command. @@ -48,8 +47,11 @@ COMMANDS --stdlayout;; These are optional command-line options for init. Each of these flags can point to a relative repository path - (--tags=project/tags') or a full url - (--tags=https://foo.org/project/tags). The option --stdlayout is + (--tags=project/tags) or a full url + (--tags=https://foo.org/project/tags). + You can specify more than one --tags and/or --branches options, in case + your Subversion repository places tags or branches under multiple paths. + The option --stdlayout is a shorthand way of setting trunk,tags,branches as the relative paths, which is the Subversion default. If any of the other options are given as well, they take precedence. @@ -205,6 +207,20 @@ config key: svn.commiturl (overwrites all svn-remote..commiturl options) Create a tag by using the tags_subdir instead of the branches_subdir specified during git svn init. +-d;; +--destination;; + If more than one --branches (or --tags) option was given to the 'init' + or 'clone' command, you must provide the location of the branch (or + tag) you wish to create in the SVN repository. The value of this + option must match one of the paths specified by a --branches (or + --tags) option. You can see these paths with the commands ++ + git config --get-all svn-remote..branches + git config --get-all svn-remote..tags ++ +where is the name of the SVN repository as specified by the -R option to +'init' (or "svn" by default). + 'tag':: Create a tag in the SVN repository. This is a shorthand for 'branch -t'. @@ -727,6 +743,16 @@ already dcommitted. It is considered bad practice to --amend commits you've already pushed to a remote repository for other users, and dcommit with SVN is analogous to that. +When using multiple --branches or --tags, 'git-svn' does not automatically +handle name collisions (for example, if two branches from different paths have +the same name, or if a branch and a tag have the same name). In these cases, +use 'init' to set up your git repository then, before your first 'fetch', edit +the .git/config file so that the branches and tags are associated with +different name spaces. For example: + + branches = stable/*:refs/remotes/svn/stable/* + branches = debug/*:refs/remotes/svn/debug/* + BUGS ---- -- cgit v1.2.3 From 647ac702d83b7ec8dbe6abe566151a064257433f Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Tue, 7 Jul 2009 22:22:19 +0200 Subject: git-svn.txt: stop using dash-form of commands. Also consistently use single quotes around git commands to make things clear (was only needed at a couple of places). Signed-off-by: Yann Dirson Acked-by: Eric Wong Signed-off-by: Junio C Hamano --- Documentation/git-svn.txt | 120 +++++++++++++++++++++++----------------------- 1 file changed, 60 insertions(+), 60 deletions(-) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 7e9b9a0423..2818bcce79 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -11,11 +11,11 @@ SYNOPSIS DESCRIPTION ----------- -'git-svn' is a simple conduit for changesets between Subversion and git. +'git svn' is a simple conduit for changesets between Subversion and git. It provides a bidirectional flow of changes between a Subversion and a git repository. -'git-svn' can track a standard Subversion repository, +'git svn' can track a standard Subversion repository, following the common "trunk/branches/tags" layout, with the --stdlayout option. It can also follow branches and tags in any layout with the -T/-t/-b options (see options to 'init' below, and also the 'clone' command). @@ -30,7 +30,7 @@ COMMANDS 'init':: Initializes an empty git repository with additional - metadata directories for 'git-svn'. The Subversion URL + metadata directories for 'git svn'. The Subversion URL may be specified as a command-line argument, or as full URL arguments to -T/-t/-b. Optionally, the target directory to operate on can be specified as a second @@ -100,7 +100,7 @@ COMMANDS --localtime;; Store Git commit times in the local timezone instead of UTC. This - makes 'git-log' (even without --date=local) show the same times + makes 'git log' (even without --date=local) show the same times that `svn log` would in the local timezone. --parent;; @@ -148,20 +148,20 @@ Examples: This fetches revisions from the SVN parent of the current HEAD and rebases the current (uncommitted to SVN) work against it. -This works similarly to `svn update` or 'git-pull' except that -it preserves linear history with 'git-rebase' instead of -'git-merge' for ease of dcommitting with 'git-svn'. +This works similarly to `svn update` or 'git pull' except that +it preserves linear history with 'git rebase' instead of +'git merge' for ease of dcommitting with 'git svn'. -This accepts all options that 'git-svn fetch' and 'git-rebase' +This accepts all options that 'git svn fetch' and 'git rebase' accept. However, '--fetch-all' only fetches from the current [svn-remote], and not all [svn-remote] definitions. -Like 'git-rebase'; this requires that the working tree be clean +Like 'git rebase'; this requires that the working tree be clean and have no uncommitted changes. -l;; --local;; - Do not fetch remotely; only run 'git-rebase' against the + Do not fetch remotely; only run 'git rebase' against the last fetched commit from the upstream SVN. 'dcommit':: @@ -169,11 +169,11 @@ and have no uncommitted changes. repository, and then rebase or reset (depending on whether or not there is a diff between SVN and head). This will create a revision in SVN for each commit in git. - It is recommended that you run 'git-svn' fetch and rebase (not + It is recommended that you run 'git svn' fetch and rebase (not pull or merge) your commits against the latest changes in the SVN repository. An optional revision or branch argument may be specified, and - causes 'git-svn' to do all work on that revision/branch + causes 'git svn' to do all work on that revision/branch instead of HEAD. This is advantageous over 'set-tree' (below) because it produces cleaner, more linear history. @@ -182,7 +182,7 @@ and have no uncommitted changes. After committing, do not rebase or reset. --commit-url ;; Commit to this SVN URL (the full path). This is intended to - allow existing git-svn repositories created with one transport + allow existing 'git svn' repositories created with one transport method (e.g. `svn://` or `http://` for anonymous read) to be reused if a user is later given access to an alternate transport method (e.g. `svn+ssh://` or `https://`) for commit. @@ -258,7 +258,7 @@ NOTE: SVN itself only stores times in UTC and nothing else. The regular svn client converts the UTC time to the local time (or based on the TZ= environment). This command has the same behaviour. + -Any other arguments are passed directly to 'git-log' +Any other arguments are passed directly to 'git log' 'blame':: Show what revision and author last modified each line of a file. The @@ -266,10 +266,10 @@ Any other arguments are passed directly to 'git-log' `svn blame' by default. Like the SVN blame command, local uncommitted changes in the working copy are ignored; the version of the file in the HEAD revision is annotated. Unknown - arguments are passed directly to 'git-blame'. + arguments are passed directly to 'git blame'. + --git-format;; - Produce output in the same format as 'git-blame', but with + Produce output in the same format as 'git blame', but with SVN revision numbers instead of git commit hashes. In this mode, changes that haven't been committed to SVN (including local working-copy edits) are shown as revision 0. @@ -288,7 +288,7 @@ Any other arguments are passed directly to 'git-log' absolutely no attempts to do patching when committing to SVN, it simply overwrites files with those specified in the tree or commit. All merging is assumed to have taken place - independently of 'git-svn' functions. + independently of 'git svn' functions. 'create-ignore':: Recursively finds the svn:ignore property on directories and @@ -303,12 +303,12 @@ Any other arguments are passed directly to 'git-log' 'commit-diff':: Commits the diff of two tree-ish arguments from the - command-line. This command does not rely on being inside an `git-svn + command-line. This command does not rely on being inside an `git svn init`-ed repository. This command takes three arguments, (a) the original tree to diff against, (b) the new tree result, (c) the URL of the target Subversion repository. The final argument - (URL) may be omitted if you are working from a 'git-svn'-aware - repository (that has been `init`-ed with 'git-svn'). + (URL) may be omitted if you are working from a 'git svn'-aware + repository (that has been `init`-ed with 'git svn'). The -r option is required for this. 'info':: @@ -342,7 +342,7 @@ Any other arguments are passed directly to 'git-log' way to repair the repo is to use 'reset'. Only the rev_map and refs/remotes/git-svn are changed. Follow 'reset' -with a 'fetch' and then 'git-reset' or 'git-rebase' to move local +with a 'fetch' and then 'git reset' or 'git rebase' to move local branches onto the new tree. -r/--revision=;; @@ -373,8 +373,8 @@ git svn fetch r2---r3---A---B master ------------ -Then fixup "master" with 'git-rebase'. -Do NOT use 'git-merge' or your history will not be compatible with a +Then fixup "master" with 'git rebase'. +Do NOT use 'git merge' or your history will not be compatible with a future 'dcommit'! [verse] @@ -396,7 +396,7 @@ OPTIONS --shared[={false|true|umask|group|all|world|everybody}]:: --template=:: Only used with the 'init' command. - These are passed directly to 'git-init'. + These are passed directly to 'git init'. -r :: --revision :: @@ -418,7 +418,7 @@ Only used with the 'set-tree' command. Read a list of commits from stdin and commit them in reverse order. Only the leading sha1 is read from each line, so -'git-rev-list --pretty=oneline' output can be used. +'git rev-list --pretty=oneline' output can be used. --rmdir:: @@ -448,7 +448,7 @@ config key: svn.edit Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands. -They are both passed directly to 'git-diff-tree'; see +They are both passed directly to 'git diff-tree'; see linkgit:git-diff-tree[1] for more information. [verse] @@ -458,16 +458,16 @@ config key: svn.findcopiesharder -A:: --authors-file=:: -Syntax is compatible with the file used by 'git-cvsimport': +Syntax is compatible with the file used by 'git cvsimport': ------------------------------------------------------------------------ loginname = Joe User ------------------------------------------------------------------------ -If this option is specified and 'git-svn' encounters an SVN -committer name that does not exist in the authors-file, 'git-svn' +If this option is specified and 'git svn' encounters an SVN +committer name that does not exist in the authors-file, 'git svn' will abort operation. The user will then have to add the -appropriate entry. Re-running the previous 'git-svn' command +appropriate entry. Re-running the previous 'git svn' command after the authors-file is modified should continue operation. config key: svn.authorsfile @@ -482,7 +482,7 @@ the authors file. -q:: --quiet:: - Make 'git-svn' less verbose. Specify a second time to make it + Make 'git svn' less verbose. Specify a second time to make it even less verbose. --repack[=]:: @@ -495,7 +495,7 @@ with many revisions. to fetch before repacking. This defaults to repacking every 1000 commits fetched if no argument is specified. ---repack-flags are passed directly to 'git-repack'. +--repack-flags are passed directly to 'git repack'. [verse] config key: svn.repack @@ -508,8 +508,8 @@ config key: svn.repackflags These are only used with the 'dcommit' and 'rebase' commands. -Passed directly to 'git-rebase' when using 'dcommit' if a -'git-reset' cannot be used (see 'dcommit'). +Passed directly to 'git rebase' when using 'dcommit' if a +'git reset' cannot be used (see 'dcommit'). -n:: --dry-run:: @@ -566,18 +566,18 @@ svn-remote..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 +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. -The 'git-svn log' command will not work on repositories using +The 'git svn log' command will not work on repositories using this, either. Using this conflicts with the 'useSvmProps' option for (hopefully) obvious reasons. svn.useSvmProps:: svn-remote..useSvmProps:: -This allows 'git-svn' to re-map repository URLs and UUIDs from +This allows 'git svn' to re-map repository URLs and UUIDs from mirrors created using SVN::Mirror (or svk) for metadata. If an SVN revision has a property, "svm:headrev", it is likely @@ -596,7 +596,7 @@ svn-remote..useSvnsyncprops:: svn-remote..rewriteRoot:: This allows users to create repositories from alternate - URLs. For example, an administrator could run 'git-svn' on the + URLs. For example, an administrator could run 'git svn' on the server locally (accessing via file://) but wish to distribute the repository with a public http:// or svn:// URL in the metadata so users of it will see the public URL. @@ -605,14 +605,14 @@ svn.brokenSymlinkWorkaround:: This disables potentially expensive checks to workaround broken symlinks checked into SVN by broken clients. Set this option to "false" if you track a SVN repository with many empty blobs that are not symlinks. -This option may be changed while "git-svn" is running and take effect on -the next revision fetched. If unset, git-svn assumes this option to be +This option may be changed while 'git svn' is running and take effect on +the next revision fetched. If unset, 'git svn' assumes this option to be "true". -- Since the noMetadata, rewriteRoot, useSvnsyncProps and useSvmProps -options all affect the metadata generated and used by 'git-svn'; they +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. @@ -630,7 +630,7 @@ Tracking and contributing to the trunk of a Subversion-managed project: git svn clone http://svn.example.com/project/trunk # Enter the newly cloned directory: cd trunk -# You should be on master branch, double-check with git-branch +# You should be on master branch, double-check with 'git branch' git branch # Do some work and commit locally to git: git commit ... @@ -661,12 +661,12 @@ Tracking and contributing to an entire Subversion-managed project # of dcommit/rebase/show-ignore should be the same as above. ------------------------------------------------------------------------ -The initial 'git-svn clone' can be quite time-consuming +The initial 'git svn clone' can be quite time-consuming (especially for large Subversion repositories). If multiple people (or one person with multiple machines) want to use -'git-svn' to interact with the same Subversion repository, you can -do the initial 'git-svn clone' to a repository on a server and -have each person clone that repository with 'git-clone': +'git svn' to interact with the same Subversion repository, you can +do the initial 'git svn clone' to a repository on a server and +have each person clone that repository with 'git clone': ------------------------------------------------------------------------ # Do the initial import on a server @@ -680,7 +680,7 @@ have each person clone that repository with 'git-clone': git fetch # 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) +# Initialize 'git svn' locally (be sure to use the same URL and -T/-b/-t options as were used on server) git svn init http://svn.example.com/project # Pull the latest changes from Subversion git svn rebase @@ -689,7 +689,7 @@ have each person clone that repository with 'git-clone': REBASE VS. PULL/MERGE --------------------- -Originally, 'git-svn' recommended that the 'remotes/git-svn' branch be +Originally, 'git svn' recommended that the 'remotes/git-svn' branch be pulled or merged from. This is because the author favored `git svn set-tree B` to commit a single head rather than the `git svn set-tree A..B` notation to commit multiple commits. @@ -704,7 +704,7 @@ previous commits in SVN. DESIGN PHILOSOPHY ----------------- Merge tracking in Subversion is lacking and doing branched development -with Subversion can be cumbersome as a result. While 'git-svn' can track +with Subversion can be cumbersome as a result. While 'git svn' can track copy history (including branches and tags) for repositories adopting a standard layout, it cannot yet represent merge history that happened inside git back upstream to SVN users. Therefore it is advised that @@ -715,25 +715,25 @@ CAVEATS ------- For the sake of simplicity and interoperating with a less-capable system -(SVN), it is recommended that all 'git-svn' users clone, fetch and dcommit -directly from the SVN server, and avoid all 'git-clone'/'pull'/'merge'/'push' +(SVN), it is recommended that all 'git svn' users clone, fetch and dcommit +directly from the SVN server, and avoid all 'git clone'/'pull'/'merge'/'push' operations between git repositories and branches. The recommended method of exchanging code between git branches and users is -'git-format-patch' and 'git-am', or just 'dcommit'ing to the SVN repository. +'git format-patch' and 'git am', or just 'dcommit'ing to the SVN repository. -Running 'git-merge' or 'git-pull' is NOT recommended on a branch you +Running 'git merge' or 'git pull' is NOT recommended on a branch you plan to 'dcommit' from. Subversion does not represent merges in any reasonable or useful fashion; so users using Subversion cannot see any merges you've made. Furthermore, if you merge or pull from a git branch that is a mirror of an SVN branch, 'dcommit' may commit to the wrong branch. -'git-clone' does not clone branches under the refs/remotes/ hierarchy or -any 'git-svn' metadata, or config. So repositories created and managed with -using 'git-svn' should use 'rsync' for cloning, if cloning is to be done +'git clone' does not clone branches under the refs/remotes/ hierarchy or +any 'git svn' metadata, or config. So repositories created and managed with +using 'git svn' should use 'rsync' for cloning, if cloning is to be done at all. -Since 'dcommit' uses rebase internally, any git branches you 'git-push' to +Since 'dcommit' uses rebase internally, any git branches you 'git push' to before 'dcommit' on will require forcing an overwrite of the existing ref on the remote repository. This is generally considered bad practice, see the linkgit:git-push[1] documentation for details. @@ -743,7 +743,7 @@ already dcommitted. It is considered bad practice to --amend commits you've already pushed to a remote repository for other users, and dcommit with SVN is analogous to that. -When using multiple --branches or --tags, 'git-svn' does not automatically +When using multiple --branches or --tags, 'git svn' does not automatically handle name collisions (for example, if two branches from different paths have the same name, or if a branch and a tag have the same name). In these cases, use 'init' to set up your git repository then, before your first 'fetch', edit @@ -769,7 +769,7 @@ for git to detect them. CONFIGURATION ------------- -'git-svn' stores [svn-remote] configuration information in the +'git svn' stores [svn-remote] configuration information in the repository .git/config file. It is similar the core git [remote] sections except 'fetch' keys do not accept glob arguments; but they are instead handled by the 'branches' @@ -790,7 +790,7 @@ Keep in mind that the '\*' (asterisk) wildcard of the local ref however the remote wildcard may be anywhere as long as it's an 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'. +should be manually entered with a text-editor or using 'git config'. SEE ALSO -------- -- cgit v1.2.3 From 6c32a7a99495da3f49e2a142791bc10af3f6f059 Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Tue, 7 Jul 2009 22:22:20 +0200 Subject: git-svn.txt: make formatting more consistent. - correctly link paragraphs within list items - consistently format examples - put option alernatives on separate lines - always use [verse] for config items - always indent 1st paragraph of a list item, with a tab Signed-off-by: Yann Dirson Acked-by: Eric Wong Signed-off-by: Junio C Hamano --- Documentation/git-svn.txt | 211 ++++++++++++++++++++++------------------------ 1 file changed, 101 insertions(+), 110 deletions(-) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 2818bcce79..f40fd42a88 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -26,7 +26,6 @@ Subversion updated from git by the 'dcommit' command. COMMANDS -------- --- 'init':: Initializes an empty git repository with additional @@ -105,7 +104,7 @@ COMMANDS --parent;; Fetch only from the SVN parent of the current HEAD. - ++ This doesn't interfere with interoperating with the Subversion repository you cloned from, but if you wish for your local Git repository to be able to interoperate with someone else's local Git @@ -118,20 +117,28 @@ the same local timezone. The '--ignore-paths' option should match for every 'fetch' (including automatic fetches due to 'clone', 'dcommit', 'rebase', etc) on a given repository. - ++ +[verse] config key: svn-remote..ignore-paths - - If the ignore-paths config key is set and the command - line option is also given, both regular expressions - will be used. - ++ +If the ignore-paths config key is set and the command line option is +also given, both regular expressions will be used. ++ Examples: ++ +-- +Skip "doc*" directory for every fetch;; ++ +------------------------------------------------------------------------ +--ignore-paths="^doc" +------------------------------------------------------------------------ - --ignore-paths="^doc" - skip "doc*" directory for every - fetch. - - --ignore-paths="^[^/]+/(?:branches|tags)" - skip - "branches" and "tags" of first level directories. +Skip "branches" and "tags" of first level directories;; ++ +------------------------------------------------------------------------ +--ignore-paths="^[^/]+/(?:branches|tags)" +------------------------------------------------------------------------ +-- 'clone':: Runs 'init' and 'fetch'. It will automatically create a @@ -147,15 +154,15 @@ Examples: 'rebase':: This fetches revisions from the SVN parent of the current HEAD and rebases the current (uncommitted to SVN) work against it. - ++ This works similarly to `svn update` or 'git pull' except that it preserves linear history with 'git rebase' instead of 'git merge' for ease of dcommitting with 'git svn'. - ++ This accepts all options that 'git svn fetch' and 'git rebase' accept. However, '--fetch-all' only fetches from the current [svn-remote], and not all [svn-remote] definitions. - ++ Like 'git rebase'; this requires that the working tree be clean and have no uncommitted changes. @@ -186,14 +193,13 @@ and have no uncommitted changes. method (e.g. `svn://` or `http://` for anonymous read) to be reused if a user is later given access to an alternate transport method (e.g. `svn+ssh://` or `https://`) for commit. - ++ +[verse] config key: svn-remote..commiturl - config key: svn.commiturl (overwrites all svn-remote..commiturl options) - - Using this option for any other purpose (don't ask) - is very strongly discouraged. --- ++ +Using this option for any other purpose (don't ask) is very strongly +discouraged. 'branch':: Create a branch in the SVN repository. @@ -232,10 +238,12 @@ where is the name of the SVN repository as specified by the -R option to The following features from `svn log' are supported: + -- --r/--revision=[:];; +-r [:];; +--revision=[:];; is supported, non-numeric args are not: HEAD, NEXT, BASE, PREV, etc ... --v/--verbose;; +-v;; +--verbose;; it's not completely compatible with the --verbose output in svn log, but reasonably close. --limit=;; @@ -274,7 +282,6 @@ Any other arguments are passed directly to 'git log' changes that haven't been committed to SVN (including local working-copy edits) are shown as revision 0. --- 'find-rev':: When given an SVN revision number of the form 'rN', returns the corresponding git commit hash (this can optionally be followed by a @@ -340,58 +347,56 @@ Any other arguments are passed directly to 'git log' "checksum mismatch" (missed a modification). If the problem file cannot be ignored forever (with --ignore-paths) the only way to repair the repo is to use 'reset'. - ++ Only the rev_map and refs/remotes/git-svn are changed. Follow 'reset' with a 'fetch' and then 'git reset' or 'git rebase' to move local branches onto the new tree. --r/--revision=;; +-r ;; +--revision=;; Specify the most recent revision to keep. All later revisions are discarded. --p/--parent;; +-p;; +--parent;; Discard the specified revision as well, keeping the nearest parent instead. Example:;; Assume you have local changes in "master", but you need to refetch "r2". - ++ ------------ r1---r2---r3 remotes/git-svn \ A---B master ------------ - ++ Fix the ignore-paths or SVN permissions problem that caused "r2" to be incomplete in the first place. Then: - ++ [verse] git svn reset -r2 -p git svn fetch - ++ ------------ r1---r2'--r3' remotes/git-svn \ r2---r3---A---B master ------------ - ++ Then fixup "master" with 'git rebase'. Do NOT use 'git merge' or your history will not be compatible with a future 'dcommit'! - ++ [verse] git rebase --onto remotes/git-svn A^ master - ++ ------------ r1---r2'--r3' remotes/git-svn \ A'--B' master ------------ - --- - OPTIONS ------- --- --shared[={false|true|umask|group|all|world|everybody}]:: --template=:: @@ -400,85 +405,81 @@ OPTIONS -r :: --revision :: - -Used with the 'fetch' command. - + Used with the 'fetch' command. ++ This allows revision ranges for partial/cauterized history to be supported. $NUMBER, $NUMBER1:$NUMBER2 (numeric ranges), $NUMBER:HEAD, and BASE:$NUMBER are all supported. - ++ This can allow you to make partial mirrors when running fetch; but is generally not recommended because history will be skipped and lost. -:: --stdin:: - -Only used with the 'set-tree' command. - + Only used with the 'set-tree' command. ++ Read a list of commits from stdin and commit them in reverse order. Only the leading sha1 is read from each line, so 'git rev-list --pretty=oneline' output can be used. --rmdir:: - -Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands. - + Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands. ++ Remove directories from the SVN tree if there are no files left behind. SVN can version empty directories, and they are not removed by default if there are no files left in them. git cannot version empty directories. Enabling this flag will make the commit to SVN act like git. - ++ +[verse] config key: svn.rmdir -e:: --edit:: - -Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands. - + Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands. ++ Edit the commit message before committing to SVN. This is off by default for objects that are commits, and forced on when committing tree objects. - ++ +[verse] config key: svn.edit -l:: --find-copies-harder:: - -Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands. - + Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands. ++ They are both passed directly to 'git diff-tree'; see linkgit:git-diff-tree[1] for more information. - ++ [verse] config key: svn.l config key: svn.findcopiesharder -A:: --authors-file=:: - -Syntax is compatible with the file used by 'git cvsimport': - + Syntax is compatible with the file used by 'git cvsimport': ++ ------------------------------------------------------------------------ loginname = Joe User ------------------------------------------------------------------------ - ++ If this option is specified and 'git svn' encounters an SVN committer name that does not exist in the authors-file, 'git svn' will abort operation. The user will then have to add the appropriate entry. Re-running the previous 'git svn' command after the authors-file is modified should continue operation. - ++ +[verse] config key: svn.authorsfile --authors-prog=:: - -If this option is specified, for each SVN committer name that does not -exist in the authors file, the given file is executed with the committer -name as the first argument. The program is expected to return a single -line of the form "Name ", which will be treated as if included in -the authors file. + If this option is specified, for each SVN committer name that + does not exist in the authors file, the given file is executed + with the committer name as the first argument. The program is + expected to return a single line of the form "Name ", + which will be treated as if included in the authors file. -q:: --quiet:: @@ -487,16 +488,15 @@ the authors file. --repack[=]:: --repack-flags=:: - -These should help keep disk usage sane for large fetches -with many revisions. - + These should help keep disk usage sane for large fetches with + many revisions. ++ --repack takes an optional argument for the number of revisions to fetch before repacking. This defaults to repacking every 1000 commits fetched if no argument is specified. - ++ --repack-flags are passed directly to 'git repack'. - ++ [verse] config key: svn.repack config key: svn.repackflags @@ -505,41 +505,36 @@ config key: svn.repackflags --merge:: -s:: --strategy=:: - -These are only used with the 'dcommit' and 'rebase' commands. - + These are only used with the 'dcommit' and 'rebase' commands. ++ Passed directly to 'git rebase' when using 'dcommit' if a 'git reset' cannot be used (see 'dcommit'). -n:: --dry-run:: - -This can be used with the 'dcommit', 'rebase', 'branch' and 'tag' -commands. - + This can be used with the 'dcommit', 'rebase', 'branch' and + 'tag' commands. ++ For 'dcommit', print out the series of git arguments that would show which diffs would be committed to SVN. - ++ For 'rebase', display the local branch associated with the upstream svn repository associated with the current branch and the URL of svn repository that will be fetched from. - ++ For 'branch' and 'tag', display the urls that will be used for copying when creating the branch or tag. --- ADVANCED OPTIONS ---------------- --- -i:: --id :: - -This sets GIT_SVN_ID (instead of using the environment). This -allows the user to override the default refname to fetch from -when tracking a single URL. The 'log' and 'dcommit' commands -no longer require this switch as an argument. + This sets GIT_SVN_ID (instead of using the environment). This + allows the user to override the default refname to fetch from + when tracking a single URL. The 'log' and 'dcommit' commands + no longer require this switch as an argument. -R:: --svn-remote :: @@ -553,33 +548,30 @@ no longer require this switch as an argument. started tracking a branch and never tracked the trunk it was descended from. This feature is enabled by default, use --no-follow-parent to disable it. - ++ +[verse] config key: svn.followparent --- CONFIG FILE-ONLY OPTIONS ------------------------ --- svn.noMetadata:: svn-remote..noMetadata:: - -This gets rid of the 'git-svn-id:' lines at the end of every commit. - + 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. - ++ The 'git svn log' command will not work on repositories using this, either. Using this conflicts with the 'useSvmProps' option for (hopefully) obvious reasons. svn.useSvmProps:: svn-remote..useSvmProps:: - -This allows 'git svn' to re-map repository URLs and UUIDs from -mirrors created using SVN::Mirror (or svk) for metadata. - + This allows 'git svn' to re-map repository URLs and UUIDs from + mirrors created using SVN::Mirror (or svk) for metadata. ++ If an SVN revision has a property, "svm:headrev", it is likely that the revision was created by SVN::Mirror (also used by SVK). The property contains a repository UUID and a revision. We want @@ -602,14 +594,13 @@ svn-remote..rewriteRoot:: metadata so users of it will see the public URL. svn.brokenSymlinkWorkaround:: -This disables potentially expensive checks to workaround broken symlinks -checked into SVN by broken clients. Set this option to "false" if you -track a SVN repository with many empty blobs that are not symlinks. -This option may be changed while 'git svn' is running and take effect on -the next revision fetched. If unset, 'git svn' assumes this option to be -"true". - --- + This disables potentially expensive checks to workaround + broken symlinks checked into SVN by broken clients. Set this + option to "false" if you track a SVN repository with many + empty blobs that are not symlinks. This option may be changed + while 'git svn' is running and take effect on the next + revision fetched. If unset, 'git svn' assumes this option to + be "true". Since the noMetadata, rewriteRoot, useSvnsyncProps and useSvmProps options all affect the metadata generated and used by 'git svn'; they -- cgit v1.2.3 From eb1f7e0dc0b606bba2af0ec61d4d307f975c83ef Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Tue, 7 Jul 2009 22:22:21 +0200 Subject: git-svn.txt: fix fetch flags incorrectly documented as init flags. Signed-off-by: Yann Dirson Acked-by: Eric Wong Signed-off-by: Junio C Hamano --- Documentation/git-svn.txt | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index f40fd42a88..1e8242b212 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -62,16 +62,6 @@ COMMANDS Set the 'useSvnsyncProps' option in the [svn-remote] config. --rewrite-root=;; Set the 'rewriteRoot' option in the [svn-remote] config. ---use-log-author;; - When retrieving svn commits into git (as part of fetch, rebase, or - dcommit operations), look for the first From: or Signed-off-by: line - in the log message and use that as the author string. ---add-author-from;; - When committing to svn from git (as part of commit or dcommit - operations), if the existing log message doesn't already have a - From: or Signed-off-by: line, append a From: line based on the - git commit's author string. If you use this, then --use-log-author - will retrieve a valid author string for all commits. --username=;; For transports that SVN handles authentication for (http, https, and plain svn), specify the username. For other @@ -140,6 +130,17 @@ Skip "branches" and "tags" of first level directories;; ------------------------------------------------------------------------ -- +--use-log-author;; + When retrieving svn commits into git (as part of fetch, rebase, or + dcommit operations), look for the first From: or Signed-off-by: line + in the log message and use that as the author string. +--add-author-from;; + When committing to svn from git (as part of commit or dcommit + operations), if the existing log message doesn't already have a + From: or Signed-off-by: line, append a From: line based on the + git commit's author string. If you use this, then --use-log-author + will retrieve a valid author string for all commits. + 'clone':: Runs 'init' and 'fetch'. It will automatically create a directory based on the basename of the URL passed to it; -- cgit v1.2.3 From 0da3e1d21f931aef887ff30b2ebf171e3f343ff7 Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Tue, 7 Jul 2009 22:22:22 +0200 Subject: git-svn.txt: fix description of fetch flags accepted by clone. Signed-off-by: Yann Dirson Acked-by: Eric Wong Signed-off-by: Junio C Hamano --- Documentation/git-svn.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 1e8242b212..10af599b44 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -147,10 +147,10 @@ Skip "branches" and "tags" of first level directories;; or if a second argument is passed; it will create a directory and work within that. It accepts all arguments that the 'init' and 'fetch' commands accept; with the exception of - '--fetch-all'. After a repository is cloned, the 'fetch' - command will be able to update revisions without affecting - the working tree; and the 'rebase' command will be able - to update the working tree with the latest changes. + '--fetch-all' and '--parent'. After a repository is cloned, + the 'fetch' command will be able to update revisions without + affecting the working tree; and the 'rebase' command will be + able to update the working tree with the latest changes. 'rebase':: This fetches revisions from the SVN parent of the current HEAD -- cgit v1.2.3 From 2da9ee0888a8570f9a85ef11f208556c5316e3d4 Mon Sep 17 00:00:00 2001 From: Robert Allan Zeh Date: Sun, 19 Jul 2009 18:00:52 -0500 Subject: git svn: add gc command Add a git svn gc command that gzips all unhandled.log files, and removes all index files under .git/svn. Signed-off-by: Robert Allan Zeh Signed-off-by: Eric Wong --- Documentation/git-svn.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 10af599b44..068aa58a5b 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -338,6 +338,10 @@ Any other arguments are passed directly to 'git log' Shows the Subversion externals. Use -r/--revision to specify a specific revision. +'gc':: + Compress $GIT_DIR/svn//unhandled.log files in .git/svn + and remove $GIT_DIR/svn/index files in .git/svn. + 'reset':: Undoes the effects of 'fetch' back to the specified revision. This allows you to re-'fetch' an SVN revision. Normally the -- cgit v1.2.3 From 6b48829dbbe06798eded1e7c5f70810940591f79 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 25 Jul 2009 00:00:50 -0700 Subject: git svn: revert default behavior for --minimize-url This reverts the --minimize-url behavior change that appeared recently in commit 0b2af457a49e3b00d47d556d5301934d27909db8 ("Fix branch detection when repository root is inaccessible"). However, we now allow the option to be turned off by allowing "--no-minimize-url" so people with limited-access setups can still take advantage of the fix in 0b2af457a49e3b00d47d556d5301934d27909db8. Also document the behavior and default settings of minimize-url in the manpage for the first time. This introduces a temporary UI regression to allow t9141 to pass that will be reverted (fixed) in the next commit. Signed-off-by: Eric Wong --- Documentation/git-svn.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 068aa58a5b..22a0389f1e 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -80,6 +80,17 @@ COMMANDS When passed to 'init' or 'clone' this regular expression will be preserved as a config key. See 'fetch' for a description of '--ignore-paths'. +--no-minimize-url;; + When tracking multiple directories (using --stdlayout, + --branches, or --tags options), git svn will attempt to connect + to the root (or highest allowed level) of the Subversion + repository. This default allows better tracking of history if + entire projects are moved within a repository, but may cause + issues on repositories where read access restrictions are in + place. Passing '--no-minimize-url' will allow git svn to + accept URLs as-is without attempting to connect to a higher + level directory. This option is off by default when only + one URL/branch is tracked (it would do little good). 'fetch':: Fetch unfetched revisions from the Subversion remote we are -- cgit v1.2.3 From 61f36a79da11accfaaab986bf65453ed30fdbd9f Mon Sep 17 00:00:00 2001 From: Tuomas Suutari Date: Fri, 14 Aug 2009 11:11:58 +0300 Subject: git-svn.txt: Fix location of parent argument The note about interoperating in different timezones and such is about localtime argument, not parent. Signed-off-by: Tuomas Suutari Acked-by: Eric Wong --- Documentation/git-svn.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 22a0389f1e..1812890a7e 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -102,9 +102,6 @@ COMMANDS Store Git commit times in the local timezone instead of UTC. This makes 'git log' (even without --date=local) show the same times that `svn log` would in the local timezone. - ---parent;; - Fetch only from the SVN parent of the current HEAD. + This doesn't interfere with interoperating with the Subversion repository you cloned from, but if you wish for your local Git @@ -112,6 +109,9 @@ repository to be able to interoperate with someone else's local Git repository, either don't use this option or you should both use it in the same local timezone. +--parent;; + Fetch only from the SVN parent of the current HEAD. + --ignore-paths=;; This allows one to specify a Perl regular expression that will cause skipping of all matching paths from checkout from SVN. -- cgit v1.2.3 From 6111b934991f3ea670ac2442806c976defc7b61c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 15 Nov 2009 18:57:16 -0800 Subject: git svn: attempt to create empty dirs on clone+rebase We parse unhandled.log files for empty_dir statements and make a best effort attempt to recreate empty directories on fresh clones and rebase. This should cover the majority of cases where users work off a single branch or for projects where branches do not differ in empty directories. Since this cannot affect "normal" git commands like "checkout" or "reset", so users switching between branches in a single working directory should use the new "git svn mkdirs" command after switching branches. Signed-off-by: Eric Wong --- Documentation/git-svn.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 1812890a7e..db00ed43b7 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -320,6 +320,13 @@ Any other arguments are passed directly to 'git log' directories. The output is suitable for appending to the $GIT_DIR/info/exclude file. +'mkdirs':: + Attempts to recreate empty directories that core git cannot track + based on information in $GIT_DIR/svn//unhandled.log files. + Empty directories are automatically recreated when using + "git svn clone" and "git svn rebase", so "mkdirs" is intended + for use after commands like "git checkout" or "git reset". + 'commit-diff':: Commits the diff of two tree-ish arguments from the command-line. This command does not rely on being inside an `git svn -- cgit v1.2.3 From ce45a45f24cc7b3ccc7f6ebcd0025559b4421bda Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Mon, 16 Nov 2009 11:15:17 +0100 Subject: Document git-svn's first-parent rule git-svn has the following rule to detect the SVN base for its operations: find the first git-svn-id line reachable through first-parent ancestry. IOW, git log --grep=^git-svn-id: --first-parent -1 Document this, as it is very important when using merges with git-svn. Signed-off-by: Thomas Rast --- Documentation/git-svn.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index db00ed43b7..4cdca0d874 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -742,6 +742,16 @@ merges you've made. Furthermore, if you merge or pull from a git branch that is a mirror of an SVN branch, 'dcommit' may commit to the wrong branch. +If you do merge, note the following rule: 'git svn dcommit' will +attempt to commit on top of the SVN commit named in +------------------------------------------------------------------------ +git log --grep=^git-svn-id: --first-parent -1 +------------------------------------------------------------------------ +You 'must' therefore ensure that the most recent commit of the branch +you want to dcommit to is the 'first' parent of the merge. Chaos will +ensue otherwise, especially if the first parent is an older commit on +the same SVN branch. + 'git clone' does not clone branches under the refs/remotes/ hierarchy or any 'git svn' metadata, or config. So repositories created and managed with using 'git svn' should use 'rsync' for cloning, if cloning is to be done -- cgit v1.2.3 From a65f3c202b8771f79117b566946d9cb3348f6fad Mon Sep 17 00:00:00 2001 From: Igor Mironov Date: Tue, 12 Jan 2010 03:22:27 +1100 Subject: git-svn: document --username/commit-url for branch/tag [ew: shortened subject] Signed-off-by: Igor Mironov Acked-by: Eric Wong --- Documentation/git-svn.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 4cdca0d874..8dbf9d1cb2 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -239,6 +239,19 @@ discouraged. where 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 + configuration property 'username'. + +--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..commiturl ++ + 'tag':: Create a tag in the SVN repository. This is a shorthand for 'branch -t'. -- cgit v1.2.3 From 3e18ce1ac3034b1562ec748523aa7636e1b58b52 Mon Sep 17 00:00:00 2001 From: Jay Soffian Date: Sat, 23 Jan 2010 03:30:00 -0500 Subject: git-svn: allow UUID to be manually remapped via rewriteUUID In certain situations it may be necessary to manually remap an svn repostitory UUID. For example: o--- [git-svn clone] / [origin svn repo] \ o--- [svnsync clone] Imagine that only "git-svn clone" and "svnsync clone" are made available to external users. Furthur, "git-svn clone" contains only trunk, and for reasons unknown, "svnsync clone" is missing the revision properties that normally provide the origin svn repo's UUID. A git user who has cloned the "git-svn clone" repo now wishes to use git-svn to pull in the missing branches from the "synsync clone" repo. In order for git-svn to get the history correct for those branches, it needs to know the origin svn repo's UUID. Hence rewriteUUID. Signed-off-by: Jay Soffian Acked-by: Eric Wong --- Documentation/git-svn.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 8dbf9d1cb2..5df30596de 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -62,6 +62,8 @@ COMMANDS Set the 'useSvnsyncProps' option in the [svn-remote] config. --rewrite-root=;; Set the 'rewriteRoot' option in the [svn-remote] config. +--rewrite-uuid=;; + Set the 'rewriteUUID' option in the [svn-remote] config. --username=;; For transports that SVN handles authentication for (http, https, and plain svn), specify the username. For other @@ -629,6 +631,12 @@ svn-remote..rewriteRoot:: the repository with a public http:// or svn:// URL in the metadata so users of it will see the public URL. +svn-remote..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 @@ -638,13 +646,14 @@ svn.brokenSymlinkWorkaround:: revision fetched. If unset, 'git svn' assumes this option to be "true". -Since the noMetadata, rewriteRoot, useSvnsyncProps and useSvmProps +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. -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 -- cgit v1.2.3 From 075762085c6668f11c4ea165ecec17f69245ef09 Mon Sep 17 00:00:00 2001 From: Jay Soffian Date: Sat, 23 Jan 2010 03:30:01 -0500 Subject: git-svn: allow subset of branches/tags to be specified in glob spec For very large projects it is useful to be able to clone a subset of the upstream SVN repo's branches. Allow for this by letting the left-side of the branches and tags glob specs contain a brace-delineated comma-separated list of names. e.g.: branches = branches/{red,green}/src:refs/remotes/branches/* Signed-off-by: Jay Soffian Acked-by: Eric Wong --- Documentation/git-svn.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 5df30596de..99f3c1ea6c 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -838,6 +838,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'. +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] -- cgit v1.2.3