Commit Graph

43191 Commits

Author SHA1 Message Date
Durham Goode
2cbb53922f pullbackups: fix phases coming back as public
Summary:
There was a bug where hg pullbackups could result in commits being
marked as public when they shouldn't have. The issue was the the server side
loop iterates over heads, inspecting bundles as it goes, but it would only mark
the phase root for the head it was currently processing. While processing a
given head's bundle, it would take note of any other heads in the bundle and
mark them for bundling as well, but it wouldn't take note of their phase roots.

The fix is to just record all the heads found in that bundle and use them all in
the draft computation.

Reviewed By: ikostia

Differential Revision: D7648746

fbshipit-source-id: 93e6feb903fea49b6312c58dce4a6208105d002f
2018-04-18 14:54:43 -07:00
Durham Goode
7ae20ad0fd logging: allow correlating hg commands with external jobs
Summary:
Some services like sandcastle want to be able to correlate their job
with specific hg commands in our scuba data. Let's allow them to specify a job
id we can filter on.

I considered having multiple columns, like job type and job id, but I figured
the service can use whatever format they like, and we can used derived columns
to filter on different parts of the string as needed.

Reviewed By: mjpieters

Differential Revision: D7672264

fbshipit-source-id: e4723274bad2812358176e71da791e759b346ac0
2018-04-18 13:47:48 -07:00
Adam Simpkins
05edd145db ensure that fbsparse never wraps Eden repositories
Summary:
Update `fbsparse.reposetup()` to avoid attempting to wrap the localrepo object
in Eden repositories.  The fbsparse extension is normally disabled in Eden
repositories, but this ensures the code does the correct thing even if the
fbsparse extension has been explicitly loaded.

Reviewed By: ryanmce

Differential Revision: D7642679

fbshipit-source-id: d0a229091d794fb326ab1db1c01e5a0a271092c4
2018-04-18 12:18:01 -07:00
Adam Simpkins
36de34b8f2 do not allow hg sparse to execute in non-sparse repositories
Summary:
Update the sparse command to fail early if the repository in question is not a
sparse repository.

Reviewed By: ryanmce

Differential Revision: D7642680

fbshipit-source-id: eaf765d38b45acf17d7c755f95083371f43f7259
2018-04-18 12:18:01 -07:00
Martijn Pieters
f07e9c14b6 fbsparse: add hint to sparse explain about the verbose flag
Summary:
```
$ hg sparse explain some/profile
[...]
hint[sparse-explain-verbose]: use 'hg sparse explain --verbose some/profile' to include the total file size for a give profile
hint[hint-ack]: use 'hg hint --ack sparse-explain-verbose' to silence these hints
```

Differential Revision: D7669896

fbshipit-source-id: c700fbc2f42044a9b15371278305f03e9e6c989f
2018-04-18 10:38:35 -07:00
Martijn Pieters
0b9356d3f2 sparse: update all subcommands with proper arguments / synopsis info
Summary: Tweak the help output to reflect the now-complete subcommand information.

Differential Revision: D7667900

fbshipit-source-id: a5a04e8bcbfe4a90266c30e25ffd705de0bdc8a9
2018-04-18 10:38:35 -07:00
Mark Thomas
2205890744 treat obsmarkers as objects commitcloud understands
Summary:
Change the schema for the commit cloud service to understand the structure of
obsmarkers, and store them that way, rather than as encoded strings.  This
allows the commit cloud service to index the obsmarkers, and for other services
to examine their contents.

Differential Revision: D7653162

fbshipit-source-id: ff0ea86758e3e56feae2216508ac763d0d7578cc
2018-04-18 05:07:59 -07:00
Kostia Balytskyi
b839b0f51e debugcommands: fix test-check-code
Differential Revision: D7666396

