diff --git a/hgext3rd/obsshelve.py b/hgext3rd/obsshelve.py --- a/hgext3rd/obsshelve.py +++ b/hgext3rd/obsshelve.py @@ -57,6 +57,10 @@ rebase, ) +configtable = {} +configitem = registrar.configitem(configtable) +configitem('obsshelve', 'maxbackups', default=10) + cmdtable = {} command = registrar.command(cmdtable) testedwith = 'ships-with-fb-hgext' @@ -281,7 +285,7 @@ def cleanupoldbackups(repo): vfs = vfsmod.vfs(repo.vfs.join(backupdir)) - maxbackups = repo.ui.configint('shelve', 'maxbackups') + maxbackups = repo.ui.configint('obsshelve', 'maxbackups') hgfiles = [f for f in vfs.listdir() if f.endswith('.' + patchextension)] hgfiles = sorted([(vfs.stat(f).st_mtime, f) for f in hgfiles]) @@ -906,7 +910,7 @@ After a successful unshelve, the shelved changes are stored in a backup directory. Only the N most recent backups are kept. N - defaults to 10 but can be overridden using the ``shelve.maxbackups`` + defaults to 10 but can be overridden using the ``obsshelve.maxbackups`` configuration option. .. container:: verbose diff --git a/tests/test-obsshelve.t b/tests/test-obsshelve.t --- a/tests/test-obsshelve.t +++ b/tests/test-obsshelve.t @@ -8,7 +8,7 @@ > [defaults] > diff = --nodates --git > qnew = --date '0 0' - > [shelve] + > [obsshelve] > maxbackups = 2 > [experimental] > evolution=createmarkers