equal
deleted
inserted
replaced
113 |
113 |
114 for o in ( |
114 for o in ( |
115 b'date', |
115 b'date', |
116 b'user', |
116 b'user', |
117 b'log', |
117 b'log', |
|
118 b'no_commit', |
118 ): |
119 ): |
119 v = opts.get(o.decode('ascii')) |
120 v = opts.get(o.decode('ascii')) |
120 # if statedata is already set, it comes from --continue and test says |
121 # if statedata is already set, it comes from --continue and test says |
121 # we should honor them above the options (which seems weird). |
122 # we should honor them above the options (which seems weird). |
122 if v and o not in statedata: |
123 if v and o not in statedata: |
214 ) |
215 ) |
215 revs.remove(r) |
216 revs.remove(r) |
216 if not revs: |
217 if not revs: |
217 return None |
218 return None |
218 |
219 |
219 if opts.get('no_commit'): |
|
220 statedata[b'no_commit'] = True |
|
221 if opts.get('base'): |
220 if opts.get('base'): |
222 statedata[b'base'] = opts['base'] |
221 statedata[b'base'] = opts['base'] |
223 |
222 |
224 return "GRAFT", [graftstate, statedata, revs, editor, basectx, cont, opts] |
223 return "GRAFT", [graftstate, statedata, revs, editor, basectx, cont, opts] |
225 |
224 |
283 return 1 |
282 return 1 |
284 else: |
283 else: |
285 cont = False |
284 cont = False |
286 |
285 |
287 # commit if --no-commit is false |
286 # commit if --no-commit is false |
288 if not opts.get('no_commit'): |
287 if not statedata.get(b'no_commit'): |
289 node = repo.commit( |
288 node = repo.commit( |
290 text=message, user=user, date=date, extra=extra, editor=editor |
289 text=message, user=user, date=date, extra=extra, editor=editor |
291 ) |
290 ) |
292 if node is None: |
291 if node is None: |
293 ui.warn( |
292 ui.warn( |