1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-20 00:49:11 +02:00
No description
Find a file
epriestley 0bf5c3603c Refactor commit ranges and base commit handling
Summary:
See D4049, D4096.

  - Move commit range storage from Mercurial and Git APIs to the base API.
  - Move caching up to the base level.
    - Store symbolic name and resolved name separately, so we can re-resolve the correct commit from the symbolic name after dirtying caches.
  - Rename `supportsRelativeLocalCommit()` to `supportsCommitRanges()` (old name wasn't very good, and not consistent with new terminology like the `--base` flag).
  - Rename `getRelativeCommit()` and `setRelativeCommit()` to `getBaseCommit()` and `setBaseCommit()`.
  - Introduce `reloadCommitRange()` and call it from `reloadWorkingCopy()`.

I think this fixes the problem in D4049, and provides a general solution for the class of problems we're running into here, with D4096. Specifically:

  - We no longer get dirty caches, as long as you call reloadWorkingCopy() after changing the working copy (or call a method which calls it for you).
  - We no longer get order-of-parsing-things problems, because setBaseCommit() reloads the appropriate caches.
  - We no longer get nasty effects from calling `requireCleanWorkingCopy()` too early.

Test Plan: This is pretty far-reaching and hard to test. Unit tests; ran various arc commands. :/

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4097
2012-12-17 12:54:08 -08:00
bin Make bin/arc less linux-centered, more UNIX-agnostic 2012-07-03 06:34:49 -07:00
externals Update PEP8 2012-12-14 17:50:18 -08:00
resources Delete license headers from files 2012-11-05 11:16:24 -08:00
scripts Parse "--help" correctly in arc 2012-11-22 08:36:28 -08:00
src Refactor commit ranges and base commit handling 2012-12-17 12:54:08 -08:00
.arcconfig Delete license headers from files 2012-11-05 11:16:24 -08:00
.divinerconfig Make the "this is technical documentation" message of "Arcanist Overview" more clear 2012-08-10 11:37:30 -07:00
.editorconfig Specify config for text editors 2012-11-03 00:13:53 -07:00
.gitignore Allow arcanist to search for libphutil in externals/includes/ 2012-08-10 14:58:19 -07:00
LICENSE Delete license headers from files 2012-11-05 11:16:24 -08:00
NOTICE Delete license headers from files 2012-11-05 11:16:24 -08:00
README Delete license headers from files 2012-11-05 11:16:24 -08:00

WHAT IS ARCANIST?

Arcanist is the command-line tool for Phabricator. It allows you to interact
with Phabricator installs to send code for review, download patches, transfer
files, view status, make API calls, and various other things. You can find
a complete user guide here:

  http://www.phabricator.com/docs/phabricator/article/Arcanist_User_Guide.html

For more information about Phabricator, see:

  http://phabricator.org/

LICENSE

Arcanist is released under the Apache 2.0 license except as otherwise noted.