Commit Graph

8 Commits

Author SHA1 Message Date
Durham Goode
44dc946468 backout: add test for maintain move info across a backout
Summary:
There's a bug here, so let's add a test exposing it. A future diff will
fix the bug and update the test.

Reviewed By: jordanwebster

Differential Revision: D37771384

fbshipit-source-id: f482cf6d07ba4f16d833b9337a61b9dd7a85d7ac
2022-07-13 14:17:40 -07:00
Durham Goode
248f7ec605 testlib: add ScmFile abstraction
Summary:
I was writing some tests and needed to access a file's history. Let's
add a clean way to do that.

Reviewed By: sggutier

Differential Revision: D37771385

fbshipit-source-id: 199da4ecb139fdd5636c31136bc4e394b7dde2c8
2022-07-13 14:17:40 -07:00
Saul Gutierrez
96fb2c0798 testlib: avoid using hg log in Commit.parents
Summary: This diff replaces the direct use of `hg log` with calling `Repo.commits`. It also adds a `__hash__` method to the `Commits` class.

Reviewed By: DurhamG

Differential Revision: D37172189

fbshipit-source-id: b5181b3dd0bd0267f7c905aecbc6f499d10918cb
2022-06-16 02:34:54 -07:00
Saul Gutierrez
8750906990 testlib: make a more efficient use of revsets in Commit.ancestor
Summary: This makes the `Commit.ancestor` method use the `ancestors` revset instead of using the `parent` ancestor multiple times, making it more efficient.

Reviewed By: jordanwebster

Differential Revision: D37135010

fbshipit-source-id: f3cb3628fc24f8da473d6059d5aed837316bc7ad
2022-06-16 02:34:54 -07:00
Durham Goode
6094d6ddd1 testlib: add basic status support
Summary: Adds functions for getting the working copy status and commit status.

Differential Revision: D35685522

fbshipit-source-id: a4527b7e3254e0c755b0c2d62c1d2f9c6596ea88
2022-04-21 19:06:14 -07:00
Durham Goode
d3df270dff testlib: add basic bookmark read functionality
Summary: Adds simple functions for reading the bookmark state from a repository.

Differential Revision: D35683767

fbshipit-source-id: c95ea25002e9ed95c35cb4ee8b57898198ae8d3f
2022-04-21 19:06:14 -07:00
Durham Goode
075ee791f5 testlib: add basic commit functionality
Summary:
Adds the ability for the working copy to make a commit, and a basic
Commit abstraction for accesing commit data.

Differential Revision: D35683765

fbshipit-source-id: f2ae6ebe8f03c98f40869a537fe2f191d4394b55
2022-04-21 19:06:14 -07:00
Durham Goode
98472dbb33 testlib: add basic working copy manipulation functions
Summary: Adds basic helpers for adding and removing files from the working copy.

Differential Revision: D35683768

fbshipit-source-id: 3fd4746222f53729eefd19a5d9833ae7ee4773d4
2022-04-21 19:06:14 -07:00