diff --git a/infinitepush/backupcommands.py b/infinitepush/backupcommands.py --- a/infinitepush/backupcommands.py +++ b/infinitepush/backupcommands.py @@ -787,6 +787,7 @@ return repo.vfs.tryunlink(_backupstatefile) def _readlocalbackupstate(ui, repo): + repo = _getsrcrepo(repo) if not _localbackupstateexists(repo): return backupstate() diff --git a/tests/test-infinitepush-backup-share.t b/tests/test-infinitepush-backup-share.t --- a/tests/test-infinitepush-backup-share.t +++ b/tests/test-infinitepush-backup-share.t @@ -41,3 +41,17 @@ $ cat .hg/infinitepushbackupstate rubbish $ [ -f ../client/.hg/infinitepushbackupstate ] + +Make sure that isbackedup references the main repo + $ hg isbackedup -r : + b75a450e74d5a7708da8c3144fbeb4ac88694044 backed up + $ hg log -T '{rev}:{node} "{desc}"\n' -r 'notbackedup()' + +Make another commit that is not backed up and check that too + $ mkcommit second + $ hg isbackedup -r : + b75a450e74d5a7708da8c3144fbeb4ac88694044 backed up + bc64f6a267a06b03e9e0f96a6deae37ae89a832e not backed up + $ hg log -T '{rev}:{node} "{desc}"\n' -r 'notbackedup()' + 1:bc64f6a267a06b03e9e0f96a6deae37ae89a832e "second" +