From 06df61a1dcba0fa0a72bc3fb81f3e770bf096884 Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Mon, 30 Sep 2024 15:37:31 +0200 Subject: [PATCH] fix(fossil): add ADDED_BY_MERGE to status resolves #5695 --- src/segments/fossil.go | 4 ++-- src/segments/fossil_test.go | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/segments/fossil.go b/src/segments/fossil.go index 9fdf0aa15669..4f6d4ad0b7da 100644 --- a/src/segments/fossil.go +++ b/src/segments/fossil.go @@ -11,9 +11,9 @@ func (s *FossilStatus) add(code string) { switch code { case "CONFLICT": s.Conflicted++ - case "DELETED": + case "DELETED", "MISSING": s.Deleted++ - case "ADDED", "ADDED_BY_INTEGRATE": + case "ADDED", "ADDED_BY_INTEGRATE", "ADDED_BY_MERGE": s.Added++ case "EDITED", "UPDATED", "UPDATED_BY_INTEGRATE", "UPDATED_BY_MERGE", "CHANGED": s.Modified++ diff --git a/src/segments/fossil_test.go b/src/segments/fossil_test.go index 0f5c8b208181..d2b609928118 100644 --- a/src/segments/fossil_test.go +++ b/src/segments/fossil_test.go @@ -45,8 +45,10 @@ func TestFossilStatus(t *testing.T) { comment: In the /setup_skin page, add a mention of/link to /skins, per request in the forum. (user: stephan) CONFLICT test.tst DELETED test.tst + MISSING test.tst ADDED test.tst ADDED_BY_INTEGRATE test.tst + ADDED_BY_MERGE test.tst EDITED auto.def UPDATED test.tst UPDATED_BY_INTEGRATE test.tst @@ -55,7 +57,7 @@ func TestFossilStatus(t *testing.T) { RENAMED test.tst `, ExpectedBranch: "trunk", - ExpectedStatus: "+2 ~5 -1 >1 !1", + ExpectedStatus: "+3 ~5 -2 >1 !1", }, } for _, tc := range cases {