diff --git a/infinitepush/backupcommands.py b/infinitepush/backupcommands.py --- a/infinitepush/backupcommands.py +++ b/infinitepush/backupcommands.py @@ -11,11 +11,6 @@ # Negative number means backup everything. maxheadstobackup = -1 - # Previously there was a bug in infinitepush backup and it made separate - # backup for the same repo if pushbackup was called from different working - # copies. This option cleans up the mess - tempcleanworkingcopiesbackups = False - # Nodes that should not be backed up. Ancestors of these nodes won't be # backed up either dontbackupnodes = [] @@ -309,7 +304,6 @@ def _dobackup(ui, repo, dest, **opts): ui.status(_('starting backup %s\n') % time.strftime('%H:%M:%S %d %b %Y %Z')) start = time.time() - maybesharedrepo = repo # to handle multiple working copies correctly repo = _getsrcrepo(repo) currentbkpgenerationvalue = _readbackupgenerationfile(repo.vfs) @@ -356,19 +350,6 @@ repo, newbookmarks, removedbookmarks, newheads, removedheads, namingmgr) - if maybesharedrepo.origroot != repo.origroot: - if (ui.config('infinitepushbackup', 'tempcleanworkingcopiesbackups') and - _localbackupstateexists(maybesharedrepo)): - # Previously there was a bug in infinitepush backup and it - # made multiple backups for the same repo if pushbackup was called - # from different working copies. Let's delete bookmarks for the - # same working copy - sharedreponamingmgr = BackupBookmarkNamingManager( - ui, maybesharedrepo) - bookmarkprefixtodelete = sharedreponamingmgr.getcommonprefix() - bookmarkstobackup[bookmarkprefixtodelete] = '' - _deletebackupstate(maybesharedrepo) - # Special case if backup state is empty. Clean all backup bookmarks from the # server. if bkpstate.empty(): 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,28 +41,3 @@ $ cat .hg/infinitepushbackupstate rubbish $ [ -f ../client/.hg/infinitepushbackupstate ] - -Test hacky infinitepushbackup.tempcleanworkingcopiesbackups config option that -cleans up unnecessary backup bookmarks from the server. -If this option is set and backup state file is present in shared working copy -then there are probably useless backup bookmarks on the server. -In that case `hg pushbackup` will send commands to clean them. And because of it -there should be no 'nothing to backup' line in the output. - $ hg --config infinitepushbackup.tempcleanworkingcopiesbackups=True pushbackup - starting backup .* (re) - finished in \d+\.(\d+)? seconds (re) - -Make sure that backup state file is deleted from shared working copy - $ [ -f .hg/infinitepushbackupstate ] - [1] - -Now backup state file is deleted, so there should be line `nothing to backup`. - $ hg --config infinitepushbackup.tempcleanworkingcopiesbackups=True pushbackup - starting backup .* (re) - nothing to backup - finished in \d+\.(\d+)? seconds (re) - -Make sure nothing important was deleted - $ [ -f ../client/.hg/infinitepushbackupstate ] - $ scratchbookmarks - infinitepush/backups/test/*$TESTTMP/client/heads/b75a450e74d5a7708da8c3144fbeb4ac88694044 b75a450e74d5a7708da8c3144fbeb4ac88694044 (glob)