Commit Graph

8 Commits

Author SHA1 Message Date
Mateusz Moneta
4cfb665650 Update markers during hg pullbackup
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
2018-04-13 21:51:23 -07:00
Mark Thomas
13c825d200 arcdiff: handle -r option with --since-last-arc-diff
Summary:
If the user specifies a revision using `-r`, along with
`--since-last-arc-diff`, then show the differences for that revision, rather
than the working copy parent.

Differential Revision: D7068359

fbshipit-source-id: feffadeb45eed4e1d8bb9d8fc7040932ada31736
2018-04-13 21:51:14 -07:00
Ryan McElroy
297c6ce041 phabstatus: remove O(n^2) double loop
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
2018-04-13 21:51:07 -07:00
Ryan McElroy
389ac72c31 phabstatus: mock full graphql response
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
2018-04-13 21:51:07 -07:00
Ryan McElroy
83dd5f6841 phabstatus: no longer mock unused fields
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
2018-04-13 21:51:07 -07:00
Ryan McElroy
3fe4fbbda9 phabstatus: expand test to cover more code
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
2018-04-13 21:51:07 -07:00
Jun Wu
1cde63d99c codemod: drop hacks changing PYTHONPATH in tests
Summary:
Now they are unnecessary since `run-tests.py` will set up `PYTONPATH`
correctly.

Differential Revision: D6865042

fbshipit-source-id: ca95314f725968e14349a9d916434aa832c596f9
2018-04-13 21:51:00 -07:00
Phil Cohen
82285d3577 phabricator: move to extlib
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
2018-01-10 08:39:19 -08:00