Commit Graph

64551 Commits

Author SHA1 Message Date
Jun Wu
691317fd17 changelog2: add "lazy" backend
Summary: Similar to "lazytext" but IdMap is also lazy.

Reviewed By: sfilipco

Differential Revision: D27547579

fbshipit-source-id: 70452f1a8e7f00d6a216a2aaec2d55442130d3ce
2021-04-13 16:37:45 -07:00
Jun Wu
a37797a5e8 pydag: add api to create a lazy backend on disk from an existing dag
Summary: This can be used to create lazy commit hash backends.

Reviewed By: sfilipco

Differential Revision: D27547580

fbshipit-source-id: 3329854f1173b8f15fd6b51f4e595d2226c8bbb1
2021-04-13 16:37:44 -07:00
Jun Wu
db36c2d2a9 pydag: add api to open lazy commit hash backends
Summary: Expose the lazy hash Rust logic to Python.

Reviewed By: sfilipco

Differential Revision: D27547578

fbshipit-source-id: a01116caab6aa83d60b79e4d3a1f4482ddb4edb1
2021-04-13 16:37:44 -07:00
Jun Wu
239452eb55 hgcommits: add support for lazy commit hashes
Summary: Add APIs to enable lazy commit hashes.

Reviewed By: sfilipco

Differential Revision: D27547586

fbshipit-source-id: eda3d571af1e53b96f272b9c6746413baf06faca
2021-04-13 16:37:44 -07:00
svcscm svcscm
b57d0957ac Updating submodules
Summary:
GitHub commits:

546c22ba61
cfc1f13426
5c7581e116
d31902b958
a46e17dfe4
7c82b35c63
cac8288414
7b19808036
eef6badd62
2fdd21f856

Reviewed By: yns88

fbshipit-source-id: 973fc52a675bc3b38f3d43a3ed825d8ece0213dc
2021-04-13 15:51:10 -07:00
Xavier Deguillard
f462a76f80 nfs: implement the MKNOD procedure
Summary:
This allows unix sockets to be created in the mount. This will allow Buck to
run properly as it tries to create sockets in the repository.

Reviewed By: kmancini

Differential Revision: D27690406

fbshipit-source-id: 5725d68bdda12f3a5882ce48b6bdd02b14cdece4
2021-04-13 15:17:35 -07:00
Xavier Deguillard
dbc51feb5e nfs: add RPC types for MKNOD
Summary: This merely adds the types for the procedure

Reviewed By: kmancini

Differential Revision: D27690405

fbshipit-source-id: b94fb03658cabaece4166c29135c5fdf9a613d3c
2021-04-13 14:59:58 -07:00
Xavier Deguillard
6836229ab3 nfs: implement RMDIR procedure
Summary:
This is roughly the same logic as the UNLINK one with the only difference being
in the handling of "." and "..".

Reviewed By: kmancini

Differential Revision: D27684716

fbshipit-source-id: 86a95c38e6c783bc3a45c0a8b000d0210b6dd0b8
2021-04-13 14:59:57 -07:00
Xavier Deguillard
dbe993312d nfs: add RPC for RMDIR
Summary:
This merely adds the types needed for the RMDIR procedure. Implementation will
follow.

Reviewed By: genevievehelsel

Differential Revision: D27684736

fbshipit-source-id: 84f5a4f3dc805e7893853b0de1dc19cb01c1319f
2021-04-13 14:59:57 -07:00
Xavier Deguillard
62056fb8ea nfs: fix typo in fsstat
Summary:
To get the size in bytes, we need to multiply the quantity with the block size,
not with itself.

Reviewed By: genevievehelsel

Differential Revision: D27690857

fbshipit-source-id: 7d7ca767881b1118fc24befed230a63f342bc911
2021-04-13 14:59:57 -07:00
Zeyi (Rice) Fan
5407ab67bd make msvc happy
Summary: Apparently MSVC isn't able to accept `std::array<char, N>::end()` as `const char*`. This fixes that.

Reviewed By: xavierd

Differential Revision: D27744719

fbshipit-source-id: 61c30f987612db4274c210aea67163505a8878bf
2021-04-13 14:34:41 -07:00
Jun Wu
e365eec476 revset: do not autopull x or y for revset limit(a, x, y)
Summary:
In revset limit(a, x, y), both x and y are numbers, not commit identities.
The issue is that the revset AST uses different ways to represent functions
with one argument or multiple arguments. For example:

  (func (symbol parents) (symbol master))
  (func (symbol limit)   (list (x) (symbol 1) (symbol 2)))

Fix it by special handling the `list` AST.

Reviewed By: DurhamG

Differential Revision: D27632395

fbshipit-source-id: 081506bdd4b10e197a2685f4ab4d6448fbd79957
2021-04-13 14:34:41 -07:00
Jun Wu
acc31dbe74 hgcommands: use terminal_size crate for stderr terminal width
Summary: This crate does not panic on Windows.

Reviewed By: DurhamG

Differential Revision: D27640362

fbshipit-source-id: f50f6b8e0bd31e5f80fa939bcfb6846bc8fd4a63
2021-04-13 14:32:54 -07:00
svcscm svcscm
4b499fdc49 Updating submodules
Summary:
GitHub commits:

e827ec90f5
f1c79d1dc9
e80a9ef714
5532b4b40f
c861fb390d
4f0c915f3d
0a9dd67014
2d73131066
d772d7b602
bc0a55c1e3
4c615cff18
c9b7041852

Reviewed By: yns88

fbshipit-source-id: a4dc4cadb25963692ca971b83b7f869bebbf17b1
2021-04-13 14:30:12 -07:00
Jun Wu
ca30d55bd0 hgcommands: add debugracyoutput
Summary:
Recently we saw some progress rendering issues. Add a command to attempt to
reproduce them.

Reviewed By: DurhamG

Differential Revision: D27669184

