Copy with revision already existing in destination storage

Use case: a repository backed up to a local storage, then this local storage is copied to a cloud storage, that is, the storages are “synchronized”.

Let’s say the last revision in local storage is 15, but this storage has not been copied to the cloud storage since revision 10, so the last revision in the cloud is 10.

local storage - last revision: 15
cloud storage - last revision: 10

If a backup is performed directly to the cloud storage, a revision 11 will be created, which will obviously be different from the existing “11” in the local storage.

Now the two storages have a “11” revision, but they are different.

Question: If the copy is then executed from the local to the cloud, what will happen? A total mess? Will only revision 11 be corrupted? Or will it simply give an error and nothing will be copied?

In this case, it will copy revisions 12, 13, 14, and 15 to the cloud storage. Revision 11 in the cloud storage will remain untouched and therefore won’t be corrupted, but it will be more recent than 12, 13, 14, and 15.

2 Likes