Show More
@@ -0,0 +1,218 b'' | |||||
|
1 | # Copyright 2020 Joerg Sonnenberger <joerg@bec.de> | |||
|
2 | # | |||
|
3 | # This software may be used and distributed according to the terms of the | |||
|
4 | # GNU General Public License version 2 or any later version. | |||
|
5 | """export repositories as git fast-import stream""" | |||
|
6 | ||||
|
7 | # The format specification for fast-import streams can be found at | |||
|
8 | # https://git-scm.com/docs/git-fast-import#_input_format | |||
|
9 | ||||
|
10 | from __future__ import absolute_import | |||
|
11 | import re | |||
|
12 | ||||
|
13 | from mercurial.i18n import _ | |||
|
14 | from mercurial.node import hex, nullrev | |||
|
15 | from mercurial.utils import stringutil | |||
|
16 | from mercurial import ( | |||
|
17 | error, | |||
|
18 | pycompat, | |||
|
19 | registrar, | |||
|
20 | scmutil, | |||
|
21 | ) | |||
|
22 | from .convert import convcmd | |||
|
23 | ||||
|
24 | # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for | |||
|
25 | # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should | |||
|
26 | # be specifying the version(s) of Mercurial they are tested with, or | |||
|
27 | # leave the attribute unspecified. | |||
|
28 | testedwith = b"ships-with-hg-core" | |||
|
29 | ||||
|
30 | cmdtable = {} | |||
|
31 | command = registrar.command(cmdtable) | |||
|
32 | ||||
|
33 | GIT_PERSON_PROHIBITED = re.compile(b'[<>\n"]') | |||
|
34 | GIT_EMAIL_PROHIBITED = re.compile(b"[<> \n]") | |||
|
35 | ||||
|
36 | ||||
|
37 | def convert_to_git_user(authormap, user, rev): | |||
|
38 | mapped_user = authormap.get(user, user) | |||
|
39 | user_person = stringutil.person(mapped_user) | |||
|
40 | user_email = stringutil.email(mapped_user) | |||
|
41 | if GIT_EMAIL_PROHIBITED.match(user_email) or GIT_PERSON_PROHIBITED.match( | |||
|
42 | user_person | |||
|
43 | ): | |||
|
44 | raise error.Abort( | |||
|
45 | _(b"Unable to parse user into person and email for revision " + rev) | |||
|
46 | ) | |||
|
47 | if user_person: | |||
|
48 | return b'"' + user_person + b'" <' + user_email + b'>' | |||
|
49 | else: | |||
|
50 | return b"<" + user_email + b">" | |||
|
51 | ||||
|
52 | ||||
|
53 | def convert_to_git_date(date): | |||
|
54 | timestamp, utcoff = date | |||
|
55 | tzsign = b"+" if utcoff < 0 else b"-" | |||
|
56 | if utcoff % 60 != 0: | |||
|
57 | raise error.Abort( | |||
|
58 | _(b"UTC offset in %b is not an integer number of seconds") % (date,) | |||
|
59 | ) | |||
|
60 | utcoff = abs(utcoff) // 60 | |||
|
61 | tzh = utcoff // 60 | |||
|
62 | tzmin = utcoff % 60 | |||
|
63 | return b"%d " % int(timestamp) + tzsign + b"%02d%02d" % (tzh, tzmin) | |||
|
64 | ||||
|
65 | ||||
|
66 | def convert_to_git_ref(branch): | |||
|
67 | # XXX filter/map depending on git restrictions | |||
|
68 | return b"refs/heads/" + branch | |||
|
69 | ||||
|
70 | ||||
|
71 | def write_data(buf, data, skip_newline): | |||
|
72 | buf.append(b"data %d\n" % len(data)) | |||
|
73 | buf.append(data) | |||
|
74 | if not skip_newline or data[-1:] != b"\n": | |||
|
75 | buf.append(b"\n") | |||
|
76 | ||||
|
77 | ||||
|
78 | def export_commit(ui, repo, rev, marks, authormap): | |||
|
79 | ctx = repo[rev] | |||
|
80 | revid = ctx.hex() | |||
|
81 | if revid in marks: | |||
|
82 | ui.warn(_(b"warning: revision %s already exported, skipped\n") % revid) | |||
|
83 | return | |||
|
84 | parents = [p for p in ctx.parents() if p.rev() != nullrev] | |||
|
85 | for p in parents: | |||
|
86 | if p.hex() not in marks: | |||
|
87 | ui.warn( | |||
|
88 | _(b"warning: parent %s of %s has not been exported, skipped\n") | |||
|
89 | % (p, revid) | |||
|
90 | ) | |||
|
91 | return | |||
|
92 | ||||
|
93 | # For all files modified by the commit, check if they have already | |||
|
94 | # been exported and otherwise dump the blob with the new mark. | |||
|
95 | for fname in ctx.files(): | |||
|
96 | if fname not in ctx: | |||
|
97 | continue | |||
|
98 | filectx = ctx.filectx(fname) | |||
|
99 | filerev = hex(filectx.filenode()) | |||
|
100 | if filerev not in marks: | |||
|
101 | mark = len(marks) + 1 | |||
|
102 | marks[filerev] = mark | |||
|
103 | data = filectx.data() | |||
|
104 | buf = [b"blob\n", b"mark :%d\n" % mark] | |||
|
105 | write_data(buf, data, False) | |||
|
106 | ui.write(*buf, keepprogressbar=True) | |||
|
107 | del buf | |||
|
108 | ||||
|
109 | # Assign a mark for the current revision for references by | |||
|
110 | # latter merge commits. | |||
|
111 | mark = len(marks) + 1 | |||
|
112 | marks[revid] = mark | |||
|
113 | ||||
|
114 | ref = convert_to_git_ref(ctx.branch()) | |||
|
115 | buf = [ | |||
|
116 | b"commit %s\n" % ref, | |||
|
117 | b"mark :%d\n" % mark, | |||
|
118 | b"committer %s %s\n" | |||
|
119 | % ( | |||
|
120 | convert_to_git_user(authormap, ctx.user(), revid), | |||
|
121 | convert_to_git_date(ctx.date()), | |||
|
122 | ), | |||
|
123 | ] | |||
|
124 | write_data(buf, ctx.description(), True) | |||
|
125 | if parents: | |||
|
126 | buf.append(b"from :%d\n" % marks[parents[0].hex()]) | |||
|
127 | if len(parents) == 2: | |||
|
128 | buf.append(b"merge :%d\n" % marks[parents[1].hex()]) | |||
|
129 | p0ctx = repo[parents[0]] | |||
|
130 | files = ctx.manifest().diff(p0ctx.manifest()) | |||
|
131 | else: | |||
|
132 | files = ctx.files() | |||
|
133 | filebuf = [] | |||
|
134 | for fname in files: | |||
|
135 | if fname not in ctx: | |||
|
136 | filebuf.append((fname, b"D %s\n" % fname)) | |||
|
137 | else: | |||
|
138 | filectx = ctx.filectx(fname) | |||
|
139 | filerev = filectx.filenode() | |||
|
140 | fileperm = b"755" if filectx.isexec() else b"644" | |||
|
141 | changed = b"M %s :%d %s\n" % (fileperm, marks[hex(filerev)], fname) | |||
|
142 | filebuf.append((fname, changed)) | |||
|
143 | filebuf.sort() | |||
|
144 | buf.extend(changed for (fname, changed) in filebuf) | |||
|
145 | del filebuf | |||
|
146 | buf.append(b"\n") | |||
|
147 | ui.write(*buf, keepprogressbar=True) | |||
|
148 | del buf | |||
|
149 | ||||
|
150 | ||||
|
151 | isrev = re.compile(b"^[0-9a-f]{40}$") | |||
|
152 | ||||
|
153 | ||||
|
154 | @command( | |||
|
155 | b"fastexport", | |||
|
156 | [ | |||
|
157 | (b"r", b"rev", [], _(b"revisions to export"), _(b"REV")), | |||
|
158 | (b"i", b"import-marks", b"", _(b"old marks file to read"), _(b"FILE")), | |||
|
159 | (b"e", b"export-marks", b"", _(b"new marks file to write"), _(b"FILE")), | |||
|
160 | ( | |||
|
161 | b"A", | |||
|
162 | b"authormap", | |||
|
163 | b"", | |||
|
164 | _(b"remap usernames using this file"), | |||
|
165 | _(b"FILE"), | |||
|
166 | ), | |||
|
167 | ], | |||
|
168 | _(b"[OPTION]... [REV]..."), | |||
|
169 | helpcategory=command.CATEGORY_IMPORT_EXPORT, | |||
|
170 | ) | |||
|
171 | def fastexport(ui, repo, *revs, **opts): | |||
|
172 | """export repository as git fast-import stream | |||
|
173 | ||||
|
174 | This command lets you dump a repository as a human-readable text stream. | |||
|
175 | It can be piped into corresponding import routines like "git fast-import". | |||
|
176 | Incremental dumps can be created by using marks files. | |||
|
177 | """ | |||
|
178 | opts = pycompat.byteskwargs(opts) | |||
|
179 | ||||
|
180 | revs += tuple(opts.get(b"rev", [])) | |||
|
181 | if not revs: | |||
|
182 | revs = scmutil.revrange(repo, [b":"]) | |||
|
183 | else: | |||
|
184 | revs = scmutil.revrange(repo, revs) | |||
|
185 | if not revs: | |||
|
186 | raise error.Abort(_(b"no revisions matched")) | |||
|
187 | authorfile = opts.get(b"authormap") | |||
|
188 | if authorfile: | |||
|
189 | authormap = convcmd.readauthormap(ui, authorfile) | |||
|
190 | else: | |||
|
191 | authormap = {} | |||
|
192 | ||||
|
193 | import_marks = opts.get(b"import_marks") | |||
|
194 | marks = {} | |||
|
195 | if import_marks: | |||
|
196 | with open(import_marks, "rb") as import_marks_file: | |||
|
197 | for line in import_marks_file: | |||
|
198 | line = line.strip() | |||
|
199 | if not isrev.match(line) or line in marks: | |||
|
200 | raise error.Abort(_(b"Corrupted marks file")) | |||
|
201 | marks[line] = len(marks) + 1 | |||
|
202 | ||||
|
203 | revs.sort() | |||
|
204 | with ui.makeprogress( | |||
|
205 | _(b"exporting"), unit=_(b"revisions"), total=len(revs) | |||
|
206 | ) as progress: | |||
|
207 | for rev in revs: | |||
|
208 | export_commit(ui, repo, rev, marks, authormap) | |||
|
209 | progress.increment() | |||
|
210 | ||||
|
211 | export_marks = opts.get(b"export_marks") | |||
|
212 | if export_marks: | |||
|
213 | with open(export_marks, "wb") as export_marks_file: | |||
|
214 | output_marks = [None] * len(marks) | |||
|
215 | for k, v in marks.items(): | |||
|
216 | output_marks[v - 1] = k | |||
|
217 | for k in output_marks: | |||
|
218 | export_marks_file.write(k + b"\n") |
This diff has been collapsed as it changes many lines, (855 lines changed) Show them Hide them | |||||
@@ -0,0 +1,855 b'' | |||||
|
1 | $ cat >> $HGRCPATH << EOF | |||
|
2 | > [extensions] | |||
|
3 | > fastexport= | |||
|
4 | > EOF | |||
|
5 | ||||
|
6 | $ hg init | |||
|
7 | ||||
|
8 | $ hg debugbuilddag -mon '+2:tbase @name1 +3:thead1 <tbase @name2 +4:thead2 @both /thead1 +2:tmaintip' | |||
|
9 | ||||
|
10 | $ hg up -r 10 | |||
|
11 | 13 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
12 | $ hg rm nf10 | |||
|
13 | $ hg commit -u debugbuilddag --date 'Thu Jan 01 00:00:12 1970 +0000' -m r12 | |||
|
14 | created new head | |||
|
15 | $ hg up -r 11 | |||
|
16 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
17 | $ hg merge -r 12 | |||
|
18 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
19 | (branch merge, don't forget to commit) | |||
|
20 | $ hg commit -m debugbuilddag --date 'Thu Jan 01 00:00:13 1970 +0000' | |||
|
21 | ||||
|
22 | $ hg log -G | |||
|
23 | @ changeset: 13:e5c379648af4 | |||
|
24 | |\ branch: both | |||
|
25 | | | tag: tip | |||
|
26 | | | parent: 11:2cbd52c10e88 | |||
|
27 | | | parent: 12:4f31c9604af6 | |||
|
28 | | | user: test | |||
|
29 | | | date: Thu Jan 01 00:00:13 1970 +0000 | |||
|
30 | | | summary: debugbuilddag | |||
|
31 | | | | |||
|
32 | | o changeset: 12:4f31c9604af6 | |||
|
33 | | | branch: both | |||
|
34 | | | parent: 10:9220596cb068 | |||
|
35 | | | user: debugbuilddag | |||
|
36 | | | date: Thu Jan 01 00:00:12 1970 +0000 | |||
|
37 | | | summary: r12 | |||
|
38 | | | | |||
|
39 | o | changeset: 11:2cbd52c10e88 | |||
|
40 | |/ branch: both | |||
|
41 | | tag: tmaintip | |||
|
42 | | user: debugbuilddag | |||
|
43 | | date: Thu Jan 01 00:00:11 1970 +0000 | |||
|
44 | | summary: r11 | |||
|
45 | | | |||
|
46 | o changeset: 10:9220596cb068 | |||
|
47 | | branch: both | |||
|
48 | | user: debugbuilddag | |||
|
49 | | date: Thu Jan 01 00:00:10 1970 +0000 | |||
|
50 | | summary: r10 | |||
|
51 | | | |||
|
52 | o changeset: 9:0767d147d86e | |||
|
53 | |\ branch: both | |||
|
54 | | | parent: 8:0d0219415f18 | |||
|
55 | | | parent: 4:e8bc3a6ab9ae | |||
|
56 | | | user: debugbuilddag | |||
|
57 | | | date: Thu Jan 01 00:00:09 1970 +0000 | |||
|
58 | | | summary: r9 | |||
|
59 | | | | |||
|
60 | | o changeset: 8:0d0219415f18 | |||
|
61 | | | branch: name2 | |||
|
62 | | | tag: thead2 | |||
|
63 | | | user: debugbuilddag | |||
|
64 | | | date: Thu Jan 01 00:00:08 1970 +0000 | |||
|
65 | | | summary: r8 | |||
|
66 | | | | |||
|
67 | | o changeset: 7:82c6c8b3ac68 | |||
|
68 | | | branch: name2 | |||
|
69 | | | user: debugbuilddag | |||
|
70 | | | date: Thu Jan 01 00:00:07 1970 +0000 | |||
|
71 | | | summary: r7 | |||
|
72 | | | | |||
|
73 | | o changeset: 6:94093a13175f | |||
|
74 | | | branch: name2 | |||
|
75 | | | user: debugbuilddag | |||
|
76 | | | date: Thu Jan 01 00:00:06 1970 +0000 | |||
|
77 | | | summary: r6 | |||
|
78 | | | | |||
|
79 | | o changeset: 5:4baee2f72e9e | |||
|
80 | | | branch: name2 | |||
|
81 | | | parent: 1:bf4022f1addd | |||
|
82 | | | user: debugbuilddag | |||
|
83 | | | date: Thu Jan 01 00:00:05 1970 +0000 | |||
|
84 | | | summary: r5 | |||
|
85 | | | | |||
|
86 | o | changeset: 4:e8bc3a6ab9ae | |||
|
87 | | | branch: name1 | |||
|
88 | | | tag: thead1 | |||
|
89 | | | user: debugbuilddag | |||
|
90 | | | date: Thu Jan 01 00:00:04 1970 +0000 | |||
|
91 | | | summary: r4 | |||
|
92 | | | | |||
|
93 | o | changeset: 3:46148e496a8a | |||
|
94 | | | branch: name1 | |||
|
95 | | | user: debugbuilddag | |||
|
96 | | | date: Thu Jan 01 00:00:03 1970 +0000 | |||
|
97 | | | summary: r3 | |||
|
98 | | | | |||
|
99 | o | changeset: 2:29863c4219cd | |||
|
100 | |/ branch: name1 | |||
|
101 | | user: debugbuilddag | |||
|
102 | | date: Thu Jan 01 00:00:02 1970 +0000 | |||
|
103 | | summary: r2 | |||
|
104 | | | |||
|
105 | o changeset: 1:bf4022f1addd | |||
|
106 | | tag: tbase | |||
|
107 | | user: debugbuilddag | |||
|
108 | | date: Thu Jan 01 00:00:01 1970 +0000 | |||
|
109 | | summary: r1 | |||
|
110 | | | |||
|
111 | o changeset: 0:ae6ae30a671b | |||
|
112 | user: debugbuilddag | |||
|
113 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
114 | summary: r0 | |||
|
115 | ||||
|
116 | ||||
|
117 | $ hg fastexport --export-marks fastexport.marks | |||
|
118 | blob | |||
|
119 | mark :1 | |||
|
120 | data 65 | |||
|
121 | 0 r0 | |||
|
122 | 1 | |||
|
123 | 2 | |||
|
124 | 3 | |||
|
125 | 4 | |||
|
126 | 5 | |||
|
127 | 6 | |||
|
128 | 7 | |||
|
129 | 8 | |||
|
130 | 9 | |||
|
131 | 10 | |||
|
132 | 11 | |||
|
133 | 12 | |||
|
134 | 13 | |||
|
135 | 14 | |||
|
136 | 15 | |||
|
137 | 16 | |||
|
138 | 17 | |||
|
139 | 18 | |||
|
140 | 19 | |||
|
141 | 20 | |||
|
142 | 21 | |||
|
143 | 22 | |||
|
144 | 23 | |||
|
145 | ||||
|
146 | blob | |||
|
147 | mark :2 | |||
|
148 | data 3 | |||
|
149 | r0 | |||
|
150 | ||||
|
151 | commit refs/heads/default | |||
|
152 | mark :3 | |||
|
153 | committer "debugbuilddag" <debugbuilddag> 0 -0000 | |||
|
154 | data 2 | |||
|
155 | r0 | |||
|
156 | M 644 :1 mf | |||
|
157 | M 644 :2 nf0 | |||
|
158 | M 644 :2 of | |||
|
159 | ||||
|
160 | blob | |||
|
161 | mark :4 | |||
|
162 | data 68 | |||
|
163 | 0 r0 | |||
|
164 | 1 | |||
|
165 | 2 r1 | |||
|
166 | 3 | |||
|
167 | 4 | |||
|
168 | 5 | |||
|
169 | 6 | |||
|
170 | 7 | |||
|
171 | 8 | |||
|
172 | 9 | |||
|
173 | 10 | |||
|
174 | 11 | |||
|
175 | 12 | |||
|
176 | 13 | |||
|
177 | 14 | |||
|
178 | 15 | |||
|
179 | 16 | |||
|
180 | 17 | |||
|
181 | 18 | |||
|
182 | 19 | |||
|
183 | 20 | |||
|
184 | 21 | |||
|
185 | 22 | |||
|
186 | 23 | |||
|
187 | ||||
|
188 | blob | |||
|
189 | mark :5 | |||
|
190 | data 3 | |||
|
191 | r1 | |||
|
192 | ||||
|
193 | blob | |||
|
194 | mark :6 | |||
|
195 | data 3 | |||
|
196 | r1 | |||
|
197 | ||||
|
198 | commit refs/heads/default | |||
|
199 | mark :7 | |||
|
200 | committer "debugbuilddag" <debugbuilddag> 1 -0000 | |||
|
201 | data 2 | |||
|
202 | r1 | |||
|
203 | from :3 | |||
|
204 | M 644 :4 mf | |||
|
205 | M 644 :5 nf1 | |||
|
206 | M 644 :6 of | |||
|
207 | ||||
|
208 | blob | |||
|
209 | mark :8 | |||
|
210 | data 71 | |||
|
211 | 0 r0 | |||
|
212 | 1 | |||
|
213 | 2 r1 | |||
|
214 | 3 | |||
|
215 | 4 r2 | |||
|
216 | 5 | |||
|
217 | 6 | |||
|
218 | 7 | |||
|
219 | 8 | |||
|
220 | 9 | |||
|
221 | 10 | |||
|
222 | 11 | |||
|
223 | 12 | |||
|
224 | 13 | |||
|
225 | 14 | |||
|
226 | 15 | |||
|
227 | 16 | |||
|
228 | 17 | |||
|
229 | 18 | |||
|
230 | 19 | |||
|
231 | 20 | |||
|
232 | 21 | |||
|
233 | 22 | |||
|
234 | 23 | |||
|
235 | ||||
|
236 | blob | |||
|
237 | mark :9 | |||
|
238 | data 3 | |||
|
239 | r2 | |||
|
240 | ||||
|
241 | blob | |||
|
242 | mark :10 | |||
|
243 | data 3 | |||
|
244 | r2 | |||
|
245 | ||||
|
246 | commit refs/heads/name1 | |||
|
247 | mark :11 | |||
|
248 | committer "debugbuilddag" <debugbuilddag> 2 -0000 | |||
|
249 | data 2 | |||
|
250 | r2 | |||
|
251 | from :7 | |||
|
252 | M 644 :8 mf | |||
|
253 | M 644 :9 nf2 | |||
|
254 | M 644 :10 of | |||
|
255 | ||||
|
256 | blob | |||
|
257 | mark :12 | |||
|
258 | data 74 | |||
|
259 | 0 r0 | |||
|
260 | 1 | |||
|
261 | 2 r1 | |||
|
262 | 3 | |||
|
263 | 4 r2 | |||
|
264 | 5 | |||
|
265 | 6 r3 | |||
|
266 | 7 | |||
|
267 | 8 | |||
|
268 | 9 | |||
|
269 | 10 | |||
|
270 | 11 | |||
|
271 | 12 | |||
|
272 | 13 | |||
|
273 | 14 | |||
|
274 | 15 | |||
|
275 | 16 | |||
|
276 | 17 | |||
|
277 | 18 | |||
|
278 | 19 | |||
|
279 | 20 | |||
|
280 | 21 | |||
|
281 | 22 | |||
|
282 | 23 | |||
|
283 | ||||
|
284 | blob | |||
|
285 | mark :13 | |||
|
286 | data 3 | |||
|
287 | r3 | |||
|
288 | ||||
|
289 | blob | |||
|
290 | mark :14 | |||
|
291 | data 3 | |||
|
292 | r3 | |||
|
293 | ||||
|
294 | commit refs/heads/name1 | |||
|
295 | mark :15 | |||
|
296 | committer "debugbuilddag" <debugbuilddag> 3 -0000 | |||
|
297 | data 2 | |||
|
298 | r3 | |||
|
299 | from :11 | |||
|
300 | M 644 :12 mf | |||
|
301 | M 644 :13 nf3 | |||
|
302 | M 644 :14 of | |||
|
303 | ||||
|
304 | blob | |||
|
305 | mark :16 | |||
|
306 | data 77 | |||
|
307 | 0 r0 | |||
|
308 | 1 | |||
|
309 | 2 r1 | |||
|
310 | 3 | |||
|
311 | 4 r2 | |||
|
312 | 5 | |||
|
313 | 6 r3 | |||
|
314 | 7 | |||
|
315 | 8 r4 | |||
|
316 | 9 | |||
|
317 | 10 | |||
|
318 | 11 | |||
|
319 | 12 | |||
|
320 | 13 | |||
|
321 | 14 | |||
|
322 | 15 | |||
|
323 | 16 | |||
|
324 | 17 | |||
|
325 | 18 | |||
|
326 | 19 | |||
|
327 | 20 | |||
|
328 | 21 | |||
|
329 | 22 | |||
|
330 | 23 | |||
|
331 | ||||
|
332 | blob | |||
|
333 | mark :17 | |||
|
334 | data 3 | |||
|
335 | r4 | |||
|
336 | ||||
|
337 | blob | |||
|
338 | mark :18 | |||
|
339 | data 3 | |||
|
340 | r4 | |||
|
341 | ||||
|
342 | commit refs/heads/name1 | |||
|
343 | mark :19 | |||
|
344 | committer "debugbuilddag" <debugbuilddag> 4 -0000 | |||
|
345 | data 2 | |||
|
346 | r4 | |||
|
347 | from :15 | |||
|
348 | M 644 :16 mf | |||
|
349 | M 644 :17 nf4 | |||
|
350 | M 644 :18 of | |||
|
351 | ||||
|
352 | blob | |||
|
353 | mark :20 | |||
|
354 | data 71 | |||
|
355 | 0 r0 | |||
|
356 | 1 | |||
|
357 | 2 r1 | |||
|
358 | 3 | |||
|
359 | 4 | |||
|
360 | 5 | |||
|
361 | 6 | |||
|
362 | 7 | |||
|
363 | 8 | |||
|
364 | 9 | |||
|
365 | 10 r5 | |||
|
366 | 11 | |||
|
367 | 12 | |||
|
368 | 13 | |||
|
369 | 14 | |||
|
370 | 15 | |||
|
371 | 16 | |||
|
372 | 17 | |||
|
373 | 18 | |||
|
374 | 19 | |||
|
375 | 20 | |||
|
376 | 21 | |||
|
377 | 22 | |||
|
378 | 23 | |||
|
379 | ||||
|
380 | blob | |||
|
381 | mark :21 | |||
|
382 | data 3 | |||
|
383 | r5 | |||
|
384 | ||||
|
385 | blob | |||
|
386 | mark :22 | |||
|
387 | data 3 | |||
|
388 | r5 | |||
|
389 | ||||
|
390 | commit refs/heads/name2 | |||
|
391 | mark :23 | |||
|
392 | committer "debugbuilddag" <debugbuilddag> 5 -0000 | |||
|
393 | data 2 | |||
|
394 | r5 | |||
|
395 | from :7 | |||
|
396 | M 644 :20 mf | |||
|
397 | M 644 :21 nf5 | |||
|
398 | M 644 :22 of | |||
|
399 | ||||
|
400 | blob | |||
|
401 | mark :24 | |||
|
402 | data 74 | |||
|
403 | 0 r0 | |||
|
404 | 1 | |||
|
405 | 2 r1 | |||
|
406 | 3 | |||
|
407 | 4 | |||
|
408 | 5 | |||
|
409 | 6 | |||
|
410 | 7 | |||
|
411 | 8 | |||
|
412 | 9 | |||
|
413 | 10 r5 | |||
|
414 | 11 | |||
|
415 | 12 r6 | |||
|
416 | 13 | |||
|
417 | 14 | |||
|
418 | 15 | |||
|
419 | 16 | |||
|
420 | 17 | |||
|
421 | 18 | |||
|
422 | 19 | |||
|
423 | 20 | |||
|
424 | 21 | |||
|
425 | 22 | |||
|
426 | 23 | |||
|
427 | ||||
|
428 | blob | |||
|
429 | mark :25 | |||
|
430 | data 3 | |||
|
431 | r6 | |||
|
432 | ||||
|
433 | blob | |||
|
434 | mark :26 | |||
|
435 | data 3 | |||
|
436 | r6 | |||
|
437 | ||||
|
438 | commit refs/heads/name2 | |||
|
439 | mark :27 | |||
|
440 | committer "debugbuilddag" <debugbuilddag> 6 -0000 | |||
|
441 | data 2 | |||
|
442 | r6 | |||
|
443 | from :23 | |||
|
444 | M 644 :24 mf | |||
|
445 | M 644 :25 nf6 | |||
|
446 | M 644 :26 of | |||
|
447 | ||||
|
448 | blob | |||
|
449 | mark :28 | |||
|
450 | data 77 | |||
|
451 | 0 r0 | |||
|
452 | 1 | |||
|
453 | 2 r1 | |||
|
454 | 3 | |||
|
455 | 4 | |||
|
456 | 5 | |||
|
457 | 6 | |||
|
458 | 7 | |||
|
459 | 8 | |||
|
460 | 9 | |||
|
461 | 10 r5 | |||
|
462 | 11 | |||
|
463 | 12 r6 | |||
|
464 | 13 | |||
|
465 | 14 r7 | |||
|
466 | 15 | |||
|
467 | 16 | |||
|
468 | 17 | |||
|
469 | 18 | |||
|
470 | 19 | |||
|
471 | 20 | |||
|
472 | 21 | |||
|
473 | 22 | |||
|
474 | 23 | |||
|
475 | ||||
|
476 | blob | |||
|
477 | mark :29 | |||
|
478 | data 3 | |||
|
479 | r7 | |||
|
480 | ||||
|
481 | blob | |||
|
482 | mark :30 | |||
|
483 | data 3 | |||
|
484 | r7 | |||
|
485 | ||||
|
486 | commit refs/heads/name2 | |||
|
487 | mark :31 | |||
|
488 | committer "debugbuilddag" <debugbuilddag> 7 -0000 | |||
|
489 | data 2 | |||
|
490 | r7 | |||
|
491 | from :27 | |||
|
492 | M 644 :28 mf | |||
|
493 | M 644 :29 nf7 | |||
|
494 | M 644 :30 of | |||
|
495 | ||||
|
496 | blob | |||
|
497 | mark :32 | |||
|
498 | data 80 | |||
|
499 | 0 r0 | |||
|
500 | 1 | |||
|
501 | 2 r1 | |||
|
502 | 3 | |||
|
503 | 4 | |||
|
504 | 5 | |||
|
505 | 6 | |||
|
506 | 7 | |||
|
507 | 8 | |||
|
508 | 9 | |||
|
509 | 10 r5 | |||
|
510 | 11 | |||
|
511 | 12 r6 | |||
|
512 | 13 | |||
|
513 | 14 r7 | |||
|
514 | 15 | |||
|
515 | 16 r8 | |||
|
516 | 17 | |||
|
517 | 18 | |||
|
518 | 19 | |||
|
519 | 20 | |||
|
520 | 21 | |||
|
521 | 22 | |||
|
522 | 23 | |||
|
523 | ||||
|
524 | blob | |||
|
525 | mark :33 | |||
|
526 | data 3 | |||
|
527 | r8 | |||
|
528 | ||||
|
529 | blob | |||
|
530 | mark :34 | |||
|
531 | data 3 | |||
|
532 | r8 | |||
|
533 | ||||
|
534 | commit refs/heads/name2 | |||
|
535 | mark :35 | |||
|
536 | committer "debugbuilddag" <debugbuilddag> 8 -0000 | |||
|
537 | data 2 | |||
|
538 | r8 | |||
|
539 | from :31 | |||
|
540 | M 644 :32 mf | |||
|
541 | M 644 :33 nf8 | |||
|
542 | M 644 :34 of | |||
|
543 | ||||
|
544 | blob | |||
|
545 | mark :36 | |||
|
546 | data 92 | |||
|
547 | 0 r0 | |||
|
548 | 1 | |||
|
549 | 2 r1 | |||
|
550 | 3 | |||
|
551 | 4 r2 | |||
|
552 | 5 | |||
|
553 | 6 r3 | |||
|
554 | 7 | |||
|
555 | 8 r4 | |||
|
556 | 9 | |||
|
557 | 10 r5 | |||
|
558 | 11 | |||
|
559 | 12 r6 | |||
|
560 | 13 | |||
|
561 | 14 r7 | |||
|
562 | 15 | |||
|
563 | 16 r8 | |||
|
564 | 17 | |||
|
565 | 18 r9 | |||
|
566 | 19 | |||
|
567 | 20 | |||
|
568 | 21 | |||
|
569 | 22 | |||
|
570 | 23 | |||
|
571 | ||||
|
572 | blob | |||
|
573 | mark :37 | |||
|
574 | data 3 | |||
|
575 | r9 | |||
|
576 | ||||
|
577 | blob | |||
|
578 | mark :38 | |||
|
579 | data 3 | |||
|
580 | r9 | |||
|
581 | ||||
|
582 | commit refs/heads/both | |||
|
583 | mark :39 | |||
|
584 | committer "debugbuilddag" <debugbuilddag> 9 -0000 | |||
|
585 | data 2 | |||
|
586 | r9 | |||
|
587 | from :35 | |||
|
588 | merge :19 | |||
|
589 | M 644 :36 mf | |||
|
590 | M 644 :9 nf2 | |||
|
591 | M 644 :13 nf3 | |||
|
592 | M 644 :17 nf4 | |||
|
593 | M 644 :37 nf9 | |||
|
594 | M 644 :38 of | |||
|
595 | ||||
|
596 | blob | |||
|
597 | mark :40 | |||
|
598 | data 96 | |||
|
599 | 0 r0 | |||
|
600 | 1 | |||
|
601 | 2 r1 | |||
|
602 | 3 | |||
|
603 | 4 r2 | |||
|
604 | 5 | |||
|
605 | 6 r3 | |||
|
606 | 7 | |||
|
607 | 8 r4 | |||
|
608 | 9 | |||
|
609 | 10 r5 | |||
|
610 | 11 | |||
|
611 | 12 r6 | |||
|
612 | 13 | |||
|
613 | 14 r7 | |||
|
614 | 15 | |||
|
615 | 16 r8 | |||
|
616 | 17 | |||
|
617 | 18 r9 | |||
|
618 | 19 | |||
|
619 | 20 r10 | |||
|
620 | 21 | |||
|
621 | 22 | |||
|
622 | 23 | |||
|
623 | ||||
|
624 | blob | |||
|
625 | mark :41 | |||
|
626 | data 4 | |||
|
627 | r10 | |||
|
628 | ||||
|
629 | blob | |||
|
630 | mark :42 | |||
|
631 | data 4 | |||
|
632 | r10 | |||
|
633 | ||||
|
634 | commit refs/heads/both | |||
|
635 | mark :43 | |||
|
636 | committer "debugbuilddag" <debugbuilddag> 10 -0000 | |||
|
637 | data 3 | |||
|
638 | r10 | |||
|
639 | from :39 | |||
|
640 | M 644 :40 mf | |||
|
641 | M 644 :41 nf10 | |||
|
642 | M 644 :42 of | |||
|
643 | ||||
|
644 | blob | |||
|
645 | mark :44 | |||
|
646 | data 100 | |||
|
647 | 0 r0 | |||
|
648 | 1 | |||
|
649 | 2 r1 | |||
|
650 | 3 | |||
|
651 | 4 r2 | |||
|
652 | 5 | |||
|
653 | 6 r3 | |||
|
654 | 7 | |||
|
655 | 8 r4 | |||
|
656 | 9 | |||
|
657 | 10 r5 | |||
|
658 | 11 | |||
|
659 | 12 r6 | |||
|
660 | 13 | |||
|
661 | 14 r7 | |||
|
662 | 15 | |||
|
663 | 16 r8 | |||
|
664 | 17 | |||
|
665 | 18 r9 | |||
|
666 | 19 | |||
|
667 | 20 r10 | |||
|
668 | 21 | |||
|
669 | 22 r11 | |||
|
670 | 23 | |||
|
671 | ||||
|
672 | blob | |||
|
673 | mark :45 | |||
|
674 | data 4 | |||
|
675 | r11 | |||
|
676 | ||||
|
677 | blob | |||
|
678 | mark :46 | |||
|
679 | data 4 | |||
|
680 | r11 | |||
|
681 | ||||
|
682 | commit refs/heads/both | |||
|
683 | mark :47 | |||
|
684 | committer "debugbuilddag" <debugbuilddag> 11 -0000 | |||
|
685 | data 3 | |||
|
686 | r11 | |||
|
687 | from :43 | |||
|
688 | M 644 :44 mf | |||
|
689 | M 644 :45 nf11 | |||
|
690 | M 644 :46 of | |||
|
691 | ||||
|
692 | commit refs/heads/both | |||
|
693 | mark :48 | |||
|
694 | committer "debugbuilddag" <debugbuilddag> 12 -0000 | |||
|
695 | data 3 | |||
|
696 | r12 | |||
|
697 | from :43 | |||
|
698 | D nf10 | |||
|
699 | ||||
|
700 | commit refs/heads/both | |||
|
701 | mark :49 | |||
|
702 | committer "test" <test> 13 -0000 | |||
|
703 | data 13 | |||
|
704 | debugbuilddag | |||
|
705 | from :47 | |||
|
706 | merge :48 | |||
|
707 | D nf10 | |||
|
708 | ||||
|
709 | $ cat fastexport.marks | |||
|
710 | e1767c7564f83127d75331428473dd0512b36cc6 | |||
|
711 | 2c436e3f677d989438ddd9a7e5e4d56e016dfd35 | |||
|
712 | ae6ae30a671be09096aaaf51217b3691eec0eee0 | |||
|
713 | 016f8fd6128ac4bd19ec5a6ae128dadc3873b13f | |||
|
714 | a0e6fc91007068df3bc60f46ce0a893a73189b54 | |||
|
715 | 1a085e1daf625e186ee0064c64ff41731a901f24 | |||
|
716 | bf4022f1addd28523fb1122ac6166a29da58d34c | |||
|
717 | 2c45ad1c720111830380baa89a6a16cae1bef688 | |||
|
718 | 180506669a19f4b8317009fc6fa0043966d1ffb4 | |||
|
719 | 1ebc486e6a5c2c8ca7e531cf0b63dfcc071ec324 | |||
|
720 | 29863c4219cd68e0f57aecd5ffc12ba83313f26b | |||
|
721 | d20e5eeac6991189eefad45cd8ea0f6a32ce8122 | |||
|
722 | 710c4580a600b8aadc63fa3d7bb0fab71b127c04 | |||
|
723 | fa27314b56d7b6f90c1caeebb2a74730b3747574 | |||
|
724 | 46148e496a8a75fde9e203b1ded69ec99289af27 | |||
|
725 | e5548c667d7eeb6c326e723c579888341329c9fe | |||
|
726 | 3c1407305701051cbed9f9cb9a68bdfb5997c235 | |||
|
727 | e2ed51893b0a54bd7fef5a406a0c489d668f19c3 | |||
|
728 | e8bc3a6ab9aef589f5db504f401953449a3c3a10 | |||
|
729 | 558f3a23efc0a1a972e14d5314a65918791b77be | |||
|
730 | 0dbd89c185f53a1727c54cd1ce256482fa23968e | |||
|
731 | f84faeb138605b36d74324c6d0ea76a9099c3567 | |||
|
732 | 4baee2f72e9eeae2aef5b9e1ec416020090672ef | |||
|
733 | 412c5793886eaaabb31debd36695f6215a719865 | |||
|
734 | a0eafc60760d32b690564b8588ba042cc63e0c74 | |||
|
735 | a53842517de32d2f926c38a170c29dc90ae3348a | |||
|
736 | 94093a13175f1cfcbbfddaa0ceafbd3a89784b91 | |||
|
737 | d2f0d76af0be0da17ec88190215eadb8706689ab | |||
|
738 | 639939af794373d6c2ab12c2ef637cd220174389 | |||
|
739 | cc8921e2b19a88147643ea825459ffa140e3d704 | |||
|
740 | 82c6c8b3ac6873fadd9083323b02cc6a53659130 | |||
|
741 | c6cc0b14a3e6e61906242d6fce28b9510c9f9208 | |||
|
742 | 093593169cb4716f94e52ed7561bb84b36b7eb9d | |||
|
743 | 034df75dc138e7507e061d26170b4c44321a5d92 | |||
|
744 | 0d0219415f18c43636163fff4160f41600951a25 | |||
|
745 | f13693f6e6052eeb189521945fef56892e812fdb | |||
|
746 | 1239c633b8a7a7283825dba9171bf285e5790852 | |||
|
747 | 34b655bd51e8573b8e85c1c1476a94d8573babef | |||
|
748 | 0767d147d86e1546593bda50f1e11276c0ac8f1a | |||
|
749 | 284ca43bbbe82e89c0f1d977e8ac6cfb969c05ec | |||
|
750 | 15315ab9e272ec81ae8d847996e5bdecd5635b0b | |||
|
751 | 78c10aaf21f49d518c7ccb8318c29abb5d4e5db7 | |||
|
752 | 9220596cb068dfc73e2f7e695dc8ad0858a936db | |||
|
753 | 32abd0da49b7c7ee756298fc46a15584d6aedc99 | |||
|
754 | 33fbc651630ffa7ccbebfe4eb91320a873e7291c | |||
|
755 | 868d828870663d075cdcff502d26cf8445ce068e | |||
|
756 | 2cbd52c10e88ce604402dc83a869ec4f07765b3d | |||
|
757 | 4f31c9604af676986343d775b05695f535e8db5e | |||
|
758 | e5c379648af4c9fa3b5546ab7ee6e61a36082830 | |||
|
759 | ||||
|
760 | $ hg fastexport --export-marks fastexport.marks2 -r 0 | |||
|
761 | blob | |||
|
762 | mark :1 | |||
|
763 | data 65 | |||
|
764 | 0 r0 | |||
|
765 | 1 | |||
|
766 | 2 | |||
|
767 | 3 | |||
|
768 | 4 | |||
|
769 | 5 | |||
|
770 | 6 | |||
|
771 | 7 | |||
|
772 | 8 | |||
|
773 | 9 | |||
|
774 | 10 | |||
|
775 | 11 | |||
|
776 | 12 | |||
|
777 | 13 | |||
|
778 | 14 | |||
|
779 | 15 | |||
|
780 | 16 | |||
|
781 | 17 | |||
|
782 | 18 | |||
|
783 | 19 | |||
|
784 | 20 | |||
|
785 | 21 | |||
|
786 | 22 | |||
|
787 | 23 | |||
|
788 | ||||
|
789 | blob | |||
|
790 | mark :2 | |||
|
791 | data 3 | |||
|
792 | r0 | |||
|
793 | ||||
|
794 | commit refs/heads/default | |||
|
795 | mark :3 | |||
|
796 | committer "debugbuilddag" <debugbuilddag> 0 -0000 | |||
|
797 | data 2 | |||
|
798 | r0 | |||
|
799 | M 644 :1 mf | |||
|
800 | M 644 :2 nf0 | |||
|
801 | M 644 :2 of | |||
|
802 | ||||
|
803 | $ cat fastexport.marks2 | |||
|
804 | e1767c7564f83127d75331428473dd0512b36cc6 | |||
|
805 | 2c436e3f677d989438ddd9a7e5e4d56e016dfd35 | |||
|
806 | ae6ae30a671be09096aaaf51217b3691eec0eee0 | |||
|
807 | $ hg fastexport --import-marks fastexport.marks2 -r 1 | |||
|
808 | blob | |||
|
809 | mark :4 | |||
|
810 | data 68 | |||
|
811 | 0 r0 | |||
|
812 | 1 | |||
|
813 | 2 r1 | |||
|
814 | 3 | |||
|
815 | 4 | |||
|
816 | 5 | |||
|
817 | 6 | |||
|
818 | 7 | |||
|
819 | 8 | |||
|
820 | 9 | |||
|
821 | 10 | |||
|
822 | 11 | |||
|
823 | 12 | |||
|
824 | 13 | |||
|
825 | 14 | |||
|
826 | 15 | |||
|
827 | 16 | |||
|
828 | 17 | |||
|
829 | 18 | |||
|
830 | 19 | |||
|
831 | 20 | |||
|
832 | 21 | |||
|
833 | 22 | |||
|
834 | 23 | |||
|
835 | ||||
|
836 | blob | |||
|
837 | mark :5 | |||
|
838 | data 3 | |||
|
839 | r1 | |||
|
840 | ||||
|
841 | blob | |||
|
842 | mark :6 | |||
|
843 | data 3 | |||
|
844 | r1 | |||
|
845 | ||||
|
846 | commit refs/heads/default | |||
|
847 | mark :7 | |||
|
848 | committer "debugbuilddag" <debugbuilddag> 1 -0000 | |||
|
849 | data 2 | |||
|
850 | r1 | |||
|
851 | from :3 | |||
|
852 | M 644 :4 mf | |||
|
853 | M 644 :5 nf1 | |||
|
854 | M 644 :6 of | |||
|
855 |
@@ -364,6 +364,7 b' Test extension help:' | |||||
364 | eol automatically manage newlines in repository files |
|
364 | eol automatically manage newlines in repository files | |
365 | extdiff command to allow external programs to compare revisions |
|
365 | extdiff command to allow external programs to compare revisions | |
366 | factotum http authentication with factotum |
|
366 | factotum http authentication with factotum | |
|
367 | fastexport export repositories as git fast-import stream | |||
367 | githelp try mapping git commands to Mercurial commands |
|
368 | githelp try mapping git commands to Mercurial commands | |
368 | gpg commands to sign and verify changesets |
|
369 | gpg commands to sign and verify changesets | |
369 | hgk browse the repository in a graphical way |
|
370 | hgk browse the repository in a graphical way |
General Comments 0
You need to be logged in to leave comments.
Login now