fbshipit-source-id: 29e49603f1ef086179dfe9c16d8dee2079f82c89
2018-04-18 02:32:30 -07:00
Durham Goode
bda8c04368 hg: fix smartlog.useancestorcache in shared workdirs
Summary:
The ancestorcache function requires a db in the cache directory, but if
the cache directory did not exist, the db would fail to get created, resulting
in slow smartlogs forever. Let's ensure the cache directory exists first.

This also switches to using cachevfs, which causes it to use the source repo's
cache directory instead of the shared one, which will mean better cache hits.

Reviewed By: quark-zju

Differential Revision: D7664296

fbshipit-source-id: b99acc22ba4f87af6e1edac1c9f15d39e8451ecc
2018-04-17 20:34:31 -07:00
Jun Wu
00a9659536 radixbuf: replace criterion with minibench
Summary: Similar with D7440249. See D7440254 for motivation.

Reviewed By: DurhamG

Differential Revision: D7562195

fbshipit-source-id: b11eb4f47375a2a2d70be96ebcfe2fefe1e0aaad
2018-04-17 18:54:39 -07:00
Jun Wu
3408c53051 vlqencoding: replace criterion with minibench
Summary: Similar with D7440249. See D7440254 for motivation.

Reviewed By: DurhamG

Differential Revision: D7562196

fbshipit-source-id: e90c623bd9576de49c3d4990ac93c105238d219c
2018-04-17 18:54:39 -07:00
Jun Wu
3ec8c3af00 minibench: simple test filtering support
Summary:
Now it's possible to filter tests like:

  cargo bench --bench index --verbose -- TEST_KEYWORD

Useful for profiling specific test.

Reviewed By: DurhamG

Differential Revision: D7562174

fbshipit-source-id: 9c7fe13a0541bd3dda7a9c1acf95c91513b633f2
2018-04-17 18:54:39 -07:00
Jun Wu
40a88364be indexedlog: replace div with shr to make checksum faster
Summary:
Spot `div` slowness using Linux's `perf` tool.

        |    Disassembly of section .text:
        |
        |    0000000000018990 <indexedlog::checksum_table::ChecksumTable::check_range>:
        |    _ZN10indexedlog14checksum_table13ChecksumTable11check_range17h2303c96b1e035e20E():
   1.36 |      push   %rax
   0.18 |      mov    %rdx,%r8
   0.54 |      mov    $0x1,%cl
        |      test   %r8,%r8
        |      je     60
   0.54 |      add    %rsi,%r8
   0.72 |      cmp    0x30(%rdi),%r8
        |      ja     64
   0.27 |      mov    0x28(%rdi),%r9
   0.27 |      test   %r9,%r9
        |      je     6a
   0.36 |      add    $0xffffffffffffffff,%r8
   0.18 |      xor    %edx,%edx
   0.45 |      mov    %rsi,%rax
   0.36 |      div    %r9
  43.72 |      mov    %rax,%rsi
        |      xor    %edx,%edx
        |      mov    %r8,%rax
   0.18 |      div    %r9
  42.82 |      add    $0x1,%rax
   0.09 |      cmp    %rax,%rsi
        |      jae    60
   2.17 |      cmpq   $0x0,0x60(%rdi)
        |      je     78
        |      mov    0x50(%rdi),%rcx
        |      cmpb   $0x0,(%rcx)
   1.63 |      sete   %cl
   0.18 |      xchg   %ax,%ax
        |50:   test   $0x1,%cl
        |      je     64
   0.45 |      add    $0x1,%rsi
   0.81 |      mov    $0x1,%cl
   0.09 |      cmp    %rax,%rsi
        |      jb     50
        |60:   mov    %ecx,%eax
        |      pop    %rcx
   2.62 |      retq
        |64:   xor    %ecx,%ecx
        |      mov    %ecx,%eax
        |      pop    %rcx
        |      retq
        |6a:   lea    panic_loc.a.llvm.9800112514578621117,%rdi
        |      callq  core::panicking::panic
        |      ud2
        |78:   lea    panic_bounds_check_loc.7.llvm.9800112514578621117,%rdi
        |      xor    %esi,%esi
        |      xor    %edx,%edx
        |      callq  core::panicking::panic_bounds_check
        |      ud2

