Commit Graph

9 Commits

Author SHA1 Message Date
Mark Thomas
cb47493670 commitcloud: accept cloud bookmarks for hidden commits
Summary:
When receiving cloud bookmarks, if they point to a hidden/obsolete commit,
don't omit them.  The bookmark will make the commit visible again.

Reviewed By: quark-zju

Differential Revision: D14183009

fbshipit-source-id: ddcb8cce6aaa1eefae93490f76c3dffeaffda21c
2019-02-25 02:34:50 -08:00
Liubov Dmitrieva
ac401b9d9f commitcloud: trigger a backup to a secondary storage after cloud sync in the background
Summary:
We can't run in parallel at the moment as the log file and the lock file are
shared.

Every path maintains independent backup state (the previous diff).

The secondary backup state doesn't affect smartlog (only the main one)

The issue with this approach is that we maintain backup lock a bit longer.

Unfortunately, the progress in smartlog doesn't show anything about the second backup.

I added 'finished', it makes it easier to compare in the logs.

Reviewed By: markbt

Differential Revision: D14149399

fbshipit-source-id: f90e8aac6cb8dee53d5c7468bd6adba067e13362
2019-02-20 15:36:29 -08:00
Liubov Dmitrieva
ae7b506f80 infinitepush backup: separate depends on the remote infinitepush path
Summary:
We are going to support 2 different backends of Commit Cloud: Mercurial and
Mononoke.

Each of them should maintain local backup state separately.

Output of some tests have been slightly changes, this is because a separate backup
state, the same error appears earlier when we are trying the backup stacks.

The idea is to have separate backup states for different remote paths, but
there will be only one cloud sync state for the current source of
truth. We could include there the remote path and then validate that cloud sync
state is correct if the remote path has been changed.

However, for backup states it is much easier to have them separately (and we
will backup in 2 places)

Reviewed By: markbt

Differential Revision: D14138496

fbshipit-source-id: 0a7a763a395be5456cbd724bff7ebc069f03fb0e
2019-02-20 15:36:29 -08:00
Mark Thomas
c4a1a1bae4 commitcloud: exclude omitted heads from infinitepush backup state
Summary:
Commit cloud maintains the infinitepush backup state to match what it has
synced to commit cloud.  It should only include locally backed-up heads.
When syncing with the server and omitting some heads, don't include the omitted
ones.

Reviewed By: liubov-dmitrieva

Differential Revision: D13719477

fbshipit-source-id: 817c1a73a34af6b5550f6254e2b08d01283760a5
2019-01-17 16:31:21 -08:00
Mark Thomas
76078c9f23 commitcloud: pull in changes if maxage changes or full is specified
Summary:
If full is specified, or the maxage config option changes from one sync to
another, we need to actually pull in the new commits.  Since the version number
won't necessarily have changed, we need to request a full copy of the cloud
workspace to work from.

Reviewed By: liubov-dmitrieva

Differential Revision: D13214274

fbshipit-source-id: b21594c04c05f065caf9f9dc494e6274debbde5c
2018-11-27 07:20:30 -08:00
Mark Thomas
11cfc47382 commitcloud: don't bump version when there are omissions
Summary:
Stop comparing the local heads and bookmarks with the full cloud heads and
bookmarks when some heads or bookmarks have been omitted.  Since they're
omitted, they won't be there.

Reviewed By: liubov-dmitrieva

Differential Revision: D13214275

fbshipit-source-id: 35a897f053f58d0793d384ff60b8202e80aec0c7
2018-11-27 07:20:30 -08:00
Liubov Dmitrieva
bd569c3f32 commitcloud: fix omission logic if a bookmark was removed
Reviewed By: markbt

Differential Revision: D13196329

fbshipit-source-id: 78fd305dc9520f735383cd6e86bf020cb891c02e
2018-11-27 04:20:57 -08:00
Liubov Dmitrieva
665ea1b9ee commitcloud: print message in hg sl --all when commits are omitted
Summary:
When we have omitted syncing commits from the cloud workspace, give the user
advice on what to do to fetch them if they run `hg sl --all`.

Reviewed By: markbt

Differential Revision: D13085505

fbshipit-source-id: 624ce6cbf4cb2194ab5ffbc09c1ac3e073932249
2018-11-21 06:01:46 -08:00
Mark Thomas
a3c411c1e8 commitcloud: omit older commits when pulling during sync
Summary:
Add a new config option: `commitcloud.max_sync_age`.  When set, commit cloud
will not pull in any commits that are older than this when it is joining or
syncing.  The commits are still nominally in the cloud workspace, we just
save join or sync time by not including the commits.

Reviewed By: liubov-dmitrieva

Differential Revision: D13062470

fbshipit-source-id: 17a4bdb4095766a83a4bf6d4151ae86b39edf59c
2018-11-15 12:16:19 -08:00