##// 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 328 else:
329 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 338 def _docreatecmd(ui, repo, pats, opts):
332 339 wctx = repo[None]
333 340 parents = wctx.parents()
@@ -380,12 +387,7 b' def _docreatecmd(ui, repo, pats, opts):'
380 387 _nothingtoshelvemessaging(ui, repo, pats, opts)
381 388 return 1
382 389
383 bases = list(mutableancestors(repo[node]))
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
390 _shelvecreatedcommit(repo, node, name)
389 391
390 392 if ui.formatted():
391 393 desc = util.ellipsis(desc, ui.termwidth())
General Comments 0
You need to be logged in to leave comments. Login now