fbshipit-source-id: 62fcf82d8261fd27e91ba5a116c61f4df1919007
2021-04-13 13:47:17 -07:00
Jun Wu
88df00bd2f util: do not redirect stdout
Summary:
out could be stdout but not a tty. In that case, do not redirect stdout to
pipes.  This might solve some arc pull issues.

Write `a.py`:

  util.system('ls -l /proc/self/fd/1')
  util.system('ls -l /proc/self/fd/1', out=ui.fout)
  ui.system('ls -l /proc/self/fd/1')

Before:

  hg dbsh a.py > /tmp/b; cat /tmp/b
  l-wx------ 1 quark users 64 Apr 13 11:44 /proc/self/fd/1 -> /tmp/b
  l-wx------ 1 quark users 64 Apr 13 11:44 /proc/self/fd/1 -> pipe:[2144298266]
  l-wx------ 1 quark users 64 Apr 13 11:44 /proc/self/fd/1 -> /tmp/b

  CHGDISABLE=1 hg dbsh a.py > /tmp/b; cat /tmp/b
  l-wx------ 1 quark users 64 Apr 13 11:47 /proc/self/fd/1 -> /tmp/b
  l-wx------ 1 quark users 64 Apr 13 11:47 /proc/self/fd/1 -> pipe:[2144352743]
  l-wx------ 1 quark users 64 Apr 13 11:47 /proc/self/fd/1 -> pipe:[2144352745]

After:

  lhg dbsh a.py > /tmp/b; cat /tmp/b
  l-wx------ 1 quark users 64 Apr 13 11:45 /proc/self/fd/1 -> /tmp/b
  l-wx------ 1 quark users 64 Apr 13 11:45 /proc/self/fd/1 -> /tmp/b
  l-wx------ 1 quark users 64 Apr 13 11:45 /proc/self/fd/1 -> /tmp/b

  CHGDISABLE=0 lhg dbsh a.py > /tmp/b; cat /tmp/b
  l-wx------ 1 quark users 64 Apr 13 11:55 /proc/self/fd/1 -> /tmp/b
  l-wx------ 1 quark users 64 Apr 13 11:55 /proc/self/fd/1 -> /tmp/b
  l-wx------ 1 quark users 64 Apr 13 11:55 /proc/self/fd/1 -> /tmp/b

Reviewed By: skotchvail

Differential Revision: D27744057

fbshipit-source-id: 62cab690a5cf32b2b3c68c776c627476b0f975d8
2021-04-13 13:43:39 -07:00
Jun Wu
1dd14a9cf4 io: add ways to test if a stream is a std stream
Summary: This will be used later.

Reviewed By: skotchvail

Differential Revision: D27744058

fbshipit-source-id: 411ab66ccc38b306c6bffb190e936ba1e455f07a
2021-04-13 13:43:39 -07:00
svcscm svcscm
65b7e956f8 Updating submodules
Summary:
GitHub commits:

d3c0114a95
f1033a9c82
0a02cdd813
6f9321c4b9
e6f2e7dc9a
8d3cb20ef5
414ae1466e
4822e3b209
5fea72206e
2b07edd16f
fc4e7a7405
8974feb931

Reviewed By: yns88

fbshipit-source-id: 0ad552f1ca10c26ae4e2233cef276d3065939a4b
2021-04-13 13:29:05 -07:00
Jun Wu
7341c4af7e commandserver: clear progress explicitly before os._exit
Summary:
`os._exit` bypasses all clean-up logic, including `IO::drop` in `hgmain` which
cleans up the progress bars. So let's explicitly clean up the progress bars
before `os._exit`.

Reviewed By: kulshrax

Differential Revision: D27744944

fbshipit-source-id: 5cd50b283728fd4e3b559142f7f61fc6672492e9
2021-04-13 12:35:13 -07:00
Jun Wu
4974d08e92 revisionstore: avoid copying slice in indexedlogdatastore
Summary:
I encountered crashes like `memory allocation of 999401 bytes failed` when
checking out commits on Windows. I almost cannot checkout anything.

Looking at the minidumps, the problem is that indexedlogdatastore tries
to copy the slice (copy_from_slice).

That's suboptimal, since indexedlog can provide zero-copy slice access
for on-disk entries. Use zero-copy APIs instead.

