private $branch;
private $localCommitInfo;
- private $includeDirectoryStateInDiffs;
private $rawDiffCache = array();
private $supportsRebase;
public function getRawDiffText($path) {
$options = $this->getDiffOptions();
- // NOTE: In Mercurial, "--rev x" means "diff between x and the working
- // copy state", while "--rev x..." means "diff between x and the working
- // copy commit" (i.e., from 'x' to '.'). The latter excludes any dirty
- // changes in the working copy.
-
$range = $this->getBaseCommit();
- if (!$this->includeDirectoryStateInDiffs) {
- $range .= '...';
- }
$raw_diff_cache_key = $options.' '.$range.' '.$path;
if (idx($this->rawDiffCache, $raw_diff_cache_key)) {
$this->reloadWorkingCopy();
}
- public function setIncludeDirectoryStateInDiffs($include) {
- $this->includeDirectoryStateInDiffs = $include;
- return $this;
- }
-
public function getCommitSummary($commit) {
if ($commit == 'null') {
return '(The Empty Void)';
$this->requireCleanWorkingCopy();
} catch (ArcanistUncommittedChangesException $ex) {
if ($repository_api instanceof ArcanistMercurialAPI) {
-
- // Some Mercurial users prefer to use it like SVN, where they don't
- // commit changes before sending them for review. This would be a
- // pretty bad workflow in Git, but Mercurial users are significantly
- // more expert at change management.
-
$use_dirty_changes = false;
if ($this->getArgument('uncommitted')) {
// OK.
}
}
- $repository_api->setIncludeDirectoryStateInDiffs(true);
$this->haveUncommittedChanges = true;
} else {
throw $ex;