Commit Graph

45350 Commits

Author SHA1 Message Date
Xavier Deguillard
d0801a56d3 test-fb-hgext-treemanifest-server.t: silence spurious errors
Summary:
The test frequently fails with spurious remote errors such as:

  remote: ** Unknown exception encountered with possibly-broken third-party extension treemanifest.
  remote: ** Please disable treemanifest and try your action again.
  remote: ** If that fixes the bug please report it to the extension author.
  remote: ** Python 2.7.11 (default, Feb  5 2019, 17:19:11) [GCC 5.x 20180625 (Facebook) 5.5.0+]
  remote: ** Mercurial Distributed SCM (version 4.4.2_dev)
  remote: ** Extensions loaded: remotefilelog, rebase, simplecache, treemanifest, conflictinfo, debugshell, errorredirect, githelp, mergedriver, progressfile, pushrebase
  remote: Traceback (most recent call last):
  remote:   File "<string>", line 44, in <module>
  remote:   File "<string>", line 42, in __run
  remote:   File "/usr/local/fbcode/gcc-5-glibc-2.23/lib/python2.7/runpy.py", line 162, in _run_module_as_main
  remote:     "__main__", fname, loader, pkg_name)
  remote:   File "/usr/local/fbcode/gcc-5-glibc-2.23/lib/python2.7/runpy.py", line 72, in _run_code
  remote:     exec code in run_globals
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/hg.py", line 42, in <module>
  remote:     entrypoint.run(False)
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/entrypoint.py", line 80, in run
  remote:     dispatch.run()
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/dispatch.py", line 99, in run
  remote:     status = (dispatch(req) or 0) & 255
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/dispatch.py", line 393, in dispatch
  remote:     ret = _runcatch(req)
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/dispatch.py", line 575, in _runcatch
  remote:     return _callcatch(ui, _runcatchfunc)
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/dispatch.py", line 584, in _callcatch
  remote:     return scmutil.callcatch(ui, func)
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/scmutil.py", line 135, in callcatch
  remote:     return func()
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/dispatch.py", line 565, in _runcatchfunc
  remote:     return _dispatch(req)
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/dispatch.py", line 1353, in _dispatch
  remote:     lui, repo, cmd, fullargs, ui, options, d, cmdpats, cmdoptions
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/dispatch.py", line 1053, in runcommand
  remote:     ret = _runcommand(ui, options, cmd, d)
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/dispatch.py", line 1365, in _runcommand
  remote:     return cmdfunc()
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/dispatch.py", line 1350, in <lambda>
  remote:     d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/util.py", line 1337, in check
  remote:     return func(*args, **kwargs)
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/commands/__init__.py", line 5635, in serve
  remote:     s.serve_forever()
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/sshserver.py", line 107, in serve_forever
  remote:     while self.serve_one():
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/sshserver.py", line 139, in serve_one
  remote:     self.handlers[rsp.__class__](self, rsp)
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/sshserver.py", line 88, in sendstream
  remote:     for chunk in gen:
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/bundle2.py", line 710, in getchunks
  remote:     self._getcorechunk(), self._compopts
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/bundle2.py", line 732, in _getcorechunk
  remote:     for chunk in part.getchunks(ui=self.ui):
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/bundle2.py", line 1165, in getchunks
  remote:     pycompat.raisewithtb(exc, tb)
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/bundle2.py", line 1141, in getchunks
  remote:     for chunk in self._payloadchunks():
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/bundle2.py", line 1181, in _payloadchunks
  remote:     chunk = buff.read(preferedchunksize)
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/util.py", line 2062, in read
  remote:     for chunk in self.iter:
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/mercurial/util.py", line 2033, in splitbig
  remote:     for chunk in chunks:
  remote:   File "/data/users/xavierd/fbsource/fbcode/buck-out/dev/gen/scm/hg/hg#link-tree/edenscm/hgext/treemanifest/__init__.py", line 2255, in _generatepackstream
  remote:     for subname, subnode, subtext, x, x, x in subtrees:
  remote: RuntimeError: std::exception

They don't seem to affect what the test expect (missing node on the server), so
let's disable these

Reviewed By: DurhamG

Differential Revision: D14446457

fbshipit-source-id: 0ecb114bfcdeef1a3fcfef5a927f725401f90d4e
2019-03-14 16:01:22 -07:00
Durham Goode
ee7f2e0275 archive: prefetch remotefilelog files before executing archive
Summary:
Currently archive is almost useless because it fetches each file
one-by-one. Let's add prefetching.

Differential Revision: D14460880

fbshipit-source-id: 1f06e1ac9d03aae3ab27d3064f9fe6141051be06
2019-03-14 14:57:50 -07:00
Durham Goode
161cbd88ad archive: add test demonstrating multiple fetches during archive
Summary:
Remotefilelog is not optimized for archive, and does many fetches. A
future test will fix this, but let's add a test first.

Differential Revision: D14460881

fbshipit-source-id: 1797193be3dfec246fabb659ffaeea3dea69b8f3
2019-03-14 14:57:49 -07:00
Jun Wu
6c1131c6e7 newdoc: revise WritingExtensions
Summary: Fill in an revset example. Clarify some other places.

Reviewed By: sfilipco

Differential Revision: D14430873

fbshipit-source-id: ae4a8996f8254f1ad374effe3a3da0ce9d2306eb
2019-03-14 11:51:39 -07:00
Liubov Dmitrieva
7f2828e4a0 commit cloud code clean up
Summary:
In preparation to support Mononoke clean up the features that are Mercurial
specific and Mercurial infinitepush implementation specific.

For Mononoke migration we will to write a whole new set of logic what to do if
the "infinitepush" path has been changed. So, clean up is useful before
writing this logic.

Reviewed By: singhsrb

Differential Revision: D14455360

fbshipit-source-id: d15c3a9032b4888a1aa391da34ad5e499aba9a15
2019-03-14 10:41:48 -07:00
Saurabh Singh
b04b0537b8 fbconduit: make globalrevs/svnrevs tests more robust
Summary:
D14448505 added the functionality of supporting globalrevs/svnrevs
with fbconduit. Lets add some more tests for it. In particular, this adds tests
for the failure case.

Reviewed By: quark-zju

Differential Revision: D14461674

fbshipit-source-id: 27d52f88013f694a2cb6bf1af795eba4f5dccc93
2019-03-14 10:35:32 -07:00
Kostia Balytskyi
b2284a0ad1 chg: remove the ability to produce an actual binary
Summary: We don't run this binary anymore, no reason to build and ship it.

Reviewed By: quark-zju

Differential Revision: D14437317

fbshipit-source-id: dd6da521783f18a2a518a7aa042be98950894e89
2019-03-14 06:35:45 -07:00
Saurabh Singh
3c301d160d phrevset: fix using diff numbers for WWW repository
Summary: See linked task for details.

Reviewed By: quark-zju

Differential Revision: D14448507

fbshipit-source-id: 07af703e2b28ca8423a0da309190698da6f61594
2019-03-13 18:35:09 -07:00
Saurabh Singh
d4c9456be9 fbconduit: fix resolving phabricator callsign for WWW
Summary: See the linked task for details.

Reviewed By: quark-zju

Differential Revision: D14448505

fbshipit-source-id: fc2efa71510b718c25a2cea3acf39663d280f19a
2019-03-13 18:35:09 -07:00
Saurabh Singh
cad659f28a hgext: reformat using black
Summary: See title

Reviewed By: quark-zju

Differential Revision: D14448508

fbshipit-source-id: ef0a2c443a64fc154e80bbb7bcd3545666c7f3fd
2019-03-13 18:35:09 -07:00
Saurabh Singh
6525966fd1 memcommit: enforce target parent to be original parent
Summary:
After going over the code review for D14332967, I have decided to keep
things simple for now and only allow making commits to same target parent as
the original parent. This was already the intention with the existing code.
Therefore, this commit just further enforces the requirement.

Reviewed By: quark-zju

Differential Revision: D14422351

fbshipit-source-id: 2f786fc3596b17c5020de9906adf8f22b50be4dd
2019-03-13 11:50:42 -07:00
Liubov Dmitrieva
93057c645f codeformat - remove weird looking + for string concat on the same line
Summary:
These was probably introduced by moving to black.

The changes in the diff were generated by script.

Reviewed By: mitrandir77, singhsrb

Differential Revision: D14439667

fbshipit-source-id: 54f6e0bdcc59c1c6deb4eea46dc6f865bcd48cf8
2019-03-13 11:40:26 -07:00
Saurabh Singh
5e33e6eafc memcommit: identify original parent and target parent as separate entities
Summary:
The code currently assumes that the target parent is the same as the
original parent by totally ignoring the original parent which can seem
surprising and more importantly, hinders supporting behaviors such as allowing
commits to a new parent. Therefore, this commit fixes the code to identify the
original and target parent separately.

Reviewed By: quark-zju

Differential Revision: D14422352

fbshipit-source-id: bc175f2fe636f9bf47a68f64c8efd52660e3b1b7
2019-03-13 10:07:32 -07:00
Saurabh Singh
6f84e1a07e fbconduit: fail gracefully when dealing with unknown revision
Summary: See linked task for details.

Reviewed By: quark-zju

Differential Revision: D14430008

fbshipit-source-id: f75823ec936ff14122753ef94d11132ac4d9a099
2019-03-13 09:58:30 -07:00
Mark Thomas
9fcabe0254 commitcloud: restore omitted bookmarks for hidden commits
Summary:
D14183009 made commit cloud accept cloud bookmarks for hidden commits, rather
that omitting them.  However, this only works for future bookmarks.  If the
bookmark was already omitted, then `_checkomissions` would not recover the
situation for the same reason.

Update `_checkomissions` to also allow cloud bookmarks on hidden commits.

Reviewed By: liubov-dmitrieva

Differential Revision: D14437656

fbshipit-source-id: 2372323022a59bfd4210bc76f39b9a74872d5efe
2019-03-13 07:33:58 -07:00
Xavier Deguillard
93a29ed8e7 remotefilelog: do not wait for hg_memcache_client to exit
Summary:
Now that hg_memcache_client will voluntarily exit when hg terminates, we no
longer need to wait for hg_memcache_client to finish before exiting hg.

Reviewed By: DurhamG

Differential Revision: D14396510

fbshipit-source-id: 7e73d9b70d481e58a0c47cd0f408580e6d548fd9
2019-03-12 15:09:56 -07:00
Saurabh Singh
f6eb9864da memcommit: allow specifying destination parents while serializing commits
Summary:
This is useful for testing the `memcommit` command as the clients can
specify different destination parents than the original parents of the commit.

Differential Revision: D14410213

fbshipit-source-id: 846e0d764b9606f00aed95995c694f379457eec7
2019-03-12 12:27:39 -07:00
Saurabh Singh
14081b0ae9 memcommit: use a better error message for disallowing unrelated roots
Summary:
Earlier message suggested the feature is not supported when in fact it
is allowed via a configuration.

Differential Revision: D14410214

fbshipit-source-id: 0ec2a22920417c378cf3ac596565f9d2fa5f6d5c
2019-03-12 12:27:38 -07:00
Xavier Deguillard
05226564c2 remotefilelog: run repack after prefetch
Summary:
Operations like `hg log -p` will inherently cause many requests to
hg_memcache_client. This will force many small packfiles to be created which
will significantly slow down future invocation of hg.

Now that `hg repack --incremental --packsonly` is fast, we can afford to run it
when mercurial exit after a prefetch operation was run.

Differential Revision: D14387735

fbshipit-source-id: 45f89f1120458c8b2471a1c55cafb6bc87263dd0
2019-03-12 10:51:57 -07:00
Xavier Deguillard
f4072c3d0a remotefilelog: split fetching data and history
Summary:
When using packfiles, history and data are in different files, and thus it's
possible to only fetch one.

For now, besides the requests coming from contentstore and metadatastore, both
will be fetched, as the code hasn't been audited to know whether we only want
history or data.

Differential Revision: D14387734

fbshipit-source-id: 6aafd477ff486b9316458ce0e80636152db45b89
2019-03-12 10:51:57 -07:00
Liubov Dmitrieva
1867f70c46 cloud sync + pushbackup: record remotepath to the local state
Summary:
For pushbackup it is needed to make hg rage more informative because we store
states for different paths separately anyway.

For cloud sync we will have to write some migration logic: if the remotepath
has been changed, we have to check what the server has to make sure everything
is backed up as cloud sync would expect.

Differential Revision: D14420713

fbshipit-source-id: 2046e9d7b16291a49d1bc40da5285de58017f4f2
2019-03-12 09:34:50 -07:00
Xavier Deguillard
41d275ad36 revisionstore: ignore transient errors during repack
Summary:
Corrupted packfiles, or background removal of them could cause repack to fail,
let's simply ignore these transient errors and continue repacking.

Reviewed By: DurhamG

Differential Revision: D14373901

fbshipit-source-id: afe88e89a3bd0d010459975abecb2fef7f8dff6f
2019-03-11 18:15:45 -07:00
Stefan Filip
2eb3c24956 configparser: upgrade crate to rust edition 2018
Summary: As requested in D14380687.

Differential Revision: D14393014

fbshipit-source-id: 365c713b6f5a106cef0b945e63f224b7651d0e8f
2019-03-11 15:32:55 -07:00
Stefan Filip
3f33e9f3e9 configparser: fix XDG config loading
Summary:
The spec for both XDG and Mercurial say that when the XDG_CONFIG_HOME variable
is not set, we should default to $HOME/.config.

Windows and macOS also have a designated config folder outside of the home directory.
The `dirs` crate provides consistent access to this folder. I see no harm in looking at config
 folders across all operating systems.

Reviewed By: quark-zju

Differential Revision: D14380686

fbshipit-source-id: 5e5a9cd4694aaa49fbc526f4917dc4afdaeb9842
2019-03-11 15:32:55 -07:00
Stefan Filip
403e1c7ad2 configparser: rustfmt on hg.rs
Summary: Automatic formatting using rustfmt

Differential Revision: D14380687

fbshipit-source-id: 5f7832419b0941c00e2399c902454862580988a4
2019-03-11 15:32:55 -07:00
Stefan Filip
41e75fce3f manifest: fix infinite loop when cursor encounters error
Summary:
quark-zju noticed in code review that `Cursor` could get into an infinite loop when
it's results would be collected into a Vec<_>. That was the motive that I
needed to update `Cursor` to transition to `State::Done` when the cursor
encounters an error. Previously I felt that users of `Cursor` would only be
empowered by having the ability to retry the failure.

Reviewed By: quark-zju

Differential Revision: D14393590

fbshipit-source-id: b3e0974ac15d62f3f17790229121c0dec3a6149e
2019-03-11 15:27:52 -07:00
Jun Wu
be6f884be4 remotenames: fix crash with hg-git + remotefilelog
Summary:
Fixes the below type error when pulling from a git repo using hg-git on my laptop:

    File "edenscm/hgext/remotenames.py", line 225, in expull
      pullremotenames(repo, remote, bookmarks)
    File "edenscm/hgext/remotenames.py", line 314, in pullremotenames
      path = activepath(repo.ui, remote)
    File "edenscm/hgext/remotenames.py", line 1464, in activepath
      rpath = _normalizeremote(remote.url)
    File "edenscm/hgext/remotenames.py", line 1439, in _normalizeremote
      u = util.url(remote)
    File "edenscm/hgext/hggit/__init__.py", line 164, in _url
      if not (path.startswith(pycompat.ossep) and ":" in path):
    AttributeError: 'function' object has no attribute 'startswith'

Basically, `peer.url()` is the API, `peer._url` is a private field that does
not always exist somehow.

Besides, further remove named branches that can crash hg-git with
NotImplementedError:

    File "edenscm/hgext/remotenames.py", line 225, in expull
      pullremotenames(repo, remote, bookmarks)
    File "edenscm/hgext/remotenames.py", line 322, in pullremotenames
      for branch, nodes in remote.branchmap().iteritems():
    File "edenscm/hgext/hggit/gitrepo.py", line 73, in branchmap
      raise NotImplementedError

Reviewed By: DurhamG

Differential Revision: D14144462

fbshipit-source-id: 2e886c639cf6689480f84626eaf0d5ec25512ea0
2019-03-11 15:23:46 -07:00
Liubov Dmitrieva
ea8ba67697 fix infinitepush state files in hg rage
Summary:
Since state files have been changed, now it is one per path, we should dump
them in a correct way

Reviewed By: markbt

Differential Revision: D14406311

fbshipit-source-id: 8d74a51e63028ec81bcf5e55ad117d3c960b4651
2019-03-11 12:13:05 -07:00
Jun Wu
28b4dfbb38 smartlog: show more commits
Summary:
To make "draft()" bounded and train users to hide unused commits manually,
change smartlog to "hide commits before <a static date>", instead of
"hide commits that are older than <a static time span>". Then we can
incrementally decrease the static date, and eventually show everything, and
force the user to think about what commits to keep or hide.

Reviewed By: singhsrb

Differential Revision: D13993584

fbshipit-source-id: 1a2b56f50d7f014a589f798cd2feaa6931e64fe3
2019-03-11 11:11:59 -07:00
Jun Wu
9e0a7c41a4 subrepo: remove subrepo support
Summary:
Subrepo is another unloved features that we don't want to support.

Aggressively remove it everywhere, instead of just turning off configs.

I didn't spend much time to split this commit so it's smaller and more friendly
to review. But it seems tests are passing.

Reviewed By: sfilipco

Differential Revision: D14220099

fbshipit-source-id: adc512a047d99cd4bafd0362e3e9b24e71defe13
2019-03-11 10:43:55 -07:00
Mark Thomas
dbe1d30cf0 treemanifest: include all trees when infinitepush rebundle converts trees
Summary:
If an infinitepush bundle contains flat manifests and is served from a
treemanifest repository, it can potentially fail to send all the needed data to
the client.

Understanding the bug requires two bits of context:
1. When sending commits from a tree server to a tree client, we generally don't
send any trees because they can be fetched by the client ondemand later. The one
exception to this is for infinitepush bundles, where the trees inside the bundle
cannot be served ondemand, and therefore must be served at pull time. To do this
we check if a given manifest node exists in the repositories permanent storage,
and if it doesn't, we assume it came from an infinitepush bundle and serve it
with the pull.
2. When we lookup a manifest and fail to find a tree, our last resort is the
ondemandstore which knows how to convert a flat manifest into a tree manifest.
On the server, this is responsible for converting each of the flat bundle's
manifests into treemanifests before we serve the bundle to the client. As part
of converting the flat manifests into treemanifests, it writes the new tree
data into a pack file.

The bug is then, when serving a stack of commits, if we try to package up the
top tree first (i.e. the most recent tree), we end up converting the entire
stack from flat into trees, which inserts the bottom most trees into the
temporary pack file.  Because they exist in the temporary pack file, when we
later check if they are part of the repositories store we end up finding them,
which causes us to treat them as not-infinitepush-trees which means we don't
serve them to the client.

The fix is to change the infinitepush tree-serving code to not consider the
mutable packs when checking if it should send trees.

Reviewed By: mitrandir77

Differential Revision: D14403925

fbshipit-source-id: 38043dfc49df5ff9ea2fae1d3cac341c4936509c
2019-03-11 05:39:49 -07:00
Mark Thomas
4578cd921f infinitepush: don't include nullid in bundle roots
Summary:
When calculating bundleroots (the commits that are the common ancestors for the
infinitepush bundle), we currently include all the `nullid` parents (i.e. p2 for
most commits).  This bloats the size of the list, and is unnecessary.