Minidump trace:

    [Inline Frame] hg.real.exe!std::sys::windows::abort_internal() Line 261	Unknown
    [Inline Frame] hg.real.exe!std::process::abort() Line 1784	Unknown
    hg.real.exe!std::alloc::rust_oom() Line 330	Unknown
    hg.real.exe!alloc::alloc::__alloc_error_handler::__rg_oom() Line 397	Unknown
    hg.real.exe!alloc::alloc::handle_alloc_error() Line 366	Unknown
    [Inline Frame] hg.real.exe!alloc::raw_vec::RawVec<u8, alloc::alloc::Global>::allocate_in(unsigned __int64 capacity, alloc::raw_vec::AllocInit init, alloc::alloc::Global) Line 193	Unknown
    [Inline Frame] hg.real.exe!alloc::raw_vec::RawVec<u8, alloc::alloc::Global>::with_capacity_in(unsigned __int64 capacity, alloc::alloc::Global) Line 129	Unknown
    [Inline Frame] hg.real.exe!alloc::vec::Vec<u8, alloc::alloc::Global>::with_capacity_in(unsigned __int64 capacity, alloc::alloc::Global) Line 498	Unknown
    [Inline Frame] hg.real.exe!alloc::slice::hack::{{impl}}::to_vec(slice<u8> s, alloc::alloc::Global) Line 207	Unknown
    [Inline Frame] hg.real.exe!alloc::slice::hack::to_vec(slice<u8> s, alloc::alloc::Global) Line 159	Unknown
    [Inline Frame] hg.real.exe!alloc::slice::{{impl}}::to_vec_in(slice<u8> self, alloc::alloc::Global) Line 472	Unknown
    [Inline Frame] hg.real.exe!alloc::slice::{{impl}}::to_vec(slice<u8> self) Line 449	Unknown
    [Inline Frame] hg.real.exe!minibytes::bytes::{{impl}}::to_owned(slice<u8> self) Line 231	Unknown
    [Inline Frame] hg.real.exe!minibytes::bytes::AbstractBytes<slice<u8>>::copy_from_slice(slice<u8> data) Line 152	Unknown
    hg.real.exe!revisionstore::indexedlogdatastore::Entry::from_slice(slice<u8> data) Line 120	Unknown
    hg.real.exe!revisionstore::indexedlogdatastore::Entry::from_log(revisionstore::indexedlogutil::Store * key) Line 133	Unknown
    [Inline Frame] hg.real.exe!revisionstore::indexedlogdatastore::{{impl}}::get_missing::{{closure}}(revisionstore::indexedlogdatastore::{{impl}}::get_missing::closure-0 *) Line 359	Unknown
    [Inline Frame] hg.real.exe!core::ops::function::impls::{{impl}}::call_mut(revisionstore::indexedlogdatastore::{{impl}}::get_missing::closure-0 * * self, revisionstore::types::StoreKey * * args) Line 269	Unknown
    [Inline Frame] hg.real.exe!core::slice::iter::{{impl}}::find(core::slice::iter::Iter<revisionstore::types::StoreKey> * self, revisionstore::indexedlogdatastore::{{impl}}::get_missing::closure-0 * predicate) Line 251	Unknown
    [Inline Frame] hg.real.exe!core::iter::adapters::filter::{{impl}}::next(core::iter::adapters::filter::Filter<core::slice::iter::Iter<revisionstore::types::StoreKey>, closure-0> * self) Line 55	Unknown
    [Inline Frame] hg.real.exe!core::iter::adapters::cloned::{{impl}}::next(core::iter::adapters::cloned::Cloned<core::iter::adapters::filter::Filter<core::slice::iter::Iter<revisionstore::types::StoreKey>, closure-0>> * self) Line 38	Unknown
    [Inline Frame] hg.real.exe!alloc::vec::Vec<revisionstore::types::StoreKey, alloc::alloc::Global>::extend_desugared(core::iter::adapters::cloned::Cloned<core::iter::adapters::filter::Filter<core::slice::iter::Iter<revisionstore::types::StoreKey>, closure-0>> self) Line 2621	Unknown
    [Inline Frame] hg.real.exe!alloc::vec::{{impl}}::spec_extend(alloc::vec::Vec<revisionstore::types::StoreKey, alloc::alloc::Global> * self, core::iter::adapters::cloned::Cloned<core::iter::adapters::filter::Filter<core::slice::iter::Iter<revisionstore::types::StoreKey>, closure-0>>) Line 2544	Unknown
    [Inline Frame] hg.real.exe!alloc::vec::{{impl}}::from_iter(core::iter::adapters::cloned::Cloned<core::iter::adapters::filter::Filter<core::slice::iter::Iter<revisionstore::types::StoreKey>, closure-0>> iterator) Line 2320	Unknown
    hg.real.exe!alloc::vec::{{impl}}::from_iter<revisionstore::types::StoreKey,core::iter::adapters::cloned::Cloned<core::iter::adapters::filter::Filter<core::slice::iter::Iter<revisionstore::types::StoreKey>, closure-0>>>(core::iter::adapters::cloned::Cloned<core::iter::adapters::filter::Filter<core::slice::iter::Iter<revisionstore::types::StoreKey>, closure-0>> iterator) Line 2346	Unknown
    [Inline Frame] hg.real.exe!alloc::vec::{{impl}}::from_iter(core::iter::adapters::cloned::Cloned<core::iter::adapters::filter::Filter<core::slice::iter::Iter<revisionstore::types::StoreKey>, closure-0>>) Line 2181	Unknown
    [Inline Frame] hg.real.exe!core::iter::traits::iterator::Iterator::collect(core::iter::adapters::cloned::Cloned<core::iter::adapters::filter::Filter<core::slice::iter::Iter<revisionstore::types::StoreKey>, closure-0>> self) Line 1670	Unknown
    hg.real.exe!revisionstore::indexedlogdatastore::{{impl}}::get_missing(revisionstore::indexedlogdatastore::IndexedLogHgIdDataStore * self, slice<revisionstore::types::StoreKey> keys) Line 356	Unknown
    [Inline Frame] hg.real.exe!revisionstore::localstore::{{impl}}::get_missing(alloc::sync::Arc<HgIdDataStore> * self, slice<revisionstore::types::StoreKey> keys) Line 46	Unknown
    [Inline Frame] hg.real.exe!revisionstore::unionstore::{{impl}}::get_missing::{{closure}}(revisionstore::unionstore::{{impl}}::get_missing::closure-0 *, core::result::Result<alloc::vec::Vec<revisionstore::types::StoreKey, alloc::alloc::Global>, anyhow::Error> store, alloc::sync::Arc<HgIdDataStore> *) Line 37	Unknown
    [Inline Frame] hg.real.exe!core::iter::traits::iterator::Iterator::fold(core::slice::iter::Iter<alloc::sync::Arc<HgIdDataStore>> self, core::result::Result<alloc::vec::Vec<revisionstore::types::StoreKey, alloc::alloc::Global>, anyhow::Error>) Line 2023	Unknown
    hg.real.exe!revisionstore::unionstore::{{impl}}::get_missing<alloc::sync::Arc<HgIdDataStore>>(revisionstore::unionstore::UnionStore<alloc::sync::Arc<HgIdDataStore>> * self, slice<revisionstore::types::StoreKey> keys) Line 35	Unknown
    [Inline Frame] hg.real.exe!revisionstore::contentstore::{{impl}}::get_missing::{{closure}}(revisionstore::contentstore::{{impl}}::get_missing::closure-0) Line 200	Unknown
    [Inline Frame] hg.real.exe!tracing::span::Span::in_scope(revisionstore::contentstore::{{impl}}::get_missing::closure-0 self) Line 800	Unknown
    hg.real.exe!revisionstore::contentstore::{{impl}}::get_missing(revisionstore::contentstore::ContentStore * self, slice<revisionstore::types::StoreKey> keys) Line 200	Unknown
    hg.real.exe!revisionstore::contentstore::{{impl}}::prefetch(revisionstore::contentstore::ContentStore * self, slice<revisionstore::types::StoreKey> keys) Line 176	Unknown
    [Inline Frame] hg.real.exe!revisionstore::datastore::{{impl}}::prefetch(alloc::sync::Arc<revisionstore::contentstore::ContentStore> * self, slice<revisionstore::types::StoreKey> keys) Line 139	Unknown
    [Inline Frame] hg.real.exe!pyrevisionstore::datastorepyext::{{impl}}::prefetch_py::{{closure}}(pyrevisionstore::datastorepyext::{{impl}}::prefetch_py::closure-1) Line 297	Unknown
    [Inline Frame] hg.real.exe!cpython::python::Python::allow_threads(cpython::python::Python f, pyrevisionstore::datastorepyext::{{impl}}::prefetch_py::closure-1) Line 249	Unknown
    hg.real.exe!pyrevisionstore::datastorepyext::{{impl}}::prefetch_py<alloc::sync::Arc<revisionstore::contentstore::ContentStore>>(alloc::sync::Arc<revisionstore::contentstore::ContentStore> * self, cpython::python::Python py, cpython::objects::list::PyList keys) Line 297	Unknown
    hg.real.exe!pyrevisionstore::{{impl}}::create_instance::init::wrap_instance_method::{{closure}}(pyrevisionstore::{{impl}}::create_instance::init::wrap_instance_method::closure-0) Line 99	Unknown
    [Inline Frame] hg.real.exe!cpython::function::handle_callback::{{closure}}(cpython::function::handle_callback::closure-0) Line 218	Unknown
    [Inline Frame] hg.real.exe!std::panicking::try::do_call(unsigned char * data) Line 379	Unknown
    hg.real.exe!std::panicking::try<mut python27_sys::object::PyObject*,closure-0>(cpython::function::handle_callback::closure-0 f) Line 343	Unknown
    [Inline Frame] hg.real.exe!std::panic::catch_unwind(cpython::function::handle_callback::closure-0) Line 396	Unknown
    hg.real.exe!cpython::function::handle_callback<closure-0,cpython::objects::object::PyObject,cpython::function::PyObjectCallbackConverter>(str _location, cpython::function::PyObjectCallbackConverter f, pyrevisionstore::{{impl}}::create_instance::init::wrap_instance_method::closure-0) Line 227	Unknown
    hg.real.exe!pyrevisionstore::{{impl}}::create_instance::init::wrap_instance_method(python27_sys::object::PyObject * slf, python27_sys::object::PyObject * args, python27_sys::object::PyObject * kwargs) Line 103	Unknown
    [External Code]
    [Inline Frame] hg.real.exe!cpython::objectprotocol::ObjectProtocol::call::{{closure}}(cpython::objectprotocol::ObjectProtocol::call::closure-0 args, python27_sys::object::PyObject *) Line 218	Unknown
    [Inline Frame] hg.real.exe!cpython::objects::tuple::{{impl}}::with_borrowed_ptr(cpython::objects::tuple::PyTuple * self, cpython::python::Python f, cpython::objectprotocol::ObjectProtocol::call::closure-0) Line 177	Unknown
    [Inline Frame] hg.real.exe!cpython::conversion::{{impl}}::with_borrowed_ptr(cpython::objects::tuple::PyTuple * * f, cpython::python::Python) Line 193	Unknown
    [Inline Frame] hg.real.exe!cpython::objectprotocol::ObjectProtocol::call(cpython::objects::object::PyObject * self, cpython::python::Python args, cpython::objects::tuple::PyTuple * kwargs, core::option::Option<cpython::objects::dict::PyDict*>) Line 217	Unknown
    hg.real.exe!pytracing::wrapfunc::__call__(cpython::python::Python args, cpython::objects::tuple::PyTuple * kwargs, core::option::Option<cpython::objects::dict::PyDict*>) Line 319	Unknown
    hg.real.exe!pytracing::{{impl}}::create_instance::TYPE_OBJECT::wrap_call::{{closure}}(pytracing::{{impl}}::create_instance::TYPE_OBJECT::wrap_call::closure-0) Line 685	Unknown
    [Inline Frame] hg.real.exe!cpython::function::handle_callback::{{closure}}(cpython::function::handle_callback::closure-0) Line 218	Unknown
    [Inline Frame] hg.real.exe!std::panicking::try::do_call(unsigned char * data) Line 379	Unknown
    hg.real.exe!std::panicking::try<mut python27_sys::object::PyObject*,closure-0>(cpython::function::handle_callback::closure-0 f) Line 343	Unknown
    [Inline Frame] hg.real.exe!std::panic::catch_unwind(cpython::function::handle_callback::closure-0) Line 396	Unknown
    hg.real.exe!cpython::function::handle_callback<closure-0,cpython::objects::object::PyObject,cpython::function::PyObjectCallbackConverter>(str _location, cpython::function::PyObjectCallbackConverter f, pytracing::{{impl}}::create_instance::TYPE_OBJECT::wrap_call::closure-0) Line 227	Unknown
    hg.real.exe!pytracing::{{impl}}::create_instance::TYPE_OBJECT::wrap_call(python27_sys::object::PyObject * slf, python27_sys::object::PyObject * args, python27_sys::object::PyObject * kwargs) Line 689	Unknown
    [External Code]
    [Inline Frame] hg.real.exe!cpython::objectprotocol::ObjectProtocol::call::{{closure}}(cpython::objectprotocol::ObjectProtocol::call::closure-0 args, python27_sys::object::PyObject *) Line 218	Unknown
    [Inline Frame] hg.real.exe!cpython::objects::tuple::{{impl}}::with_borrowed_ptr(cpython::objects::tuple::PyTuple * self, cpython::python::Python f, cpython::objectprotocol::ObjectProtocol::call::closure-0) Line 177	Unknown
    [Inline Frame] hg.real.exe!cpython::conversion::{{impl}}::with_borrowed_ptr(cpython::objects::tuple::PyTuple * * f, cpython::python::Python) Line 193	Unknown
    [Inline Frame] hg.real.exe!cpython::objectprotocol::ObjectProtocol::call(cpython::objects::object::PyObject * self, cpython::python::Python args, cpython::objects::tuple::PyTuple * kwargs, core::option::Option<cpython::objects::dict::PyDict*>) Line 217	Unknown
    hg.real.exe!pytracing::wrapfunc::__call__(cpython::python::Python args, cpython::objects::tuple::PyTuple * kwargs, core::option::Option<cpython::objects::dict::PyDict*>) Line 319	Unknown
    hg.real.exe!pytracing::{{impl}}::create_instance::TYPE_OBJECT::wrap_call::{{closure}}(pytracing::{{impl}}::create_instance::TYPE_OBJECT::wrap_call::closure-0) Line 685	Unknown
    [Inline Frame] hg.real.exe!cpython::function::handle_callback::{{closure}}(cpython::function::handle_callback::closure-0) Line 218	Unknown
    [Inline Frame] hg.real.exe!std::panicking::try::do_call(unsigned char * data) Line 379	Unknown
    hg.real.exe!std::panicking::try<mut python27_sys::object::PyObject*,closure-0>(cpython::function::handle_callback::closure-0 f) Line 343	Unknown
    [Inline Frame] hg.real.exe!std::panic::catch_unwind(cpython::function::handle_callback::closure-0) Line 396	Unknown
    hg.real.exe!cpython::function::handle_callback<closure-0,cpython::objects::object::PyObject,cpython::function::PyObjectCallbackConverter>(str _location, cpython::function::PyObjectCallbackConverter f, pytracing::{{impl}}::create_instance::TYPE_OBJECT::wrap_call::closure-0) Line 227	Unknown
    hg.real.exe!pytracing::{{impl}}::create_instance::TYPE_OBJECT::wrap_call(python27_sys::object::PyObject * slf, python27_sys::object::PyObject * args, python27_sys::object::PyObject * kwargs) Line 689	Unknown
    [External Code]
    [Inline Frame] hg.real.exe!cpython::objectprotocol::ObjectProtocol::call::{{closure}}(cpython::objectprotocol::ObjectProtocol::call::closure-0 args, python27_sys::object::PyObject *) Line 218	Unknown
    [Inline Frame] hg.real.exe!cpython::objects::tuple::{{impl}}::with_borrowed_ptr(cpython::objects::tuple::PyTuple * self, cpython::python::Python f, cpython::objectprotocol::ObjectProtocol::call::closure-0) Line 177	Unknown
    [Inline Frame] hg.real.exe!cpython::conversion::{{impl}}::with_borrowed_ptr(cpython::objects::tuple::PyTuple * * f, cpython::python::Python) Line 193	Unknown
    [Inline Frame] hg.real.exe!cpython::objectprotocol::ObjectProtocol::call(cpython::objects::object::PyObject * self, cpython::python::Python args, cpython::objects::tuple::PyTuple * kwargs, core::option::Option<cpython::objects::dict::PyDict*>) Line 217	Unknown
    hg.real.exe!pytracing::wrapfunc::__call__(cpython::python::Python args, cpython::objects::tuple::PyTuple * kwargs, core::option::Option<cpython::objects::dict::PyDict*>) Line 319	Unknown
    hg.real.exe!pytracing::{{impl}}::create_instance::TYPE_OBJECT::wrap_call::{{closure}}(pytracing::{{impl}}::create_instance::TYPE_OBJECT::wrap_call::closure-0) Line 685	Unknown
    [Inline Frame] hg.real.exe!cpython::function::handle_callback::{{closure}}(cpython::function::handle_callback::closure-0) Line 218	Unknown
    [Inline Frame] hg.real.exe!std::panicking::try::do_call(unsigned char * data) Line 379	Unknown
    hg.real.exe!std::panicking::try<mut python27_sys::object::PyObject*,closure-0>(cpython::function::handle_callback::closure-0 f) Line 343	Unknown
    [Inline Frame] hg.real.exe!std::panic::catch_unwind(cpython::function::handle_callback::closure-0) Line 396	Unknown
    hg.real.exe!cpython::function::handle_callback<closure-0,cpython::objects::object::PyObject,cpython::function::PyObjectCallbackConverter>(str _location, cpython::function::PyObjectCallbackConverter f, pytracing::{{impl}}::create_instance::TYPE_OBJECT::wrap_call::closure-0) Line 227	Unknown
    hg.real.exe!pytracing::{{impl}}::create_instance::TYPE_OBJECT::wrap_call(python27_sys::object::PyObject * slf, python27_sys::object::PyObject * args, python27_sys::object::PyObject * kwargs) Line 689	Unknown
    [External Code]
    [Inline Frame] hg.real.exe!cpython::objectprotocol::ObjectProtocol::call::{{closure}}(cpython::objectprotocol::ObjectProtocol::call::closure-0 args, python27_sys::object::PyObject *) Line 218	Unknown
    [Inline Frame] hg.real.exe!cpython::objects::tuple::{{impl}}::with_borrowed_ptr(cpython::objects::tuple::PyTuple * self, cpython::python::Python f, cpython::objectprotocol::ObjectProtocol::call::closure-0) Line 177	Unknown
    [Inline Frame] hg.real.exe!cpython::conversion::{{impl}}::with_borrowed_ptr(cpython::objects::tuple::PyTuple * * f, cpython::python::Python) Line 193	Unknown
    [Inline Frame] hg.real.exe!cpython::objectprotocol::ObjectProtocol::call(cpython::objects::object::PyObject * self, cpython::python::Python args, cpython::objects::tuple::PyTuple * kwargs, core::option::Option<cpython::objects::dict::PyDict*>) Line 217	Unknown
    hg.real.exe!pytracing::wrapfunc::__call__(cpython::python::Python args, cpython::objects::tuple::PyTuple * kwargs, core::option::Option<cpython::objects::dict::PyDict*>) Line 319	Unknown
    hg.real.exe!pytracing::{{impl}}::create_instance::TYPE_OBJECT::wrap_call::{{closure}}(pytracing::{{impl}}::create_instance::TYPE_OBJECT::wrap_call::closure-0) Line 685	Unknown
    [Inline Frame] hg.real.exe!cpython::function::handle_callback::{{closure}}(cpython::function::handle_callback::closure-0) Line 218	Unknown
    [Inline Frame] hg.real.exe!std::panicking::try::do_call(unsigned char * data) Line 379	Unknown
    hg.real.exe!std::panicking::try<mut python27_sys::object::PyObject*,closure-0>(cpython::function::handle_callback::closure-0 f) Line 343	Unknown
    [Inline Frame] hg.real.exe!std::panic::catch_unwind(cpython::function::handle_callback::closure-0) Line 396	Unknown
    hg.real.exe!cpython::function::handle_callback<closure-0,cpython::objects::object::PyObject,cpython::function::PyObjectCallbackConverter>(str _location, cpython::function::PyObjectCallbackConverter f, pytracing::{{impl}}::create_instance::TYPE_OBJECT::wrap_call::closure-0) Line 227	Unknown
    hg.real.exe!pytracing::{{impl}}::create_instance::TYPE_OBJECT::wrap_call(python27_sys::object::PyObject * slf, python27_sys::object::PyObject * args, python27_sys::object::PyObject * kwargs) Line 689	Unknown
    [External Code]
    [Inline Frame] hg.real.exe!cpython::objectprotocol::ObjectProtocol::call::{{closure}}(cpython::objectprotocol::ObjectProtocol::call::closure-0 args, python27_sys::object::PyObject *) Line 218	Unknown
    [Inline Frame] hg.real.exe!cpython::objects::tuple::{{impl}}::with_borrowed_ptr(cpython::objects::tuple::PyTuple * self, cpython::python::Python f, cpython::objectprotocol::ObjectProtocol::call::closure-0) Line 177	Unknown
    [Inline Frame] hg.real.exe!cpython::objectprotocol::ObjectProtocol::call(cpython::objects::object::PyObject * self, cpython::python::Python args, cpython::objects::tuple::PyTuple kwargs, core::option::Option<cpython::objects::dict::PyDict*>) Line 217	Unknown
    hg.real.exe!cpython::objects::module::PyModule::call<cpython::objects::tuple::PyTuple>(cpython::python::Python self, str name, cpython::objects::tuple::PyTuple args, core::option::Option<cpython::objects::dict::PyDict*> kwargs) Line 136	Unknown
    [Inline Frame] hg.real.exe!hgcommands::hgpython::HgPython::run_hg_py(cpython::python::Python self, alloc::vec::Vec<alloc::string::String, alloc::alloc::Global> py, io::IO * args) Line 98	Unknown
    hg.real.exe!hgcommands::hgpython::HgPython::run_hg(alloc::vec::Vec<alloc::string::String, alloc::alloc::Global> self, io::IO * args) Line 106	Unknown
    hg.real.exe!hgcommands::run::run_command(alloc::vec::Vec<alloc::string::String, alloc::alloc::Global> args, io::IO * io) Line 148	Unknown
    hg.real.exe!hgmain::main() Line 82	Unknown
    [Inline Frame] hg.real.exe!core::ops::function::FnOnce::call_once(void(*)()) Line 227	Unknown
    hg.real.exe!std::sys_common::backtrace::__rust_begin_short_backtrace<fn(),tuple<>>(void(*)() f) Line 125	Unknown
    hg.real.exe!std::rt::lang_start::{{closure}}<tuple<>>(std::rt::lang_start::closure-0 *) Line 66	Unknown
    [Inline Frame] hg.real.exe!core::ops::function::impls::{{impl}}::call_once() Line 280	Unknown
    [Inline Frame] hg.real.exe!std::panicking::try::do_call() Line 379	Unknown
    [Inline Frame] hg.real.exe!std::panicking::try() Line 343	Unknown
    [Inline Frame] hg.real.exe!std::panic::catch_unwind() Line 396	Unknown
    hg.real.exe!std::rt::lang_start_internal() Line 51	Unknown

Reviewed By: kulshrax

Differential Revision: D27724330

fbshipit-source-id: 2a016ddb76607c5f636b834dbac6e7d4443d8f40
2021-04-13 12:32:26 -07:00
Jun Wu
b0e6b21fc5 indexedlog: add RotateLog::slice_to_bytes
Summary: This will make RotateLog achieve zero-copy reading more easily.

Reviewed By: kulshrax

Differential Revision: D27724331

fbshipit-source-id: 57915516dc6bd1935838bd099a60c104f0bdef3d
2021-04-13 12:32:25 -07:00
Jun Wu
b895c335bd indexedlog: make RotateLog::iter_dirty not take mut self
Summary: This makes it more flexible.

Reviewed By: kulshrax

Differential Revision: D27724332

fbshipit-source-id: 43ad670519f0617a97e0b7d38b374f497e9c01af
2021-04-13 12:32:25 -07:00
Jun Wu
5c3d6d152f io: add config for pager wrapping mode
Summary:
This allows setting the wrapping mode. For example:

   lhg log -pv
   # copy paste long lines works.

   lhg log -pv --config pager.wrapping-mode=unwrapped
   # lines are not wrapped, ">" is shown for long lines.

   lhg log -pv --config pager.wrapping-mode=word
   # long lines wrapped at word level.

