Show More
@@ -208,9 +208,7 b' def makememctx(repo, parents, text, user' | |||||
208 | if branch: |
|
208 | if branch: | |
209 | extra['branch'] = encoding.fromlocal(branch) |
|
209 | extra['branch'] = encoding.fromlocal(branch) | |
210 | ctx = memctx(repo, parents, text, files, getfilectx, user, |
|
210 | ctx = memctx(repo, parents, text, files, getfilectx, user, | |
211 | date, extra) |
|
211 | date, extra, editor) | |
212 | if editor: |
|
|||
213 | ctx._text = editor(repo, ctx, []) |
|
|||
214 | return ctx |
|
212 | return ctx | |
215 |
|
213 | |||
216 | class changectx(basectx): |
|
214 | class changectx(basectx): | |
@@ -1287,7 +1285,7 b' class memctx(object):' | |||||
1287 | is a dictionary of metadata or is left empty. |
|
1285 | is a dictionary of metadata or is left empty. | |
1288 | """ |
|
1286 | """ | |
1289 | def __init__(self, repo, parents, text, files, filectxfn, user=None, |
|
1287 | def __init__(self, repo, parents, text, files, filectxfn, user=None, | |
1290 | date=None, extra=None): |
|
1288 | date=None, extra=None, editor=False): | |
1291 | self._repo = repo |
|
1289 | self._repo = repo | |
1292 | self._rev = None |
|
1290 | self._rev = None | |
1293 | self._node = None |
|
1291 | self._node = None | |
@@ -1305,6 +1303,10 b' class memctx(object):' | |||||
1305 | if self._extra.get('branch', '') == '': |
|
1303 | if self._extra.get('branch', '') == '': | |
1306 | self._extra['branch'] = 'default' |
|
1304 | self._extra['branch'] = 'default' | |
1307 |
|
1305 | |||
|
1306 | if editor: | |||
|
1307 | self._text = editor(self._repo, self, []) | |||
|
1308 | self._repo.savecommitmessage(self._text) | |||
|
1309 | ||||
1308 | def __str__(self): |
|
1310 | def __str__(self): | |
1309 | return str(self._parents[0]) + "+" |
|
1311 | return str(self._parents[0]) + "+" | |
1310 |
|
1312 |
General Comments 0
You need to be logged in to leave comments.
Login now