Change `chunk_size` to `chunk_size_log`. Replace `div` with `shr` to make it
significantly faster:

Before:

  index lookup (memory)           1.118 ms
  index lookup (disk, no verify)  2.078 ms
  index lookup (disk, verified)   7.687 ms

After:

  index lookup (memory)           1.066 ms
  index lookup (disk, no verify)  1.992 ms
  index lookup (disk, verified)   3.591 ms

Reviewed By: DurhamG, markbt

Differential Revision: D7554992

fbshipit-source-id: c24189ced722d880af6ca0d64967eb762363d9e3
2018-04-17 18:54:39 -07:00
Jun Wu
f25c152d01 indexedlog: add a test about checksum
Summary:
Add a test that bitflips the index content, and make sure reading the index
would trigger an error.

Due to run-time performance difference, the release version tests 2-byte key
while the debug version only tests 1-byte key.

The header byte was not verified. Now it is verified.

Reviewed By: DurhamG

Differential Revision: D7517134

fbshipit-source-id: b3d8665ff4ac08c1a70db8d21122ba241913a2ed
2018-04-17 18:54:39 -07:00
Jun Wu
9ce455769c indexedlog: avoid writing unused entries due to leaf split
Summary:
In "split_leaf" "Example 3" case, the old leaf entry (and its key) becomes
unused. Writing them to disk is unnecessary. This patch adds "unused" marker
so they could be marked and skipped inside flush().

No visible performance change:

  index insertion                 3.710 ms
  index flush                     3.717 ms
  index lookup (memory)           1.128 ms
  index lookup (disk, no verify)  1.993 ms
  index lookup (disk, verified)   7.866 ms

Reviewed By: DurhamG

Differential Revision: D7517139

fbshipit-source-id: 253c878bc4b3762382c424777dfa779b3868e851
2018-04-17 18:54:38 -07:00
Jun Wu
c7d37f0c15 templater: fix document of capitalize
Summary:
The document was for ".title()". The code finally uses ".capitalize()" so
it's not capitalizing each word.

Quoting is changed to be consistent with the surrounding style.

Reviewed By: ryanmce

Differential Revision: D7658780

fbshipit-source-id: 4ad99d41cd8104dd382058a50752f88aa2116a0d
2018-04-17 17:42:26 -07:00
Kostia Balytskyi
cb1179cccb locks: make sure debuglocks knows about malformed locks and undolog lock
Summary: Let's report that this lock cannot be read by Mercurial

Reviewed By: markbt

Differential Revision: D7653196

fbshipit-source-id: c5b7889cdde9c0ecc03a8c961aeba92f426648b1
2018-04-17 17:42:26 -07:00
Kostia Balytskyi
46bc847b23 windows: improve lock file logic
Summary:
Quick experimentation shows that existing lock file logic is not enoug for
frequently run and killed Mercurial processes (Mercurial run by tools, such as
Nuclide is an example of such scenario)

I wrote the following two files:
```
c:\Code\tries\pythontries λ cat lockcreator.py
import os, random

def makelock(info, pathname):
    ld = os.open(pathname, os.O_CREAT | os.O_WRONLY | os.O_EXCL)
    os.write(ld, info)
    # os.fsync(ld)
    os.close(ld)

name = os.path.join('locks', 'lock.pid' + str(os.getpid()) + ".rand" + str(random.randint(0, 10000)))
makelock('contents', name)
```
and
```
c:\Code\tries\pythontries λ cat lockracer.py
import os, subprocess, time, random

for i in xrange(10000):
    proc = subprocess.Popen('python lockcreator.py')
    time.sleep(0.001*random.randint(0, 500))
    proc.terminate()

```