The default value matches "less" behavior.

Reviewed By: DurhamG

Differential Revision: D27720767

fbshipit-source-id: e29d6b13656407c0a1e63287fb96e2f8d914cfc8
2021-04-13 12:15:16 -07:00
Andrey Chursin
f2d873d77c checkout: check unknown files during native checkout
Summary: This is needed to prevent situation when we try writing into file that is untracked by hg

Reviewed By: DurhamG

Differential Revision: D27667152

fbshipit-source-id: 31bb9e30bd6b58e80ba96d280ff6ca1842c8caf6
2021-04-13 11:47:54 -07:00
Andrey Chursin
36b6bb98d3 checkout: bindings for check_unknown_files
Reviewed By: DurhamG

Differential Revision: D27667154

fbshipit-source-id: 0bdfb74761b01c1fe41ca8fd519c065a28381e74
2021-04-13 11:47:54 -07:00
Andrey Chursin
95e84b7302 checkout: introduce CheckoutPlan::check_unknown_files
Summary: This method checks if any of files that checkout writes is not tracked in hg and exists on disk

Reviewed By: DurhamG

Differential Revision: D27667153

fbshipit-source-id: 4ad8bc08520678ea0b51008ed14fb51ca4a98f76
2021-04-13 11:47:54 -07:00
Kostia Balytskyi
bf801f70a0 megarepo: import all_config_versions.thrift
Summary: To sync D27741269.

