comparison mercurial/commands.py @ 28868:445a25bb70be

obsstore: move delete function from obsstore class to repair module Since one of the original patches was accepted already and people on the mailing list still have suggestions as to how this should be improved, I'm implementing those suggestions in the following patches (this and the ones that might follow).
author Kostia Balytskyi <ikostia@fb.com>
date Tue, 12 Apr 2016 04:06:50 -0700
parents ffcc649a4e8f
children 8d398155bfda
comparison
equal deleted inserted replaced
28867:ffcc649a4e8f 28868:445a25bb70be
3074 if repo.currenttransaction(): 3074 if repo.currenttransaction():
3075 raise error.Abort(_('cannot delete obsmarkers in the middle ' 3075 raise error.Abort(_('cannot delete obsmarkers in the middle '
3076 'of transaction.')) 3076 'of transaction.'))
3077 3077
3078 with repo.lock(): 3078 with repo.lock():
3079 n = repo.obsstore.delete(indices) 3079 n = repair.deleteobsmarkers(repo.obsstore, indices)
3080 ui.write(_('deleted %i obsolescense markers\n') % n) 3080 ui.write(_('deleted %i obsolescense markers\n') % n)
3081 3081
3082 return 3082 return
3083 3083
3084 if precursor is not None: 3084 if precursor is not None: