UbisamBase 플랫폼 위에서 도는 플러그인. 지금까지 만든 것을 그대로 담는다. - 폴더 비교 / 파일 비교(부분 수용·워드랩·찾기) / 3-Way 병합 / Git 조작 - 비교 엔진: histogram 정렬 · 이동 블록 감지 · 무시 규칙 · 13개 언어 토크나이저 - doc/ 에 작업 지시서와 진행 기록 빌드 산출물(bin/obj)은 추적하지 않는다 - 플랫폼 런타임이 빌드 때마다 D:\UbisamPlatform\bin 에서 복사되어 들어오므로 저장소에 담을 이유가 없다. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
63 lines
1.9 KiB
C#
63 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace MergeHub.Models
|
|
{
|
|
/// <summary>
|
|
/// 한 행 안에서 그려질 선 하나.
|
|
/// 행의 위쪽 경계 FromLane 에서 들어와 아래쪽 경계 ToLane 으로 나간다.
|
|
/// FromLane == ToLane 이면 수직선(그 레인을 그냥 통과), 다르면 합류/분기 사선이다.
|
|
/// </summary>
|
|
public sealed class GraphEdge
|
|
{
|
|
public GraphEdge(int fromLane, int toLane, int colorIndex)
|
|
{
|
|
FromLane = fromLane;
|
|
ToLane = toLane;
|
|
ColorIndex = colorIndex;
|
|
}
|
|
|
|
public int FromLane { get; }
|
|
public int ToLane { get; }
|
|
public int ColorIndex { get; }
|
|
}
|
|
|
|
/// <summary>커밋 한 개가 차지하는 그래프 행.</summary>
|
|
public sealed class GraphRow
|
|
{
|
|
public GraphRow(int lane, int colorIndex, IReadOnlyList<GraphEdge> edges, bool isMerge)
|
|
{
|
|
Lane = lane;
|
|
ColorIndex = colorIndex;
|
|
Edges = edges;
|
|
IsMerge = isMerge;
|
|
}
|
|
|
|
/// <summary>점(커밋)이 찍히는 레인.</summary>
|
|
public int Lane { get; }
|
|
|
|
public int ColorIndex { get; }
|
|
|
|
public IReadOnlyList<GraphEdge> Edges { get; }
|
|
|
|
/// <summary>부모가 둘 이상 - 속을 비운 점으로 그린다.</summary>
|
|
public bool IsMerge { get; }
|
|
|
|
/// <summary>목록 전체에서 쓰인 최대 레인 수. 열 너비를 맞추는 데 쓴다.</summary>
|
|
public int LaneCount { get; set; } = 1;
|
|
}
|
|
|
|
/// <summary>커밋 목록에 바인딩되는 항목 - 커밋 정보 + 그 커밋이 그려질 그래프 행.</summary>
|
|
public sealed class CommitNode
|
|
{
|
|
public CommitNode(CommitInfo commit, GraphRow graph)
|
|
{
|
|
Commit = commit;
|
|
Graph = graph;
|
|
}
|
|
|
|
public CommitInfo Commit { get; }
|
|
public GraphRow Graph { get; }
|
|
}
|
|
}
|