Reviewed By: mitrandir77

Differential Revision: D27741277

fbshipit-source-id: 52ade8d19ae434759a9b889fb82816dbf1feecfe
2021-04-13 11:38:27 -07:00
Stanislau Hlebik
0450243694 mononoke: fix sql query for streaming changelog
Summary:
Previously this query failed because it tried to convert bytes to int, and our
mysql wrapper doesn't support that.
Let's cast it instead

Reviewed By: krallin

Differential Revision: D27736863

fbshipit-source-id: 66a7cb33c0f623614f292511e18eb62e31ea582f
2021-04-13 11:15:00 -07:00
Stefan Filip
d54706d339 dynamicconfig: add hostcaps for determining Domain
Summary:
`hostcaps` abstracts the logic for determining whether we have a prod or corp
environment.

Reviewed By: DurhamG

Differential Revision: D27684641

fbshipit-source-id: 50df9a60b6a613b4cb5c9aed6cad2844aae85a6f
2021-04-13 10:42:45 -07:00
Stefan Filip
6e262c3b79 lib: hoist hostcaps to the top level of the lib directory
Summary:
We want to use it in Mercurial and the directory structure was playing bad
with Mononoke's OSS build.

Reviewed By: xavierd

Differential Revision: D27684642

fbshipit-source-id: 8827645eee58fa671f9c9e1964a34c34e3a8eeb6
2021-04-13 10:42:45 -07:00
svcscm svcscm
d03ebbe91b Updating submodules
Summary:
GitHub commits:

d5bf7f5a51
fd00f39f97

Reviewed By: yns88

fbshipit-source-id: 7be1955d8d431f4e5336463501ca0a74b431e921
2021-04-13 09:11:16 -07:00
Katie Mancini
bcf6aa465c teach edenfs to signal itself on MacOS nfs
Summary:
MacOS does not have the device field like linux that we can use to mark edenfs
nfs mounts. But there is the `f_mntfromname` field. This field more typically
might have the path which this nfs mount is mirrored from, but it should be fine
to hyjack as the edenfs indicator field.

Reviewed By: xavierd

Differential Revision: D27717945

fbshipit-source-id: 056fb39dc3273b68d79c26487fd045f4e7f93b7b
2021-04-13 09:09:02 -07:00
Katie Mancini
ccb76f1187 make device type for nfs similar to fuse
Summary:
With fuse we report "edenfs:" as the device, let's do the same thing with nfs
so watchman can recognize edenfs nfs mounts similarly.

I think its fine to use the standard "edenfs" as the server name in the mount
call rather than the address, from looking at:
https://www.systutorials.com/docs/linux/man/8-mount.nfs/

Reviewed By: xavierd

Differential Revision: D27630764

fbshipit-source-id: 9e476c90ece90e758b98d140c6bf4067dbca3661
2021-04-13 09:09:02 -07:00
Simon Farnsworth
0f817c72fb Provide an admin command for blobstore unlink
Summary: Currently just does XDB Blobstore, because the work to do other types and/or go via Packblob is significant.

Reviewed By: markbt

Differential Revision: D27735093

fbshipit-source-id: d3797017a2e0ff7c60525d1f4d4ee3e63b519d49
2021-04-13 08:38:29 -07:00
svcscm svcscm
686c3d849a Updating submodules
Summary:
GitHub commits:

f574e9eabb
9829ae1ad2
095f22b47f
3f39f8cedc

Reviewed By: yns88

fbshipit-source-id: 3018fae904bdd6f668b921e88a4839a082acfb69
2021-04-13 07:43:35 -07:00
Jan Mazur
4cb7732dae remove deprecated --readonly-storage cmdline arg
Summary: We have deprecated it in favor of argument that takes a boolean value.

Reviewed By: farnz

Differential Revision: D27709429

fbshipit-source-id: 45e9569188f2e9d017f1c5bf61f7c61bc0e5318a
2021-04-13 07:09:35 -07:00
Thomas Orozco
3c88bd8832 mononoke/timeseries: track count of valid buckets
Summary:
It's useful when operating with timeseries to know what range of data has been
populated. This diff adds support for this in mononoke/timeseries, by tracking
the number of buckets that fall within intervals where data was provided.

Reviewed By: mitrandir77

Differential Revision: D27734229

fbshipit-source-id: 3058a7ce4da67666e8ce8a46e34e277b69153ea4
2021-04-13 06:24:37 -07:00
svcscm svcscm
c854b43dc2 Updating submodules
Summary:
GitHub commits:

8732809799
13f8c315ca

Reviewed By: yns88

fbshipit-source-id: a10b329ece875bff4928d549f6644541f4fd76e0
2021-04-13 06:22:09 -07:00
Mark Juggurnauth-Thomas
a9b1b36721 admin: set background session class for skiplist build
Summary:
When building skiplists, set the session class to `Background`.  This ensures
that the blobstore writes for the new skiplist have completed fully.