Reviewed By: quark-zju

Differential Revision: D14385912

fbshipit-source-id: c518b8b1aa27cff8562c2358a024b8a08ced8cba
2019-03-11 04:25:20 -07:00
Jun Wu
ec163cfbfa drawdag: allow overriding dates
Summary: Make it possible to override dates in commits.

Reviewed By: singhsrb

Differential Revision: D13993585

fbshipit-source-id: 59a72302d7ed0cb22f4eff84c1325e167963508c
2019-03-08 20:27:07 -08:00
Jun Wu
cf0b61e03e memcommit: reformat help text
Summary: A code block requires `::\n\n`. `::\n` alone is not enough.

Differential Revision: D14323698

fbshipit-source-id: 59e19fde3dbf1b88126451b2dbc5cfd90e415f60
2019-03-08 20:15:24 -08:00
Jun Wu
ca52b70e03 config: enable merge.printcandidatecommmits
Summary:
The feature was completed by Phil in D9816270. It's handy and can probably
reduce user support burden like: https://fb.intern.facebook.com/groups/scm/permalink/2039619916087618/

Therefore let's enable it.

Reviewed By: DurhamG

Differential Revision: D14293405

fbshipit-source-id: 54e934e0bf495c090109462e4f743d427df39380
2019-03-08 19:55:46 -08:00
Saurabh Singh
314f127f19 memcommit: provide serialization as separate module
Summary:
Some dependant libraries may only care about the serialization logic. As an
example, see D14332987 where the `hgrepo.py` only needs to depend on the
serialization. Therefore, its cleaner to extract out the serialization from the
`memcommit` data.

Reviewed By: quark-zju

Differential Revision: D14388474

fbshipit-source-id: 6f049dcc596b66b9ad72905f133529bdc9092382
2019-03-08 17:55:18 -08:00
Saurabh Singh
4202f5c94f memcommit: make memcommit shared code compatible with python 3
Summary:
The shared code can be potentially called by clients using python 3. Therefore,
let's be compatible with python 3.

Reviewed By: quark-zju

Differential Revision: D14387005

fbshipit-source-id: 2ffb359d4d2762ffcba4a26a3ae5a7b45e89572b
2019-03-08 17:55:18 -08:00
Jun Wu
58027d450b runtests: add --update-output flag
Summary:
Add a `--update-output` flag to answer "yes" for all `-i` prompts.
Also add an "all" option for the `-i` prompt.

This is useful to apply changes to a large range of tests.

Reviewed By: DurhamG

Differential Revision: D14233452

fbshipit-source-id: ebfc5c9a897a7fc7fea779aefef538e420e1e197
2019-03-08 17:15:52 -08:00
Jun Wu
6de9bec782 config: stop %include from scaning directories
Summary:
`listdir` makes it more expensive to detect config changes. We no longer need
it. Therefore drop the feature.

Reviewed By: markbt

Differential Revision: D13875655

fbshipit-source-id: 147adce45021c7b028aada5c40f498c2fd58c7f5
2019-03-08 16:57:06 -08:00
Jun Wu
f8e28f1466 bookmarks: remove branch name collision check
Summary:
Eventually we'd like "default" to be not a special name. This is one step
torwards that.

Differential Revision: D14233455

fbshipit-source-id: 739091a124bc667c607c283bf00abc66b4081d25
2019-03-08 16:33:20 -08:00
Jun Wu
c0d96cde7d hook: make "mercurial" module available for Python hooks
Summary:
Some hooks (ex. mergedriver) are checked in old release branches. Provide
"mercurial" module compatibility so they won't break.

Reviewed By: mitrandir77

Differential Revision: D14366343

