HomePhabricator

[Wilds] Rewrite WorkingCopyIdentity in a more modern/modular way

Description

[Wilds] Rewrite WorkingCopyIdentity in a more modern/modular way

Summary:
Ref T13098. Currently, WorkingCopyIdentity has rules for finding .git/.svn/.hg directories and .arcconfig files. It also has a ton of logic for reading and writing config files.

Generally:

  • Rename WorkingCopyIdentity to WorkingCopy.
  • Make it an abstract base with Git, Mercurial and Subversion subclasses, using the standard module/extension pattern.
  • Throw out almost all of the config file logic. This logic is going to move into Config classes. It is not unique to working copies.
    • Working copies retain the actual bit of this they need: knowing where stuff should go on disk.

This doesn't run yet, but sure looks a lot cleaner!

Test Plan: Doesn't run yet, since Config isn't working yet.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13098

Differential Revision: https://secure.phabricator.com/D19689