Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: man/src/git-auto-svn.txt

Issue 611253003: Introduct git-auto-svn (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Better docs Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
iannucci 2014/09/30 21:42:24 I'm assuming if you tell it to be origin/foobar, t
agable 2014/10/01 09:35:58 Yes, it's whatever git2.root() says it should be.
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.
iannucci 2014/09/30 21:42:24 dunno if you need these, since they're really docu
agable 2014/10/01 09:35:58 Yeah I know, but this seemed like a relevant place
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:
OLDNEW
« git-auto-svn ('K') | « man/src/_git-auto-svn_desc.helper.txt ('k') | man/src/make_docs.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698