Reviewed By: StanislavGlebik

Differential Revision: D27735411

fbshipit-source-id: 4ba8e8b91dafbb1aa258d15b26e7d773f63b5812
2021-04-13 06:12:20 -07:00
Thomas Orozco
a0a7091517 mononoke/lfs_server: reject Range requests that are out of bounds
Summary:
If the caller asks us for a range that extends past the end of our file, we'd
rather give them an error instead of silently returning the file.

This actually revealed one of the tests needed work :)

Note that right now we'll just end up categorizing this as 500. I'd like to
rework the errors we emit in the Filestore, but that's a somewhat bigger
undertaking so I'd like to do it separately.

Reviewed By: quark-zju

Differential Revision: D27193353

fbshipit-source-id: 922d68859401eb343cffd201057ad06e4b653aad
2021-04-13 05:10:00 -07:00
Mark Juggurnauth-Thomas
876f812e4b commitcloud: do not send backup bookmarks part
Summary:
The backupbookmarks part was used for infinitepush backup bookmarks, which were
deprecated.  Now stop sending the part entirely unless
`commitcloud.pushbackupbookmarks` is set.

Reviewed By: StanislavGlebik

Differential Revision: D27710099

fbshipit-source-id: 1eb404f106f5a8d9df6d73e11f60f89c1fa10400
2021-04-13 03:07:50 -07:00
Thomas Orozco
87aed04d37 mononoke/sql_ext: publish SQL max open connections stat
Summary:
Like it says in the title, this adds support for publishing our max open
connections to ODS. Note that this is a little more involved than I would like
for it to be, but there is no way to get direct access to this information.

This means, we need to:

- Expose how many open connections we have in flight (this is done earlier in
  this stack in the Rust MySQL bindings).
- Periodically get this information out out for MySQL, put it in a timeseries.
- Get the max out of said timeseries and publish it to a counter so that it can
  be fetched in ODS.

This is what this diff does. Note that I've only done this for read pools,
largely because I think they're the ones we tend to exhaust the most and I'd
like to see if there is value in exposing those counters before I use them.

We do the aggregation on a dedicated thread here. I contemplated making this a
Tokio task, but I figured making it a thread would make it easier to see if
it's misbehaving in any way (also: note that the SQL client allocates a bunch
of threads already anyway).

Reviewed By: HarveyHunt

Differential Revision: D27678955

fbshipit-source-id: c7b386f3a182bae787d77e997d108d8a74a6402b
2021-04-13 03:05:23 -07:00
svcscm svcscm
57d116fb8e Updating submodules
Summary:
GitHub commits:

81a15a1adb
0ebf797de8
1f4455d713
c1104a0bb2

Reviewed By: yns88

fbshipit-source-id: d6ea89f19cc5a62cffb4aaeb83748bba0353f8dd
2021-04-13 01:40:59 -07:00
svcscm svcscm
5761360f2c Updating submodules
Summary:
GitHub commits:

3e5bf7fa27
3f7ed5e783
6c9d6e1b0f
bbfb22353f
76306819c0
1ea7df884f

Reviewed By: yns88

fbshipit-source-id: a64d2c0fc85b3bfab78313f7c42d00eaa3803b8c
2021-04-12 23:39:03 -07:00
svcscm svcscm
526166a9cf Updating submodules
Summary:
GitHub commits:

9ad6fd9284
31521cda71
439aa1e9f4
256e9c4326
d2b1aaa2c7
ec4d921178
b7f6dd0f59
a9073a9bf6
de61bb3930

Reviewed By: yns88

fbshipit-source-id: ab8b39ad1d20af73ffc94dde489fbd619f7c59a4
2021-04-12 22:21:05 -07:00
svcscm svcscm
6774ad79d6 Updating submodules
Summary:
GitHub commits:

122417511f
0a2a3ea555
06de0fae90
addfe37f86
5dd826f324
04f6d26ce5
2daf5af7ec
6b9da5dfae
818a3c158f
674e0925af
9de7245269

Reviewed By: yns88

fbshipit-source-id: 1bde45c536dd34199e412b35dec826a0fd6f2358
2021-04-12 21:46:10 -07:00
svcscm svcscm
6c24587d75 Updating submodules
Summary:
GitHub commits:

d2785c1e4b
54578d07d2
e1dec6cdf1
b471fe2a91
eceb4f3ca9
018f1af489
fad054c08b
88f9f4b56c
9466fb0fc0
9e3b2e5c6b
2e4a08c351
96177fedbf
f3b2741e56
520455ce5f

Reviewed By: yns88

fbshipit-source-id: cfb71f154c7c9abf209bfacef7e1d54b43b28e29
2021-04-12 20:56:24 -07:00
Andrey Chursin
80adbe385c rename ephemeralcommit->hiddencommit
Summary: This name is more reasonable, since this commit is not actually ephemeral

Reviewed By: quark-zju

Differential Revision: D27722921

fbshipit-source-id: e2c0243d41a73341f9d0afdc79696ea37b34b8c7
2021-04-12 20:13:11 -07:00
svcscm svcscm
40534cf96b Updating submodules
Summary:
GitHub commits:

f5b12ac58f
f3ee98495e
13e5ae5707
692d08fb3c
639017e814
10a840cc07
9900cbec6d
b4ca2134fb
8af1b04db0
fb97440c0c
abdc703495
47902b22ed
74cfa32337

Reviewed By: yns88

fbshipit-source-id: e973e713e95876c0f0a979785f593e347346a6b9
2021-04-12 19:39:03 -07:00
Andres Suarez
6ccdc46775 third-party: update tracing-subscriber from 0.2.15 to 0.2.17
Reviewed By: dtolnay

Differential Revision: D27721151

fbshipit-source-id: 08a367662d506a48e0d639115c06cd4e714717b9
2021-04-12 19:24:10 -07:00