comparison hgext/shelve.py @ 26942:d55d22840592

shelve: choose where .orig file locations are kept This patch uses cmdutil.origpath to let the user set the location of the orig files.
author Christian Delahousse <cdelahousse@fb.com>
date Tue, 10 Nov 2015 14:41:14 -0800
parents ae03d4190321
children b3b5ed560283
comparison
equal deleted inserted replaced
26941:454deda24315 26942:d55d22840592
505 files.extend(shelvectx.parents()[0].files()) 505 files.extend(shelvectx.parents()[0].files())
506 506
507 # revert will overwrite unknown files, so move them out of the way 507 # revert will overwrite unknown files, so move them out of the way
508 for file in repo.status(unknown=True).unknown: 508 for file in repo.status(unknown=True).unknown:
509 if file in files: 509 if file in files:
510 util.rename(file, file + ".orig") 510 util.rename(file, cmdutil.origpath(ui, repo, file))
511 ui.pushbuffer(True) 511 ui.pushbuffer(True)
512 cmdutil.revert(ui, repo, shelvectx, repo.dirstate.parents(), 512 cmdutil.revert(ui, repo, shelvectx, repo.dirstate.parents(),
513 *pathtofiles(repo, files), 513 *pathtofiles(repo, files),
514 **{'no_backup': True}) 514 **{'no_backup': True})
515 ui.popbuffer() 515 ui.popbuffer()