##// END OF EJS Templates
rebase: preserve metadata from grafts of changes (issue4001)
Augie Fackler -
r19861:a69a77a8 default
parent child Browse files
Show More
@@ -29,6 +29,11 b' cmdtable = {}'
29 29 command = cmdutil.command(cmdtable)
30 30 testedwith = 'internal'
31 31
32 def _savegraft(ctx, extra):
33 s = ctx.extra().get('source', None)
34 if s is not None:
35 extra['source'] = s
36
32 37 def _savebranch(ctx, extra):
33 38 extra['branch'] = ctx.branch()
34 39
@@ -151,7 +156,7 b' def rebase(ui, repo, **opts):'
151 156 collapsef = opts.get('collapse', False)
152 157 collapsemsg = cmdutil.logmessage(ui, opts)
153 158 e = opts.get('extrafn') # internal, used by e.g. hgsubversion
154 extrafns = []
159 extrafns = [_savegraft]
155 160 if e:
156 161 extrafns = [e]
157 162 keepf = opts.get('keep', False)
@@ -178,9 +178,9 b' More complex case were part of the rebas'
178 178 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {'date': '*', 'user': 'test'} (glob)
179 179 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 {'date': '*', 'user': 'test'} (glob)
180 180 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {'date': '*', 'user': 'test'} (glob)
181 08483444fef91d6224f6655ee586a65d263ad34c cbc07f26687521cecfc9a141bf5ecfc0fd2b8531 0 {'date': '* *', 'user': 'test'} (glob)
181 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 {'date': '* *', 'user': 'test'} (glob)
182 182 $ hg log -G
183 @ 11:cbc07f266875 D
183 @ 11:4596109a6a43 D
184 184 |
185 185 | o 10:5ae4c968c6ac C
186 186 | |
@@ -203,17 +203,17 b' More complex case were part of the rebas'
203 203 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {'date': '* *', 'user': 'test'} (glob)
204 204 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 {'date': '* *', 'user': 'test'} (glob)
205 205 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {'date': '* *', 'user': 'test'} (glob)
206 08483444fef91d6224f6655ee586a65d263ad34c cbc07f26687521cecfc9a141bf5ecfc0fd2b8531 0 {'date': '* *', 'user': 'test'} (glob)
207 8877864f1edb05d0e07dc4ba77b67a80a7b86672 b1861c79d66ec3aa1b607ac3c9fb819e38b12238 0 {'date': '* *', 'user': 'test'} (glob)
206 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 {'date': '* *', 'user': 'test'} (glob)
207 8877864f1edb05d0e07dc4ba77b67a80a7b86672 462a34d07e599b87ea08676a449373fe4e2e1347 0 {'date': '* *', 'user': 'test'} (glob)
208 208 08483444fef91d6224f6655ee586a65d263ad34c 0 {'date': '* *', 'user': 'test'} (glob)
209 5ae4c968c6aca831df823664e706c9d4aa34473d dd4be135457a404ce5541de427ae1d98a28f4acd 0 {'date': '* *', 'user': 'test'} (glob)
209 5ae4c968c6aca831df823664e706c9d4aa34473d 98f6af4ee9539e14da4465128f894c274900b6e5 0 {'date': '* *', 'user': 'test'} (glob)
210 210 $ hg log --rev 'divergent()'
211 211 $ hg log -G
212 @ 13:dd4be135457a C
212 @ 13:98f6af4ee953 C
213 213 |
214 o 12:b1861c79d66e B
214 o 12:462a34d07e59 B
215 215 |
216 o 11:cbc07f266875 D
216 o 11:4596109a6a43 D
217 217 |
218 218 o 7:02de42196ebe H
219 219 |
@@ -225,7 +225,22 b' More complex case were part of the rebas'
225 225 |/
226 226 o 0:cd010b8cd998 A
227 227
228
228 $ hg log --style default --debug -r 4596109a6a4328c398bde3a4a3b6737cfade3003
229 changeset: 11:4596109a6a4328c398bde3a4a3b6737cfade3003
230 phase: draft
231 parent: 7:02de42196ebee42ef284b6780a87cdc96e8eaab6
232 parent: -1:0000000000000000000000000000000000000000
233 manifest: 11:a91006e3a02f1edf631f7018e6e5684cf27dd905
234 user: Nicolas Dumazet <nicdumz.commits@gmail.com>
235 date: Sat Apr 30 15:24:48 2011 +0200
236 files+: D
237 extra: branch=default
238 extra: rebase_source=08483444fef91d6224f6655ee586a65d263ad34c
239 extra: source=32af7686d403cf45b5d95f2d70cebea587ac806a
240 description:
241 D
242
243
229 244 $ cd ..
230 245
231 246 collapse rebase
General Comments 0
You need to be logged in to leave comments. Login now