Summary:
Move top-level Python packages `mercurial`, `hgext` and `hgdemandimport` to
a new top-level package `edenscm`. This allows the Python packages provided by
the upstream Mercurial to be installed side-by-side.
To maintain compatibility, `edenscm/` gets added to `sys.path` in
`mercurial/__init__.py`.
Reviewed By: phillco, ikostia
Differential Revision: D13853115
fbshipit-source-id: b296b0673dc54c61ef6a591ebc687057ff53b22e
Summary:
Sandcastle jobs are using mercurial in conjunction with Phabricator CATs as a part of Phabricato security effort.
Here is an example of a mercurial command that failed because of this:
https://our.intern.facebook.com/intern/sandcastle/job/1498468091/
This adds logic to support parsing CATs from .arcrc for mercurial commands
Reviewed By: quark-zju
Differential Revision: D13468442
fbshipit-source-id: 033806d0e0779f9e7ade054d21e4cdbbdef08ed0
Summary:
For some arcrc formats, hg commands prefer a deprecated blob in the .arcrc file which does not contain an oauth token, and only contains a phabricator cert (which is deprecated in favor of oauth)
This updates the logic to look for the phabricator.intern.facebook.com blob in the .arcrc to get an oauth token.
Reviewed By: mitrandir77
Differential Revision: D9351851
fbshipit-source-id: 11efe30b077480caa7b147c45a8d0eb78189277e
Summary:
It's super-useful to know the difference between "Accepted (You need to go and click the land button)" and "Accepted (We're just waiting for the land system to do its thing, no work for you right now)"
Alternative approach in D8074898
Reviewed By: mitrandir77
Differential Revision: D8074794
fbshipit-source-id: fdfda64e3a542518b8609e3a415d8cb3156373cf
Summary:
Before this change `hg pullbackup` did not set correct markers on commits.
This change make possible to see what changes already landed even when we are restoring repository from backup.
Before the change `fbclone` + `hg pullbackup` of repo with `C1` commit landed would result in:
```
o o C2
| |
o o C1
| /
|
o
```
after:
```
o o C2
| |
o x C1
| /
|
o
```
Reviewed By: StanislavGlebik
Differential Revision: D7032572
fbshipit-source-id: ffee3c7cc23c24a3df9a89c999c9dd2de226dbff
Summary:
This was unneeded. We can just populate the dict directly.
Note that now we catch any errors in the expected data format gracefully
and no longer stack trace with bad inputs.
Reviewed By: DurhamG
Differential Revision: D6826455
fbshipit-source-id: adc9cc1fc4895f3c67b112d914f566601336ce3b
Summary:
This would cause us to return data outside of our contract, which
crashes in a worse, less useful way that if we catch things ourselves and
print useful debug information.
Reviewed By: quark-zju
Differential Revision: D6826454
fbshipit-source-id: 9cdb2987f762c98c6167ffcea03545bc46eb2119
Summary: These cause tracebacks; grepped out for readability.
Reviewed By: DurhamG
Differential Revision: D6826450
fbshipit-source-id: 4ea27f0f30cd9ab97710a234f5a451912ccc55c1
Summary:
This will allow us to expose bugs in the graphql client code and
write tests to prevent future regressions. Note that this exposes a KeyError
bug when the response is malformed.
Having finally, we have arrived at full graphql responses both from the real
system and from mocking. We can now write tests more confidently.
Reviewed By: DurhamG
Differential Revision: D6826452
fbshipit-source-id: 4fd246fbafb353ce0138289262cbdfd0e9e35229
Summary:
I do not know why all of these fields that we never checked were
mocked in the fist place.
Reviewed By: DurhamG
Differential Revision: D6826457
fbshipit-source-id: 78d336940b6146b61684c7789172298497c0b57f
Summary:
Previously, we mocked returns from the code that processed the
graphql data, but that code has some bugs that were therefore not testable.
Here we move the tests to return mock graphql data, so we can also test the
processing functions. In future commits, we will fix some of the possible
issues.
Reviewed By: DurhamG
Differential Revision: D6826453
fbshipit-source-id: 5a390723e48ccf2477295602dd85bd065c072bd3
Summary:
Now they are unnecessary since `run-tests.py` will set up `PYTONPATH`
correctly.
Differential Revision: D6865042
fbshipit-source-id: ca95314f725968e14349a9d916434aa832c596f9
Summary: When running hg ssl, if the .arcrc file is not proper JSON
(e.g., has a trailing comma), json.loads raises an exception that
was not being caught and lead to a stacktrace.
Test Plan: Locally run hg ssl with a bag .arcrc and the stack trace was gone.
Also write a test in test-fb-hgext-phabstatus.t
Reviewers: simonfar
Subscribers: luizmramos
Tasks: T24993088
Tags:
Summary: Update import statements and code to match core linters.
Test Plan:
`run-tests.py -j8`
Source these versions of phabdiff.py, arcdiff.py, and phabstatus.py in my hgrc. Run hg st, diff, ssl and observe no crashes.
Reviewers: durham, rmcelroy, phillco, #mercurial
Reviewed By: rmcelroy
Subscribers: rmcelroy, quark, awestern
Differential Revision: https://phabricator.intern.facebook.com/D6680961
Signature: 6680961:1515578477:ea5f1591e390f6ca8a94f652daeb1db9de819fea