After runnning `python lockracer.py`, I did `ls -l locks | grep "0 Apr"`, this way it showed all the 0-byte files created in April. This shows a non-empty output. Uncommenting the `os.fsync` line does not help much.

Rewriting `lockcreator.py` to use temp lock file approach helps greatly.

Reviewed By: quark-zju

Differential Revision: D7653186

fbshipit-source-id: 48e9eeeca34075ea2ec78f3319491bcebc0e88c7
2018-04-17 17:42:26 -07:00
Kostia Balytskyi
82f5d79c6b platform: make util.makelock platform-dependent
Summary: Just seaparating the concerns.

Reviewed By: markbt

Differential Revision: D7653209

fbshipit-source-id: 3c30d57cb7a0bc5a9195a190c50be67802065d13
2018-04-17 17:42:25 -07:00
Jun Wu
109488ef6b debugshell: assign m to be mercurial
Summary:
Since we have other short variables like `cl`, `mf`. It makes sense to also
assign `m` as a shortcut to `mercurial`. It's handy to test methods like
`m.mdiff.allblocks` etc.

Reviewed By: markbt

Differential Revision: D7627705

fbshipit-source-id: 167bdef9cd6319d233b18aa0ad046a3055e92ffb
2018-04-17 16:35:25 -07:00
Jun Wu
4c702f355a debugshell: move local variable assignment to a single method
Summary: They are duplicated in the ipdb/pdb code paths. Extract them to a method.

Reviewed By: markbt

Differential Revision: D7627706

fbshipit-source-id: 65fd97fcbcac91b7a6997802f259779603cf92be
2018-04-17 16:35:25 -07:00
Jun Wu
ee80606196 debugshell: make it work without a repo
Summary:
Sometimes it's handy to test a Mercurial function (ex. xdiff, re2) without
a repo. This patch allows that.

Reviewed By: markbt

Differential Revision: D7627704

fbshipit-source-id: a5ccfc9ef47d79b4c3242eaeb1634cd3f83adcc1
2018-04-17 16:35:25 -07:00
Jun Wu
1c72988180 makefile: make make local build re2
Summary:
Download re2 tarball from GitHub or internal LFS. Pass `--re2-src` to
`setup.py` to build re2 modules.

Reviewed By: markbt

Differential Revision: D7626052

