mirror of
https://github.com/facebook/sapling.git
synced 2024-10-04 13:57:13 +03:00
Add type for conflict hashes fetched from resolve :dumpjson
Summary: D56850550 added `"hashes": {"local": "abc", "other": "def"}` hashes to the json output of `sl resolve --tool internal:dumpjson`. This is useful for ISL to show what's being rebased during a conflict. If you're not yet using a version of sl that has this feature, this would be missing from the JSON, so we make these values nullable. Even if you do have this version of sl, some generated conflicts will not have these values either. Reviewed By: zzl0 Differential Revision: D56861539 fbshipit-source-id: e35d48a80046fe6d9c7ce7ee675e8dc00ba308a8
This commit is contained in:
parent
1972cd1f1e
commit
3df6a77dd5
@ -41,6 +41,10 @@ export type ResolveCommandConflictOutput = [
|
||||
path: string;
|
||||
}>;
|
||||
pathconflicts: Array<never>;
|
||||
hashes?: {
|
||||
local?: string;
|
||||
other?: string;
|
||||
};
|
||||
},
|
||||
];
|
||||
|
||||
@ -280,6 +284,7 @@ export function computeNewConflicts(
|
||||
files: [],
|
||||
fetchStartTimestamp,
|
||||
fetchCompletedTimestamp: Date.now(),
|
||||
hashes: newConflictData.hashes,
|
||||
};
|
||||
|
||||
const previousFiles = previousConflicts?.files ?? [];
|
||||
|
@ -424,6 +424,7 @@ type ConflictInfo = {
|
||||
files: Array<ChangedFile & {conflictType: ConflictType}>;
|
||||
fetchStartTimestamp: number;
|
||||
fetchCompletedTimestamp: number;
|
||||
hashes?: {local?: string; other?: string};
|
||||
};
|
||||
export type MergeConflicts =
|
||||
| ({state: 'loading'} & AllUndefined<ConflictInfo>)
|
||||
|
Loading…
Reference in New Issue
Block a user