##// END OF EJS Templates
shelve: move actual created commit shelving to a separate function...
Kostia Balytskyi -
r30383:455f7856 default
parent child Browse files
Show More
@@ -328,6 +328,13 b' def _nothingtoshelvemessaging(ui, repo, '
328 else:
328 else:
329 ui.status(_("nothing changed\n"))
329 ui.status(_("nothing changed\n"))
330
330
331 def _shelvecreatedcommit(repo, node, name):
332 bases = list(mutableancestors(repo[node]))
333 shelvedfile(repo, name, 'hg').writebundle(bases, node)
334 cmdutil.export(repo, [node],
335 fp=shelvedfile(repo, name, 'patch').opener('wb'),
336 opts=mdiff.diffopts(git=True))
337
331 def _docreatecmd(ui, repo, pats, opts):
338 def _docreatecmd(ui, repo, pats, opts):
332 wctx = repo[None]
339 wctx = repo[None]
333 parents = wctx.parents()
340 parents = wctx.parents()
@@ -380,12 +387,7 b' def _docreatecmd(ui, repo, pats, opts):'
380 _nothingtoshelvemessaging(ui, repo, pats, opts)
387 _nothingtoshelvemessaging(ui, repo, pats, opts)
381 return 1
388 return 1
382
389
383 bases = list(mutableancestors(repo[node]))
390 _shelvecreatedcommit(repo, node, name)
384 shelvedfile(repo, name, 'hg').writebundle(bases, node)
385 cmdutil.export(repo, [node],
386 fp=shelvedfile(repo, name, 'patch').opener('wb'),
387 opts=mdiff.diffopts(git=True))
388
389
391
390 if ui.formatted():
392 if ui.formatted():
391 desc = util.ellipsis(desc, ui.termwidth())
393 desc = util.ellipsis(desc, ui.termwidth())
General Comments 0
You need to be logged in to leave comments. Login now