fbshipit-source-id: d47cc4fd512f63e4f6cdc5d7e5ab2c4398216b2f
2019-03-08 16:04:38 -08:00
Jun Wu
46266b7436 tests: use hg files to decide testrepohg vs syshg
Summary:
`helpers-testrepo.sh` decides whether to use the in-repo hg or the system hg.
With the latest treemanifest chagne, the in-repo hg could fail on `hg files`
complaining about `remotefilelog.reponame` not being set, while `hg id` still
works.

Since most `test-check` tests just run `hg files`. Use the same command instead
of `hg id` to decide whether to use system hg.

Reviewed By: sfilipco

Differential Revision: D14372231

fbshipit-source-id: e87d407ff1d2552306f62912e0805dafe3c0bacb
2019-03-08 15:45:51 -08:00
Jun Wu
36564b1101 lfs: merge hg lfs-pointers into fbcode lfs-pointers
Summary:
There are not a lot of users of fbcode lfs pointers. Let's just merge the hg
one into it. This makes it easier to upload things without worrying about which
lfs-pointer file to use.

Reviewed By: singhsrb

Differential Revision: D14381672

fbshipit-source-id: f3ecb996e094d41605e3a883a83bd3e96b5bcd55
2019-03-08 12:25:59 -08:00
Liubov Dmitrieva
674e3ab4ec infinitepush - implement known command
Summary:
Introducing new command for Mercurial only to support check of existing commits in both the repo and the infinitepush storage.

For Mononoke case, just the standard 'known' works fine.

We can not overload the standard 'known' in mercurial case, because it is used in discovery and having there infinitepushcommits breaks some commands.

Next diff is replacing isbackedupnodes with isbackedupnodes2

Reviewed By: markbt

Differential Revision: D14370603

fbshipit-source-id: 8d7b64b4d556c0f1caa7f797dba360501571daad
2019-03-08 09:05:42 -08:00
Mark Thomas
38595d6fe3 dispatch: detect stale virtual checkouts and provide advice
Summary:
If Mercurial detects `ENOTCONN` when trying to open the current directory,
there is a high likelihood this is a disconnected eden virtual checkout.
Provide some advice as to what to do: run `hg fs start`.

Reviewed By: strager

Differential Revision: D13888873

fbshipit-source-id: 7619df0681d15b862d1a6f86d90491aa873bf86b
2019-03-08 06:02:22 -08:00
Mark Thomas
5bc5dde3a4 rage: add edenfs rage to hg rage
Summary: Include the output from edenfs rage in the hg rage output.

Reviewed By: chadaustin

Differential Revision: D14007061

fbshipit-source-id: fe0baf6c19dd4f2afd470ba70304c78582dfe879
2019-03-08 06:02:22 -08:00
Mark Thomas
a574573d52 fs: add stats subcommands
Summary: Add `hg fs stats` for the edenfs stats commands.

Reviewed By: chadaustin

Differential Revision: D14007060

fbshipit-source-id: 453133d04867a90fd7a40bc05288e35ae56fad93
2019-03-08 06:02:22 -08:00
Mark Thomas
e7bd8088ef fs: add other subcommands
Summary: Add `hg fs` subcommands for the other main `edenfsctl` commands.

Reviewed By: chadaustin

Differential Revision: D14007062

fbshipit-source-id: 9b5f56b14b5812216c929232b2697233f38288cc
2019-03-08 06:02:22 -08:00
Mark Thomas
c202c9953b fs: add start, stop and restart subcommands
Summary:
Add `hg fs start`, `hg fs stop` and `hg fs restart` subcommands to start, stop
and restart the eden daemon.

Reviewed By: chadaustin

Differential Revision: D13888876

fbshipit-source-id: ab190675d2b2ad56f38d723d1859f516aa3165e8
2019-03-08 06:02:21 -08:00
Mark Thomas
3c5d3fba54 visibility: add pushrebase support
Summary:
Support updating of commit visibility when using pushrebase.  Since obsmarkers
may not be available, this also involves looking at the commit mutation data
returned from the server.

Reviewed By: DurhamG

Differential Revision: D12980783

fbshipit-source-id: 837e356e500e7bf9710a3619a31094cae21d36c9
2019-03-08 03:05:58 -08:00