fbshipit-source-id: 74fd81a6990110a269adec88c4194299d88c377e
2018-04-17 16:35:25 -07:00
Jun Wu
54ecb104b6 setup: add --re2-src config option to build_ext command
Summary:
This allows us to build hg with a bundled re2. It can avoid issues like ABI
incompatibility with a shared re2 library. That might happen, if the RPM
dependencies are not strongly guaranteed (which might happen, although
shouldn't).

Reviewed By: simpkins

Differential Revision: D7622815

fbshipit-source-id: da6199aab7982f1e72466c676ebb0d1ed2100d6f
2018-04-17 16:35:25 -07:00
Jun Wu
e319762ba8 util: use in-repo re2 library
Summary:
This avoids potential SEGSEGVs when the system re2 is ABI incompatible.

See D7622774 for more details.

Reviewed By: markbt

Differential Revision: D7622771

fbshipit-source-id: bae1500e7468881a7a19d3cb9074db583b2444a6
2018-04-17 16:35:25 -07:00
Jun Wu
84d6041a99 thirdparty: vendor pyre2
Summary:
We recently found issues where it seems "hg" in some environment uses an
ABI-incompatible re2 library and segfaults. pyre2 is small and was
originally written by Facebook for Mercurial use-case. So let's just vendor
it.

Reviewed By: markbt

Differential Revision: D7622774

fbshipit-source-id: db01183c9881bf9c3ed21fceed195b2059d40208
2018-04-17 16:35:25 -07:00
Jun Wu
c5985f2ec0 setup: drop install_requires
Summary:
`install_requires` is not well supported. And the subverty detection is not
meaningful - it checks at package build time, not package install time.

```
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
```

Reviewed By: markbt

Differential Revision: D7626055

fbshipit-source-id: 061147f02698ad46561c95d2039f0a8ad26182d2
2018-04-17 16:35:25 -07:00
Jun Wu
2bfa2520b7 test-lock-badness: stabilize the test
Summary: `hg status` won't always take wlock. So let's use `hg add` instead.

Reviewed By: phillco

Differential Revision: D7658239

fbshipit-source-id: c54b1aea61610e605c2967ccabcf594d5cb5b77f
2018-04-17 13:35:24 -07:00
Martijn Pieters
c05fc0e620 sparse: fix bug with prefetching
Summary: The attribute is called 'hex', not 'hash'. Oops.

Reviewed By: markbt

Differential Revision: D7600689

fbshipit-source-id: 027031000e6481f353ceaad79c7dc2c46a16a3cf
2018-04-17 08:27:00 -07:00
Mark Thomas
fea0693497 progress: improve perf of suspend when there are no progress bars
Summary:
Suspending the progress bar is achieved by taking the progress lock.  This has
a cost, which reduces performance even when there are no progress bars to
suspend.  This is particularly bad for commands that output lots of lines, e.g.
`hg files`.

Don't take the lock during suspend when there aren't any progress bars to
suspend.

Reviewed By: mjpieters

Differential Revision: D7652389

fbshipit-source-id: 627d893261228087b4cc84b90bf05b034cc60a40
2018-04-17 08:11:06 -07:00
Liubov Dmitrieva
520ffc0cef infinitepush: add unit test for pullbackup when hostname and reporoot are provided together
Summary: The test covers recent bug fix with --reporoot option for hg pullbackup

Reviewed By: ikostia

Differential Revision: D7652464

fbshipit-source-id: 1884d0f3112a7dd1d7b2b0df29738b8760a5697b
2018-04-17 05:55:40 -07:00
Jun Wu
ea9d102dcd merge: log files being conflict resolved
Summary:
Similar to the previous patch, this allows us to get more information about
conflicts being resolved.

Reviewed By: phillco

Differential Revision: D7648933

fbshipit-source-id: 5b8c3dde385ace4c2a7cff7455e11436e5afd8cd
2018-04-16 20:53:58 -07:00
Jun Wu
2f37dcb182 watchman: optionally log watchman commands via ui.log
Summary:
This helps debugging watchman related issues. In particular, the order of
watchman state-enter/leave events and other events.

Reviewed By: singhsrb

Differential Revision: D7648928

fbshipit-source-id: 527a7bef9a07c2526bdd40ad802d5ba06bc27226
2018-04-16 20:53:58 -07:00
Jun Wu
857e9aa714 blackbox: append "\n" automatically
Summary:
Some log messages might not end with "\n". Append it automatically so it
looks good in blackbox.log.

Reviewed By: singhsrb

Differential Revision: D7648930

fbshipit-source-id: f5262e0c77a3bde952c3963ac5298b850f38d9db
2018-04-16 20:53:58 -07:00
Jun Wu
40dd438fc8 blackbox: do not log if msg is empty
Summary:
There are certain code paths that passes an empty `msg` that would crash
blackbox code:

```
error in exit handlers:
Traceback (most recent call last):
  File "mercurial/dispatch.py", line 73, in _runexithandlers
    func(*args, **kwargs)
  File "hgext/sampling.py", line 118, in telemetry
    generaldelta=str('generaldelta' in repo.requirements).lower())
  File "hgext/blackbox.py", line 170, in log
    formattedmsg = msg[0] % msg[1:]
IndexError: tuple index out of range
```

Fix it by ignoring those messages.

Reviewed By: singhsrb

Differential Revision: D7648932

fbshipit-source-id: be9f8327fd476399e4b762c92ea5f31cb174e189
2018-04-16 20:53:58 -07:00
Jun Wu
99467186ae rcutil: use realpath to normalize paths for config editing
Summary: This resolves symlinks recursively.

Reviewed By: farnz

Differential Revision: D7639180

fbshipit-source-id: 9f2d29090a63cf0dfc997ae1c84095a2defe329e
2018-04-16 20:34:58 -07:00
Durham Goode
12466818bb pullbackup: fix pullbackups with --reporoot
Summary:
This was broken by D7604500 because the format for infinitepush
bookmark names doesn't expect a double slash when the reporoot begins with a
slash.  For instance, the bookmark name is
`infinitepush/backups/UNIXNAME/HOST/path/to/repo/heads/...` but we were querying
for `infinitepush/backups/UNIXNAME/HOST//path/to/repo/heads...`.

Reviewed By: singhsrb

Differential Revision: D7647924

fbshipit-source-id: 11abc38e44998d9164b474b9acce7bef7a011fe1
2018-04-16 17:43:00 -07:00
Durham Goode
fa84b05e94 backout: backout lock change that broke a bunch of tests
Summary: Commit 23f4cd4264ef broke a bunch of tests. Let's back it out.

Reviewed By: singhsrb

Differential Revision: D7646736

fbshipit-source-id: ace9b7be2c50f64ea382eaa72a350ead67b2a2a6
2018-04-16 16:21:52 -07:00
Martijn Pieters
b31ce422e2 sparse: provide sensible __repr__ strings for the custom matchers.
Summary: These matchers provide better values than the default now provided by mercurial.match.basematcher.

Reviewed By: quark-zju

Differential Revision: D7635868

fbshipit-source-id: c826390b3a5e3a2da897eeb54be22850e14403f6
2018-04-16 12:53:41 -07:00
Durham Goode
914d474bbf hg: add back flakey test lines
Summary:
A previous diff (143ad029b) lost these lines due to run-tests.py -i overwriting
them. We're seeing flakey test failures, so let's add them back.

Reviewed By: singhsrb

Differential Revision: D7641613

fbshipit-source-id: 4f0807ae88f442cfa3c84106e800ce9eba81e99e
2018-04-16 12:53:41 -07:00
Kostia Balytskyi
d8780740bd hg: make sure debuglock knows about malformed locks and undolog lock
Summary: Let's report that this lock cannot be read by Mercurial

Differential Revision: D7617178

fbshipit-source-id: 23f4cd4264ef6c685762d8f89e2c24ed2f224211
2018-04-16 12:53:41 -07:00
Kostia Balytskyi
aee6f00b5a hg: print an actionable error message if the lock file is malformed
Summary:
The recent changes to Mercurial made us less tolerant to wrongly-formatted
lock files.

Reviewed By: farnz

Differential Revision: D7586684

fbshipit-source-id: d7fa2151b8bb20f49c83941f7d3ef751fdbab2de
2018-04-16 12:53:41 -07:00
Liubov Dmitrieva
0cb0fd8709 improve smartlog for Commit Cloud user
Summary:
{F123775861}

Improve smartlog extension for Commit Cloud Users.

The difference with the current smartlog implementation is that in Commit Cloud world
a commit can be modified by a sequence of operations on another host and smartlog doesn't handle it.

After `hg cloudsync` run command we should be able to 'explain' in smartlog what has happened

this is important for user who opt out from 'updateonmove' feature because they will see two version of their stack all the time.

Reviewed By: DurhamG, quark-zju

Differential Revision: D7492969

fbshipit-source-id: 9ac2180f9abaa9ae596620b7f25d9ad8212deb28
2018-04-16 12:53:41 -07:00
Durham Goode
d0f5ffed67 hg: use ancestory for base tree finding
Summary:
Previously, when searching for base trees (i.e. trees that we already
have that we can tell the server so it can send us only parts we don't have) we
did a naive changelog scan for public commits. If the phases were messed up and
a local commit was marked public, this would result in us sending the server a
base commit it didn't have which would error out.

Let's make two changes to fix this.

1. Let's scan by history instead of by revision number.  This will
work in the future when we don't have rev numbers, and will hopefully also get
us closer base trees. It should also mean that if we fetch a server commit we
are less likely to encounter a local accidentally-public commit.

2. Let's only use commits that are ancestors of a remotename. This will help us
avoid local accidentally-public commits as well.

Reviewed By: quark-zju

Differential Revision: D7593363

fbshipit-source-id: 1df8f4fbc56a4c11ccb6d444c3d08297206ad91f
2018-04-16 12:53:41 -07:00
Jun Wu
29ea02db78 hint: silence all hints by HGPLAIN=hint
Summary: `HGPLAIN` could specify features. Let's use it.

Reviewed By: farnz

Differential Revision: D7639140

fbshipit-source-id: 5e9215221a8eb6a6a14f2eaba326c19feb114811
2018-04-16 10:35:15 -07:00
Liubov Dmitrieva
803d42b447 infinitepush: fix removal boolkmarks bug
Summary:
Currently if there is a bookmark ends with *, adding and removal such
a bookmark, removes all the bookmark with the same prefix from the table.

I made similar url encoding encode.

Reviewed By: StanislavGlebik

Differential Revision: D7631967

fbshipit-source-id: 607a37bd7761d65e0f3a21c44fb137a98a79a1bf
2018-04-16 10:35:14 -07:00
Liubov Dmitrieva
6f9fa2f143 infinitepush: do not expose word 'infinitepush' to users and make it clear that all that messages are about autobackup (in background)
Summary:
Make it clear that all that messages are about autobackup (in background)

Even if it is disabled, manual `hg pushbackup` works

Also, since we announced publicly about renaming infinitepush we should not use it in user facing messages.

Also, that commands enable/disable background cloudsync, probably later we should check if cloudsync is enabled and improve messages to be more precise.

Reviewed By: StanislavGlebik

Differential Revision: D7635640

fbshipit-source-id: 2461b1b45e181c6e24b59f707a17f2fd60d4bb0e
2018-04-16 10:35:14 -07:00
Mark Thomas
2bb3129118 commitcloud: cloudsync instead of pushbackup
Summary:
Replace the background `hg pushbackup` with a background `hg cloudsync` when
the repo is connected to a workspace.

Reviewed By: StanislavGlebik

Differential Revision: D7586412

fbshipit-source-id: 667ce46ffe83c654b642872633d9b86f29a2d788
2018-04-16 10:35:14 -07:00
Mark Thomas
88b23256ca commitcloud: push commits when syncing
Summary:
Make commitcloud push unsynced commits to the server before modifying the cloud
state.

At the moment, this uses an infinitepush push, calling the underlying push
functions directly (since commitcloud knows exactly which commits to push,
there is no point performing discovery to calculate them).  Infinitepush pushes
require the full draft stack to be included, but in the future, this will be
replaced with an even smaller push of just the changed commits to Mononoke.

The re-use of infinitepush's internal functions is a bit hacky.  Later on I
will refactor the common functionality out to a utility library.

Reviewed By: StanislavGlebik

Differential Revision: D7535890

fbshipit-source-id: 975028a63bd6d9377a37e224a0cfd95ae1f1e16d
2018-04-16 10:35:14 -07:00
Stanislau Hlebik
007636e77b add an option to disable remotefilelog shared cache updating
Summary:
We may want to use an experimental store for remotefilelog data. This store may
return incorrect data, and cache is going to be poisoned. To prevent it from
hapenning let's add an option that makes it possible to prevent cache
poisoning.

Reviewed By: farnz

Differential Revision: D7615453

fbshipit-source-id: 0ade7407b92a3a32c841f6f0214dc353c30bff59
2018-04-16 10:35:14 -07:00