OLD | NEW |
| (Empty) |
1 git-auto-svn(1) | |
2 =============== | |
3 | |
4 NAME | |
5 ---- | |
6 git-auto-svn - | |
7 include::_git-auto-svn_desc.helper.txt[] | |
8 | |
9 SYNOPSIS | |
10 -------- | |
11 [verse] | |
12 'git auto-svn' | |
13 | |
14 DESCRIPTION | |
15 ----------- | |
16 | |
17 `git auto-svn` automatically sets up git-svn metadata and runs git-svn fetch for | |
18 repos that are homed in SVN but mirrored to Git (such as depot_tools itself). | |
19 | |
20 It determines the metadata to use by inspecting the `git-svn-id` footer of the | |
21 HEAD of the remote upstream ref (by default, `origin/master`). `git-svn-id` | |
22 footers look like this: | |
23 | |
24 git-svn-id: svn://some.host.org/repo/path/to/a/sub/folder@123456 0039d316-1c4b
-4281-b951-d872f2087c98 | |
25 | |
26 `git auto-svn` extracts the repository url | |
27 (svn://some.host.org/repo/path/to/a/sub/folder) from the `git-svn-id`, and | |
28 splits it into the root repository (svn://some.host.org/repo) and the path | |
29 within that repository (/path/to/a/sub/folder). | |
30 | |
31 It then sets up the following stanza in .git/config: | |
32 | |
33 [svn-remote "svn"] | |
34 url = svn://some.host.org/repo | |
35 fetch = path/to/a/sub/folder:refs/remotes/origin/master | |
36 | |
37 Finally, it runs `git svn fetch` to pull in the data from the svn remote. | |
38 | |
39 CONFIGURATION VARIABLES | |
40 ----------------------- | |
41 | |
42 svn-remote.svn.url | |
43 ~~~~~~~~~~~~~~~~~~ | |
44 | |
45 This is the url of the root of the remote svn repository. | |
46 | |
47 svn-remote.svn.fetch | |
48 ~~~~~~~~~~~~~~~~~~~~ | |
49 | |
50 This looks like a git refspec, but maps a subdirectory of the svn repository | |
51 to a single ref in the git remote. | |
52 | |
53 EXAMPLE | |
54 ------- | |
55 | |
56 git clone https://chromium.googlesource.com/chromium/tools/depot_tools | |
57 cd depot_tools | |
58 git auto-svn | |
59 | |
60 This results in the following stanza in `depot_tools/.git/config`: | |
61 | |
62 [svn-remote "svn"] | |
63 url = svn://svn.chromium.org/chrome | |
64 fetch = trunk/tools/depot_tools:refs/remotes/origin/master | |
65 | |
66 | |
67 include::_footer.txt[] | |
68 | |
69 // vim: ft=asciidoc: | |
OLD | NEW |