mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
commit cloud: check that the secondary path is not the same as the first.
Summary: add this check to avoid overhead we don't need to backup to the secondary place if it is the same as the first. Reviewed By: singhsrb Differential Revision: D14187754 fbshipit-source-id: 6ee59ae2f0846716ca99253958af7088d0538df9
This commit is contained in:
parent
ac751a0ac1
commit
65b628a472
@ -431,7 +431,11 @@ def cloudsync(ui, repo, cloudrefs=None, **opts):
|
||||
except error.RepoError:
|
||||
path = None
|
||||
|
||||
if infinitepushbackup and path:
|
||||
if (
|
||||
infinitepushbackup
|
||||
and path
|
||||
and path.loc != commitcloudutil.getremotepath(repo, ui, None)
|
||||
):
|
||||
highlightdebug(ui, _("starting background backup to %s\n") % path.loc)
|
||||
infinitepushbackup._dobackgroundbackup(
|
||||
ui, repo, other, ["hg", "pushbackup"], **opts
|
||||
|
Loading…
Reference in New Issue
Block a user