infinitepush: don't show backup summary if a backup is in progress

If a backup is in progress (the backup lock is taken), we shouldn't show the
backup summary message as it will soon be out-of-date.

Differential Revision: https://phab.mercurial-scm.org/D1705
This commit is contained in:
Mark Thomas 2017-12-15 09:23:30 -08:00
parent 967170121d
commit 57a84eaeec

View File

@ -349,6 +349,11 @@ def smartlogsummary(ui, repo):
if not ui.configbool('infinitepushbackup', 'enablestatus'):
return
# Don't output the summary if a backup is currently in progress.
srcrepo = shareutil.getsrcrepo(repo)
if srcrepo.vfs.lexists(_backuplockname):
return
unbackeduprevs = repo.revs('notbackedup()')
# Count the number of changesets that haven't been backed up for 10 minutes.