Commit Graph

3254 Commits

Author SHA1 Message Date
Zhaolong Zhu
be0cf2d597 github: rename 'GitHubCLIEndpoint.graphql' to 'GitHubCLIEndpoint.graphql_sync'
Summary:
I will add an async method `graphql` for `GitHubCLIEndpoint` later, so users can use it instead of low level async `make_request`. In order to do that, we need to rename current `graphql` to `graphql_sync`

This change is to keep the API same with [graphql-core library](https://fburl.com/nszrxh2m)

Reviewed By: bolinfest

Differential Revision: D41818265

fbshipit-source-id: 8aa0be9a4ac3a7b977069dabcd075187d3735226
2022-12-09 08:58:10 -08:00
generatedunixname89002005307016
b563caa42c Add annotations to eden/scm/edenscm/help.py
Reviewed By: yancouto

Differential Revision: D41871933

fbshipit-source-id: e181db2d208772db237fa362a38b7ec95f364dc7
2022-12-09 05:29:48 -08:00
generatedunixname89002005307016
e85dbb26c6 Add annotations to eden/scm/edenscm/ext/extlib/mysqlutil.py
Reviewed By: yancouto

Differential Revision: D41838585

fbshipit-source-id: 7150b77fc7690225f4da34b49fd2bb73165b8213
2022-12-09 05:23:01 -08:00
Liubov Dmitrieva
4b3f43b9dd add . alias for the current workspace
Summary:
add . alias for the current workspace to `hg cloud move` and `hg cloud
copy` commands

Reviewed By: mitrandir77

Differential Revision: D41582556

fbshipit-source-id: 36fb71b6dc0217c21916f98cf35f2ea3c5a8c83a
2022-12-09 03:51:57 -08:00
Liubov Dmitrieva
62700f765c add dates support for hg cloud log
Summary:
add dates support for `hg cloud log`

this feature will allow our users to select revisions within some date range and even generate a list of revs using template language and a date spec that can be later passed to the `hg hide`, `hg move` or `hg copy` command

```
liubovd ️  ~/fbsource/fbcode/eden/scm
 [21] → CHGDISABLE=1 ./hg cloud log -d "may 2022 to nov 2022" -T "-r {node} "
-r 9eff116c3ded29fdbb9677a6f224d5c0fb176b51 -r cd77c4713f7cc05979513156aa3cee9b1b71c0a5 -r 7d518da4cd576781236ef242f50afd4b26304101 -r be6bcf2e06cc4b86fb1f4d5916ff499aab87ec0b -r bd25bf01ea0f0c409e511d788f0d4e0977f2a23f -r b628734bfcdabbf171e3e7f68b6bb083091d3bf4 -r a0b62ddbcb92d9016a91fc029f9c39a4139d2a00 -r 744a751b2559d1a22595f3e883a02741c1676a6d -r 64c3c2729d90548d51213d10ece158be6e0995e3 -r 514f222243cc1e803f6164ee94a5e9a230e1fb6b -r 4eff725b392f8f5841e9674c87bdc1cba675f6e8
```

Reviewed By: mitrandir77

Differential Revision: D41580891

fbshipit-source-id: 7cb2db121795135d74098898b2a81e70c7eafce8
2022-12-09 03:51:57 -08:00
Michael Bolin
07f84fcc03 ensure Git identity is set when using commit-tree in sl pr
Summary:
`git commit-tree` reads identity information from `.gitconfig` by default,
but a Sapling user is not required to have a `.gitconfig` file.
Previously to this change, this call to `git commit-tree` would crash
if `git` could not read the identity information from `.gitconfig`.

Reviewed By: zzl0

Differential Revision: D41855800

fbshipit-source-id: b11e0e96bca7720aaf0d06fd44bfdb49666fc072
2022-12-08 18:32:50 -08:00
Michael Bolin
b392c2e55b fix ghstack integration so it works without a .gitconfig file
Summary:
Previously, users would get a confusing error about
`git commit-tree` failing if no `.gitconfig` existed for Git
to read `user.name` and `user.email` values from.

Reviewed By: zzl0

Differential Revision: D41852251

fbshipit-source-id: 788d6ffa5e78db913ada08b777f28897656fd161
2022-12-08 18:32:50 -08:00
Michael Bolin
74dc50778a introduce gituser.parse_username() utility
Summary:
There are cases where Git needs `user.name` and `user.email`
specified independently, so introduce a utility to facilitate that.

Also move the existing `gituser()` function into this new file
so utilities are consolidated in one place.

Reviewed By: zzl0

Differential Revision: D41852252

fbshipit-source-id: 8b998074017372cd2a55f1209240949c8f18036f
2022-12-08 18:32:50 -08:00
Mark Juggurnauth-Thomas
0ec7d7de75 make it possible to access Mononoke repos with slashes in their names
Summary:
Mononoke repo names are permitted to contain slashes, however currently Sapling's URL parsing doesn't understand this, and instead has a bunch of hacks designed to work around misunderstandings of URIs.  As a result, Sapling can't currently clone them.

You can look at resources like [Wikipedia's artical on URIs](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier) if you are not familiar with how uniform resource identifier syntax should work.

We fix this by handling the `mononoke` and `fb` URI schemes specifically.

* For the `mononoke` scheme, the authority is the Mononoke server and the path is the name of the repository, with any leading or trailing slashes removed.

* For the `fb` scheme, the path is the name of the repository, and there should be no authority as the server is implicit.   This means a valid `fb` scheme URI is of the form `fb:reponame`.  Unfortunately, since people misunderstand `://` to be a single token, existing `fb` URIs exist of the form `fb://reponame`.  This is a problem, as if the repo name has a slash in it, it becomes `fb://firstpart/secondpart`, where `firstpart` is the authority and `secondpart` is the path.  We handle this specially by taking the scheme-specific part as a whole and removing all leading and trailing slashes.

In order to fix the second in the long-term, we must also fix up how the `schemes` extension handles URIs like the `fb` scheme.  In a similar vein, we substitute the full scheme-specific part in the target URL.  This will allow us to migrate from `fb://reponame` to `fb:reponame`, at which point we can use correct URI parsing in the `fb` scheme, as we do for the `mononoke` scheme.

Reviewed By: yancouto

Differential Revision: D41771964

fbshipit-source-id: e93060afe316f4b965a6d1770b1b88a8d60e5f5c
2022-12-08 06:43:09 -08:00
Saul Gutierrez
d33985dd48 debugruntest: add tar command
Summary:
Adds a VERY simple implementation of the `tar` command to debugruntest. This command was added since old version of Windows still don't have the `tar` command. Additionally, running tests using the `tar` command on Windows would cause trouble for certain paths when running tests using Cygwin.

At the moment this implementation only supports decompressing files, but support for other options can be added in the future.

Reviewed By: quark-zju

Differential Revision: D41793100

fbshipit-source-id: 8761ebd1e02a010e4634e6003ed7bcdd3a5166d4
2022-12-07 19:54:24 -08:00
Saul Gutierrez
2d3dbdf9a4 debugruntest: add -a option to ls on debugruntest
Summary: Adds a simple equivalent to the `-a` option in the `ls` command to the `ls` debugruntest "command".

Reviewed By: quark-zju

Differential Revision: D41793380

fbshipit-source-id: 6e001e768eae4206efc037f2f366028060aba5c8
2022-12-07 19:54:24 -08:00
Saul Gutierrez
ff62e70532 debugruntest: fix .bat invocation for debugruntest on Windows
Summary:
As mentioned in D41793101, debugruntest on Windows had trouble invocating external binaries. This was in part due to an issue with `.bat` files, which this diff fixes.

 `debugruntest` creates shims for calling the original binaries and somewhat alters the path, including only the path to the shims and the path to hg (`.bat` files on Windows). The non-Windows shims worked fine, but the Windows ones had an issue since before this diff the paths on the shim were not quoted, making the desired binary not invokable (e.g. `C:\Program Files\Git\cmd\git.exe` unquoted failed because of the space on it).

Reviewed By: quark-zju

Differential Revision: D41825107

fbshipit-source-id: 5f73a52f62e468d44c35870d28319892fb69258d
2022-12-07 19:54:24 -08:00
Saul Gutierrez
2e30eb56d2 debugruntest: fix requires binary invocation for debugruntest .t tests
Summary:
When running `.t` integration tests using `debugruntest`, and those tests depend on some external binary, they have to be declared with teh `requires` keyword at the beginning of the test. Those external binaries can be invoked either by the "shell" in the `.t` tests or by hg/sl.

Before this diff a mechanism existed for calling external commands under `debugruntest`, but this only worked for those invoked via the `ui.system` method. This was possible since one of the methods ultimately called by `ui.system` was monkey-patched by `hg.py`. This diff does something similar for the `subprocess.run` method.

Reviewed By: quark-zju

Differential Revision: D41793101

fbshipit-source-id: dffb042791e3c4b9be9ae05a8b8586a4fe3f382d
2022-12-07 19:54:24 -08:00
Michael Bolin
0acf792515 leverage f-strings in gitcommittext()
Summary:
Using f-strings avoids the need to mentally match up `%s`
placeholders with variables.

Reviewed By: quark-zju

Differential Revision: D41784141

fbshipit-source-id: d55a5ffda4696e3ccfe2370434f3712e249067f6
2022-12-07 17:55:55 -08:00
Michael Bolin
ba388581d9 add types and a unit test to gitcommittext()
Summary:
Before making changes to `gitcommittext()`, this puts some
stronger guarantees in place in the form of doctests and types.

Reviewed By: zzl0

Differential Revision: D41784016

fbshipit-source-id: 3ca8e957b0dabc1eededfe25d137371dcbdeaab5
2022-12-07 17:55:55 -08:00
Zhaolong Zhu
99088a6648 terms: remove "master" and "slave" used in combination
Summary: moving away offensive terminolog

Reviewed By: quark-zju

Differential Revision: D41805483

fbshipit-source-id: 7949c3c76dbf4505d9182d520fef4dd8e0215cc7
2022-12-07 14:54:55 -08:00
Zhaolong Zhu
7ed1ab71b6 filemerge: add metrics for copytracing rename prompt
Summary: add metrics for copytracing rename prompt to understand how many users are impact by renaming issue.

Reviewed By: quark-zju

Differential Revision: D41804438

fbshipit-source-id: cf73f433512b63f5c06056d2bf32733bc2e86df3
2022-12-07 14:31:44 -08:00
Ivan-Sanchez-Diaz
a4dbd37fa7 fix sl init in existing directories (#277)
Summary:
as mentioned in https://github.com/facebook/sapling/issues/228 ``sl init --git DIR`` results in an error if ``DIR`` already exists, this fix creates a temporary directory if the directory exists and then moves the ``.sl`` directory into the target directory, if the target directory exists and already contains a ``.sl`` directory an error is thrown saying ``destination DIR is already a repository``

Pull Request resolved: https://github.com/facebook/sapling/pull/277

Reviewed By: zzl0

Differential Revision: D41771411

Pulled By: bolinfest

fbshipit-source-id: e3dc108c37a7dfce61f854212a1e4fc178e1cf89
2022-12-06 18:46:39 -08:00
Liubov Dmitrieva
10a07cefed add template support to hg cloud sl command
Summary:
add template support to `hg cloud sl` command

it is a bit unusual from user's point of view that it is not supported, now
let's support it

it also provides an easy way to see the full hashes

Reviewed By: markbt

Differential Revision: D41579865

fbshipit-source-id: 92f15394628799ee8f54796387f0055ed8bfac7e
2022-12-06 03:54:57 -08:00
Liubov Dmitrieva
38921ca3a0 add hg cloud log command
Summary:
add `hg cloud log` command to print metadata for commit cloud commits from a
workspace in linear view (without lines to connect nodes)

it used to be possible to get a linear (non graph) view from `hg cloud sl` command with some tricks around templates but it is not possible anymore nowadays, so adding a separate command to make it possible again

the command will be helpful for bulk commit cloud operations without a need of full sync or workspaces switch, see more details here: https://www.internalfb.com/intern/wiki/Commit_Cloud_Sync/#copy-move-all-commits-fr

Reviewed By: mitrandir77

Differential Revision: D41579597

fbshipit-source-id: a08e6c885515318977fc59cd77bdc49fa87ab561
2022-12-06 03:54:57 -08:00
generatedunixname89002005307016
f00b985538 Add annotations to eden/scm/edenscm/thirdparty/attr/validators.py
Reviewed By: yancouto

Differential Revision: D41712615

fbshipit-source-id: 627452fbedd5f4237a51f16676b7c827712ab39a
2022-12-06 03:21:20 -08:00
generatedunixname89002005307016
ab3ccda20b Add annotations to eden/scm/edenscm/ext/snapshot/createremote.py
Reviewed By: yancouto

Differential Revision: D41731428

fbshipit-source-id: 7399786c994233c29cf73be3195b3c00ec5ce332
2022-12-06 03:21:05 -08:00
Jun Wu
7e09284102 drawdag: support declaring commit properties using Python script
Summary:
Previously there is no way to set user or complex (including spaces) commit
messages using drawdag. This diff introduces a way to do that for maximum
flexibility.

This is intended to be used to create repo state for documentation rendering.
Note the `{sl}` template configs do not exist in test environment yet so we
emulate a minimal version of the template in test.

Reviewed By: zzl0

Differential Revision: D41674152

fbshipit-source-id: 2bb1212da06ddd2fd93f780d6f7b291f873fa922
2022-12-05 14:23:58 -08:00
Michael Bolin
9360b18ef1 surface error in sl pr if no default branch exists (#263)
Summary:
Print an appropriate error message if no default branch exists when running `sl pr`.

Previously the user would see:

```
commit has no parent: currently unsupported
```

Due to:

32e50cf5e0/eden/scm/edenscm/ext/github/submit.py (L57)

Now we provide a link to help the user create an initial commit.

Pull Request resolved: https://github.com/facebook/sapling/pull/263

Test Plan:
Ran on a dev build of `sl` using https://github.com/bolinfest/uninitialized
and saw the expected error:

```
$ sl pr
abort: failed to fetch repo id: This repository has no default branch. This is likely because it is empty.

Consider using https://github.com/bolinfest/uninitialized/new/main to initialize your
repository.
```

Imported from OSS

Reviewed By: quark-zju

Differential Revision: D41704188

Pulled By: bolinfest

fbshipit-source-id: aafe10da5af6dd3e5ca98d6ac1a6ba3fc0c6208f
2022-12-02 23:20:19 -08:00
Zhaolong Zhu
e59dc9cde3 doc: graft uses current date by default
Summary:
fixed the outdated doc about graft, we have changed the default behavior in [this commit](d5c12360a4)

https://github.com/facebook/sapling/issues/299

Reviewed By: quark-zju

Differential Revision: D41700926

fbshipit-source-id: e80fc279d03a31aee8a0b138c85c38b3e606a6b2
2022-12-02 19:00:12 -08:00
Jun Wu
21aced5191 smartlog: use hgtime for "now"
Summary: This makes "now" overrides effective for the `simpledate` template function.

Reviewed By: zzl0

Differential Revision: D41674153

fbshipit-source-id: 9d19409e93f1953effe9313fc087ff322df3d906
2022-12-02 13:31:42 -08:00
generatedunixname89002005307016
6eb016ad0f Add annotations to eden/scm/edenscm/ext/phrevset.py
Reviewed By: yancouto

Differential Revision: D41683923

fbshipit-source-id: ff2aa0e69feba150ffa655ccbeb15181045b7ec4
2022-12-02 06:49:34 -08:00
generatedunixname89002005307016
8a7a27e93e Add annotations to eden/scm/edenscm/lsprofcalltree.py
Reviewed By: yancouto

Differential Revision: D41650496

fbshipit-source-id: 591e982da3b2dc712aaf7f22477e0301a58f8f09
2022-12-02 06:46:37 -08:00
Zhaolong Zhu
39e8a7f36e github: remove 'node' parameter since ctx has that info
Summary:
* remove the redundant 'node' parameter from 'get_pull_request_for_node' function since 'ctx' already has that information
* rename 'get_pull_request_for_node' to 'get_pull_request_for_context'

Reviewed By: quark-zju

Differential Revision: D41560639

fbshipit-source-id: e776470d7815b8d2fd5c4a24825c6004520cb5cb
2022-12-01 16:56:52 -08:00
Taylor Bolas
b9d0b2fadc Add emacs style navigation keybindings to crecord
Summary:
This diff introduces emacs style bindings for navigating the crecord interface for people who are used to using magit.
C-n: Move down
C-p: Move up
C-v: Move to the next item of the current item type you have selected
M-v: Move to the previous item of the current item type you have selected
tab: Fold / Unfold item

curses.raw() is used so that C-v does not need to be pressed twice for it to work.

Reviewed By: quark-zju

Differential Revision: D41539621

fbshipit-source-id: 873c605c793d8ceba4d3f630aaca617506a19e43
2022-12-01 12:41:11 -08:00
Michael Bolin
414060b367 branch name order and PR order should match
Summary:
Instead of reversing the partitions inside `create_pull_requests()`,
iterate them in reverse order when building up
`pull_requests_to_create` (so branch names are assigned from the
bottom of the stack to the top), and then
`create_pull_requests()` will receive them in the same order.

Fixes https://github.com/facebook/sapling/issues/231

Reviewed By: quark-zju

Differential Revision: D41643866

fbshipit-source-id: f597955e7d6d9eb621bc4e201fbfc020d0a4d0df
2022-12-01 08:30:43 -08:00
Shish
6b8852552b have pr link link the current rev by default (#280)
Summary:
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/280).
* __->__ https://github.com/facebook/sapling/issues/280

[github] have `pr link` link the current rev by default

 The docs seem to imply that `--rev` is optional, but right now if you don't specify a rev, you get a crash with unexpected `None`

Pull Request resolved: https://github.com/facebook/sapling/pull/280

Test Plan:
Before:
```
$ sl pr link 148
...
  File "/Users/shish2k/sapling/eden/scm/edenscm/util.py", line 1285, in check
    return func(*args, **kwargs)
  File "/Users/shish2k/sapling/eden/scm/edenscm/ext/github/__init__.py", line 78, in link_cmd
    return link.link(ui, repo, *args, **opts)
  File "/Users/shish2k/sapling/eden/scm/edenscm/ext/github/link.py", line 31, in link
    pr_store.map_commit_to_pull_request(ctx.node(), pull_request)
  File "/Users/shish2k/sapling/eden/scm/edenscm/ext/github/pullrequeststore.py", line 41, in map_commit_to_pull_request
    self._write_mappings(mappings)
  File "/Users/shish2k/sapling/eden/scm/edenscm/ext/github/pullrequeststore.py", line 64, in _write_mappings
    commits[hex(node)] = entry
TypeError: descriptor 'hex' for 'bytes' objects doesn't apply to a 'NoneType' object
```

After:
```
$ sl pr link 148

$ sl
  @  5a1bc01b8  Yesterday at 17:30  shish  #148
╭─╯  Chomecast support
...
```

Reviewed By: zzl0

Differential Revision: D41548035

Pulled By: shish

fbshipit-source-id: fde4f715d4de8701e545f6145df11b604afb2dd9
2022-12-01 08:27:04 -08:00
generatedunixname89002005307016
6c9292e10b Add annotations to eden/scm/edenscm/commands/uncommit.py
Reviewed By: yancouto

Differential Revision: D41541732

fbshipit-source-id: db40d84e5e12ddb1979d4f91e90005bf1f2bc800
2022-12-01 03:44:48 -08:00
generatedunixname89002005307016
620365cc53 Lint failure adding annotations to eden/scm/edenscm/changegroup.py
Reviewed By: yancouto

Differential Revision: D41548989

fbshipit-source-id: 5f587fad10ab87267e0033f6b9df4f3c09ac2a28
2022-12-01 03:42:59 -08:00
generatedunixname89002005307016
27406c0346 Add annotations to eden/scm/edenscm/ext/sigtrace.py
Reviewed By: yancouto

Differential Revision: D41613132

fbshipit-source-id: 9ffac86abda2d13d5882eade42034532cca2499b
2022-12-01 03:40:38 -08:00
generatedunixname89002005307016
94ea8ba630 Add annotations to eden/scm/edenscm/ext/arcdiff.py
Reviewed By: yancouto

Differential Revision: D41578631

fbshipit-source-id: 0f0729d5a4ffb286c7a0a032d4d1f3d52d5d4a78
2022-12-01 03:38:07 -08:00
Zhaolong Zhu
87a9d7edb9 pr_status: skip non-github repos
Summary: Currently, the GitHub PR status prefetch logic causes exception on non-github repos, this diff skips the logic for non-github repos.

Reviewed By: bolinfest

Differential Revision: D41573751

fbshipit-source-id: 2aa34557219dd027aedffd124aa4b6c6d8f54863
2022-11-30 20:36:12 -08:00
Zhaolong Zhu
830bb323c0 sl: refactor check_github_repo to not abort
Summary:
This diff was to fix the smartlog fails with below error on non-github repos, and the original bug was fixed by Jun in D41446273 (b242a1cafd). So I changed the title to refactor `check_github_repo`, and added a function to return a Rust `Result` like type instead of aborting, since it easy to misuse the original function and cause unexpected abort.

```
$ sl sl  # this was caused by `github_repo` template keyword
abort: Either gitlab.com is not a GitHub Enterprise hostname or you are not logged in.
Authenticate using the GitHub CLI: `gh auth login --git-protocol https --hostname gitlab.com`
```

Related issue: https://github.com/facebook/sapling/issues/229

Reviewed By: bolinfest

Differential Revision: D41446532

fbshipit-source-id: 80f35670aee5ea29f21b5762ad7223b968f768f9
2022-11-30 20:36:12 -08:00
Zhaolong Zhu
d5e1b0d3c1 util: adding a Rust like Result type for Python
Summary: Added Rust like Result type to Python.

Reviewed By: bolinfest

Differential Revision: D41627421

fbshipit-source-id: a3f6ab34a2ecde9d7527417e2020d0fa6568e764
2022-11-30 20:36:12 -08:00
Saul Gutierrez
b3312b4492 fix path traversal issue vulnerability on Windows
Summary: Cloning repos that contained backslashes (e.g. `..\test.txt`) in the names of the files would files to be created outside of the repo. This diff adds some sanitation to prevent this.

Reviewed By: quark-zju

Differential Revision: D41508860

fbshipit-source-id: 57dbbdba9be273c077be96e823c6856c42ab592a
2022-11-30 20:07:44 -08:00
Evan Krause
8132ff4d08 Add --platform CLI arg to sl web
Reviewed By: bolinfest

Differential Revision: D41568549

fbshipit-source-id: 23e94a639502241107be5c3d6adad152c0f4ec2f
2022-11-30 11:41:18 -08:00
Jun Wu
c4cb329900 fsmonitor: switch from ctypes to bindings for getcanonicalpath
Summary:
The `getcanonicalpath` is a "stronger" version of `os.path.realpath` that it
normalizes cases. See D13886207 (5eced4c533) and D4315444 (in watchman).

Since `bindings.fs.canonicalize` does case normalization it seems we can
switch.

The direct motivation is that `getcanonicalpath`'s macOS code path has issues
running with cpython ARM. It segfaults or produces errno 14 (Bad address)
causing fsmonitor to fallback to not using watchman silently.

I added a config option in case we do want the old code path back. If the
new code path runs fine we should delete the old code paths.

Resolves #279 and #184.

Reviewed By: DurhamG

Differential Revision: D41571813

fbshipit-source-id: 0fddd605b7a1998626c377c4d42b3ff8989f8d5b
2022-11-29 16:29:00 -08:00
Durham Goode
4f25713fee pr: fix crash during link with no --rev
Summary:
`sl pr link` crashes if --rev is not provided. This fixes it to default
to the current commit.

Originally reported here: https://github.com/facebook/sapling/issues/281

Reviewed By: zzl0

Differential Revision: D41588985

fbshipit-source-id: 0066f5ca726f308f96e794100e169e5b6add0cca
2022-11-29 13:39:07 -08:00
Muir Manders
39fb137030 util: remove usage of "imp"
Summary:
"imp" is deprecated and will be removed in 3.12.

I don't think this frozen check is relevant anymore, and there doesn't seem to be an analog in importlib, so just kill it. Nowadays the sl entrypoint is Rust, so I don't think we can be in a frozen Python executable.

Reviewed By: quark-zju

Differential Revision: D41394322

fbshipit-source-id: eaeacad44d4e0fd1de08b26db7fdc431244009ed
2022-11-28 17:31:33 -08:00
Muir Manders
659ef6d031 extensions: migrate from "imp" to "importlib"
Summary:
"imp" is deprecated and will be removed in 3.12. Use importlib instead to load modules from files. I referenced examples in https://docs.python.org/3/library/importlib.html#importing-a-source-file-directly.

The importlib approach does not like files without a Python extension, so I had to update some mononoke integration tests to use a ".py" file extension for a temp file containing a Sapling extension.

Fixes #151

Reviewed By: markbt

Differential Revision: D41394324

fbshipit-source-id: 67439536f56e807a6215efda0be65ecbdfd1737f
2022-11-28 17:31:33 -08:00
Jun Wu
e54da0c3fa phabricator: fix compatibility
Summary:
Fix various issues so `phabsend` and `phabread` work.
- Tags are gone. Do not use tags to track what commit is sent to what diff.
- Repoview (unfiltered) is gone.
- Use mutation to track commit rewrites.
- `diffui` takes `ctx` not `node`.
- Amend to include the Differential Revision URL unconditionally.
- Smartsets require `repo`.
- `memoryview` no longer works for `str`.
- Some obvious HTTP client fixes. The code seems unused elsewhere. I don't know if the fixes are complete though, since I tested using curlcmd.

Reviewed By: zzl0

Differential Revision: D41514972

fbshipit-source-id: 289701ae5c89080ed694f77d0143841a31ebe5c7
2022-11-28 16:23:10 -08:00
Jun Wu
a6301adbac phabricator: revive extension
Summary:
Revive the extension deleted by D15327228 (ed026e04d8).
Follow-up diffs will fix compatibility.

Reviewed By: zzl0

Differential Revision: D41514973

fbshipit-source-id: a8c7ddd7ff1e8f16a2b2ed51c409f45e1ec16cec
2022-11-28 16:23:10 -08:00
Shish Girling
cc4e1243b8 add support for fetching github pull request signals
Summary: As well as seeing if my pull request has been reviewed or not, I also want to know if it has passed automated tests or not

Reviewed By: zzl0

Differential Revision: D41438240

fbshipit-source-id: 68bbf999ec84bf5d244d16fbcf0e7926509d0825
2022-11-28 02:08:19 -08:00
Liubov Dmitrieva
798d7cee43 change the way we split heads for pull
Summary: change the way we split heads for pull

Reviewed By: mitrandir77

Differential Revision: D41531394

fbshipit-source-id: a59acfbd78d0f7ffa0a4955d4c66a91961e3d2b7
2022-11-25 09:36:11 -08:00
Liubov Dmitrieva
b349df3818 add json format option for hg cloud check command
Summary: add json format option for `hg cloud check` command

Reviewed By: mitrandir77

Differential Revision: D41519613

fbshipit-source-id: 367cbb324c3144f1ca55a4ce55cb346e8f01ba37
2022-11-25 08:20:33 -08:00