Show More
@@ -96,12 +96,6 def _process_args(ui, repo, *revs, **opt | |||||
96 | # read in unfinished revisions |
|
96 | # read in unfinished revisions | |
97 | if graftstate.exists(): |
|
97 | if graftstate.exists(): | |
98 | statedata = cmdutil.readgraftstate(repo, graftstate) |
|
98 | statedata = cmdutil.readgraftstate(repo, graftstate) | |
99 | if statedata.get(b'date'): |
|
|||
100 | opts['date'] = statedata[b'date'] |
|
|||
101 | if statedata.get(b'user'): |
|
|||
102 | opts['user'] = statedata[b'user'] |
|
|||
103 | if statedata.get(b'log'): |
|
|||
104 | opts['log'] = True |
|
|||
105 | if statedata.get(b'no_commit'): |
|
99 | if statedata.get(b'no_commit'): | |
106 | opts['no_commit'] = statedata.get(b'no_commit') |
|
100 | opts['no_commit'] = statedata.get(b'no_commit') | |
107 | if statedata.get(b'base'): |
|
101 | if statedata.get(b'base'): | |
@@ -117,6 +111,17 def _process_args(ui, repo, *revs, **opt | |||||
117 | cmdutil.bailifchanged(repo) |
|
111 | cmdutil.bailifchanged(repo) | |
118 | revs = logcmdutil.revrange(repo, revs) |
|
112 | revs = logcmdutil.revrange(repo, revs) | |
119 |
|
113 | |||
|
114 | for o in ( | |||
|
115 | b'date', | |||
|
116 | b'user', | |||
|
117 | b'log', | |||
|
118 | ): | |||
|
119 | v = opts.get(o.decode('ascii')) | |||
|
120 | # if statedata is already set, it comes from --continue and test says | |||
|
121 | # we should honor them above the options (which seems weird). | |||
|
122 | if v and o not in statedata: | |||
|
123 | statedata[o] = v | |||
|
124 | ||||
120 | skipped = set() |
|
125 | skipped = set() | |
121 | basectx = None |
|
126 | basectx = None | |
122 | if opts.get('base'): |
|
127 | if opts.get('base'): | |
@@ -251,18 +256,11 def _graft_revisions( | |||||
251 | extra[b'intermediate-source'] = ctx.hex() |
|
256 | extra[b'intermediate-source'] = ctx.hex() | |
252 | else: |
|
257 | else: | |
253 | extra[b'source'] = ctx.hex() |
|
258 | extra[b'source'] = ctx.hex() | |
254 | user = ctx.user() |
|
259 | user = statedata.get(b'user', ctx.user()) | |
255 | if opts.get('user'): |
|
260 | date = statedata.get(b'date', ctx.date()) | |
256 | user = opts['user'] |
|
|||
257 | statedata[b'user'] = user |
|
|||
258 | date = ctx.date() |
|
|||
259 | if opts.get('date'): |
|
|||
260 | date = opts['date'] |
|
|||
261 | statedata[b'date'] = date |
|
|||
262 | message = ctx.description() |
|
261 | message = ctx.description() | |
263 |
if |
|
262 | if statedata.get(b'log'): | |
264 | message += b'\n(grafted from %s)' % ctx.hex() |
|
263 | message += b'\n(grafted from %s)' % ctx.hex() | |
265 | statedata[b'log'] = True |
|
|||
266 |
|
264 | |||
267 | # we don't merge the first commit when continuing |
|
265 | # we don't merge the first commit when continuing | |
268 | if not cont: |
|
266 | if not cont: |
General Comments 0
You need to be logged in to leave comments.
Login now