Compare commits

...

17 commits

Author SHA1 Message Date
leo
36ecbcc4e0
enhance: supports self-host git server (#733)
Some checks are pending
Continuous Integration / Build (push) Waiting to run
Continuous Integration / Prepare version string (push) Waiting to run
Continuous Integration / Package (push) Blocked by required conditions
Localization Check / localization-check (push) Waiting to run
2024-12-10 21:38:06 +08:00
leo
55ad194e0e
code_style: remove unused code 2024-12-10 21:09:26 +08:00
github-actions[bot]
9b88db290d doc: Update translation status and missing keys 2024-12-10 12:57:28 +00:00
leo
93d9a04460
enhance: show reverting commit in banner while reverting is in-progress 2024-12-10 20:57:10 +08:00
leo
2dd9cab695
enhance: try to use friendly name instead of commit hash 2024-12-10 20:23:46 +08:00
leo
3b5d87391d
ux: use Views.NameHighlightedTextBlock instead of plan text for FileCM.ResolveUsing 2024-12-10 16:56:05 +08:00
github-actions[bot]
767de75512 doc: Update translation status and missing keys 2024-12-10 08:44:55 +00:00
leo
feb7e96b2c
enhance: show friendly name instead of --theirs or --mine while resolving conflicts 2024-12-10 16:44:37 +08:00
leo
c8cdda3477
ux: color for in processing target 2024-12-10 16:17:12 +08:00
github-actions[bot]
3cecb3f888 doc: Update translation status and missing keys 2024-12-10 07:38:27 +00:00
leo
2504a52398
fix: wrong display when merge tag
* remove `Text.Merge.Source`  translations from `de_DE`/`es_ES`/`fr_FR`/`it_IT`/`pt_BR`/`ru_RU` because its content has been changed
2024-12-10 15:38:06 +08:00
github-actions[bot]
4dd3b7f412 doc: Update translation status and missing keys 2024-12-10 07:18:11 +00:00
leo
ef40e4b738
enhance: show source branch/tag/commit in banner while merging request in progress 2024-12-10 15:17:54 +08:00
leo
e1df5c52f1
localization: update Text.InProgress.CherryPick.Head 2024-12-10 14:13:44 +08:00
leo
33ef9a612d
fix: avoid crash if fontfamily contains consecutive whitespace (#799) 2024-12-10 12:06:36 +08:00
github-actions[bot]
0a486a90d9 doc: Update translation status and missing keys 2024-12-10 03:17:52 +00:00
leo
aee3abfffb
enhance: redesign in-progress banner (#790)
* show head for cherry-pick
* show stopped at for rebase
* supports `--skip` for cherry-pick and rebase
2024-12-10 11:17:30 +08:00
21 changed files with 426 additions and 117 deletions

View file

@ -47,7 +47,7 @@
## Translation Status
[![en_US](https://img.shields.io/badge/en__US-100%25-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-98.60%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-98.88%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-96.08%25-yellow)](TRANSLATION.md) [![it__IT](https://img.shields.io/badge/it__IT-96.64%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-97.90%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-99.02%25-yellow)](TRANSLATION.md) [![zh__CN](https://img.shields.io/badge/zh__CN-100.00%25-brightgreen)](TRANSLATION.md) [![zh__TW](https://img.shields.io/badge/zh__TW-100.00%25-brightgreen)](TRANSLATION.md)
[![en_US](https://img.shields.io/badge/en__US-100%25-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-97.64%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-97.91%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-95.13%25-yellow)](TRANSLATION.md) [![it__IT](https://img.shields.io/badge/it__IT-95.69%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-96.94%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-98.05%25-yellow)](TRANSLATION.md) [![zh__CN](https://img.shields.io/badge/zh__CN-100.00%25-brightgreen)](TRANSLATION.md) [![zh__TW](https://img.shields.io/badge/zh__TW-100.00%25-brightgreen)](TRANSLATION.md)
## How to Use

View file

@ -1,4 +1,4 @@
### de_DE.axaml: 98.60%
### de_DE.axaml: 97.64%
<details>
@ -8,16 +8,23 @@
- Text.CommitCM.MergeMultiple
- Text.CommitDetail.Files.Search
- Text.Diff.UseBlockNavigation
- Text.FileCM.ResolveUsing
- Text.Hotkeys.Global.Clone
- Text.InProgress.CherryPick.Head
- Text.InProgress.Merge.Operating
- Text.InProgress.Rebase.StoppedAt
- Text.InProgress.Revert.Head
- Text.Merge.Source
- Text.MergeMultiple
- Text.MergeMultiple.CommitChanges
- Text.MergeMultiple.Strategy
- Text.MergeMultiple.Targets
- Text.Repository.Skip
- Text.WorkingCopy.CommitToEdit
</details>
### es_ES.axaml: 98.88%
### es_ES.axaml: 97.91%
<details>
@ -26,15 +33,22 @@
- Text.BranchCM.MergeMultiBranches
- Text.CommitCM.MergeMultiple
- Text.Diff.UseBlockNavigation
- Text.FileCM.ResolveUsing
- Text.Hotkeys.Global.Clone
- Text.InProgress.CherryPick.Head
- Text.InProgress.Merge.Operating
- Text.InProgress.Rebase.StoppedAt
- Text.InProgress.Revert.Head
- Text.Merge.Source
- Text.MergeMultiple
- Text.MergeMultiple.CommitChanges
- Text.MergeMultiple.Strategy
- Text.MergeMultiple.Targets
- Text.Repository.Skip
</details>
### fr_FR.axaml: 96.08%
### fr_FR.axaml: 95.13%
<details>
@ -48,7 +62,13 @@
- Text.CommitDetail.Files.Search
- Text.Diff.UseBlockNavigation
- Text.Fetch.Force
- Text.FileCM.ResolveUsing
- Text.Hotkeys.Global.Clone
- Text.InProgress.CherryPick.Head
- Text.InProgress.Merge.Operating
- Text.InProgress.Rebase.StoppedAt
- Text.InProgress.Revert.Head
- Text.Merge.Source
- Text.MergeMultiple
- Text.MergeMultiple.CommitChanges
- Text.MergeMultiple.Strategy
@ -65,13 +85,14 @@
- Text.Repository.HistoriesOrder
- Text.Repository.HistoriesOrder.ByDate
- Text.Repository.HistoriesOrder.Topo
- Text.Repository.Skip
- Text.ScanRepositories
- Text.SHALinkCM.NavigateTo
- Text.WorkingCopy.CommitToEdit
</details>
### it_IT.axaml: 96.64%
### it_IT.axaml: 95.69%
<details>
@ -86,6 +107,12 @@
- Text.Configure.OpenAI.Preferred.Tip
- Text.Diff.UseBlockNavigation
- Text.Fetch.Force
- Text.FileCM.ResolveUsing
- Text.InProgress.CherryPick.Head
- Text.InProgress.Merge.Operating
- Text.InProgress.Rebase.StoppedAt
- Text.InProgress.Revert.Head
- Text.Merge.Source
- Text.MergeMultiple
- Text.MergeMultiple.CommitChanges
- Text.MergeMultiple.Strategy
@ -98,13 +125,14 @@
- Text.Repository.HistoriesOrder
- Text.Repository.HistoriesOrder.ByDate
- Text.Repository.HistoriesOrder.Topo
- Text.Repository.Skip
- Text.SHALinkCM.CopySHA
- Text.SHALinkCM.NavigateTo
- Text.WorkingCopy.CommitToEdit
</details>
### pt_BR.axaml: 97.90%
### pt_BR.axaml: 96.94%
<details>
@ -116,19 +144,26 @@
- Text.CommitDetail.Info.Children
- Text.Diff.UseBlockNavigation
- Text.Fetch.Force
- Text.FileCM.ResolveUsing
- Text.Hotkeys.Global.Clone
- Text.InProgress.CherryPick.Head
- Text.InProgress.Merge.Operating
- Text.InProgress.Rebase.StoppedAt
- Text.InProgress.Revert.Head
- Text.Merge.Source
- Text.MergeMultiple
- Text.MergeMultiple.CommitChanges
- Text.MergeMultiple.Strategy
- Text.MergeMultiple.Targets
- Text.Preference.General.ShowChildren
- Text.Repository.FilterCommits
- Text.Repository.Skip
- Text.SHALinkCM.NavigateTo
- Text.WorkingCopy.CommitToEdit
</details>
### ru_RU.axaml: 99.02%
### ru_RU.axaml: 98.05%
<details>
@ -136,11 +171,18 @@
- Text.BranchCM.MergeMultiBranches
- Text.CommitCM.MergeMultiple
- Text.FileCM.ResolveUsing
- Text.Hotkeys.Global.Clone
- Text.InProgress.CherryPick.Head
- Text.InProgress.Merge.Operating
- Text.InProgress.Rebase.StoppedAt
- Text.InProgress.Revert.Head
- Text.Merge.Source
- Text.MergeMultiple
- Text.MergeMultiple.CommitChanges
- Text.MergeMultiple.Strategy
- Text.MergeMultiple.Targets
- Text.Repository.Skip
</details>

View file

@ -2,6 +2,15 @@
{
public static class Branch
{
public static string ShowCurrent(string repo)
{
var cmd = new Command();
cmd.WorkingDirectory = repo;
cmd.Context = repo;
cmd.Args = $"branch --show-current";
return cmd.ReadToEnd().StdOut.Trim();
}
public static bool Create(string repo, string name, string basedOn)
{
var cmd = new Command();

View file

@ -6,7 +6,7 @@ namespace SourceGit.Models
{
public partial class Remote
{
[GeneratedRegex(@"^https?://([-a-zA-Z0-9:%._\+~#=]+@)?[-a-zA-Z0-9:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}(:[0-9]{1,5})?\b(/[-a-zA-Z0-9()@:%_\+.~#?&=]*)*(\.git)?$")]
[GeneratedRegex(@"^https?://([-a-zA-Z0-9:%._\+~#=]+@)?[-a-zA-Z0-9:%._\+~#=]{1,256}(\.[a-zA-Z0-9()]{1,6})?(:[0-9]{1,5})?\b(/[-a-zA-Z0-9()@:%_\+.~#?&=]+)+(\.git)?$")]
private static partial Regex REG_HTTPS();
[GeneratedRegex(@"^[\w\-]+@[\w\.\-]+(\:[0-9]+)?:[\w\-/~%]+/[\w\-\.%]+(\.git)?$")]
private static partial Regex REG_SSH1();

View file

@ -389,10 +389,10 @@
<x:String x:Key="Text.Hunk.Discard" xml:space="preserve">Verwerfen</x:String>
<x:String x:Key="Text.Init" xml:space="preserve">Initialisiere Repository</x:String>
<x:String x:Key="Text.Init.Path" xml:space="preserve">Pfad:</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick wird durchgeführt. Drücke 'Abbrechen' um den originalen HEAD wiederherzustellen.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Merge request wird durchgeführt. Drücke 'Abbrechen' um den originalen HEAD wiederherzustellen.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase wird durchgeführt. Drücke 'Abbrechen' um den originalen HEAD wiederherzustellen.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert wird durchgeführt. Drücke 'Abbrechen' um den originalen HEAD wiederherzustellen.</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick wird durchgeführt.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Merge request wird durchgeführt.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase wird durchgeführt.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert wird durchgeführt.</x:String>
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Interaktiver Rebase</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Ziel Branch:</x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">Auf:</x:String>
@ -403,7 +403,6 @@
<x:String x:Key="Text.Merge" xml:space="preserve">Branch mergen</x:String>
<x:String x:Key="Text.Merge.Into" xml:space="preserve">Ziel-Branch:</x:String>
<x:String x:Key="Text.Merge.Mode" xml:space="preserve">Merge Option:</x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">Quell-Branch:</x:String>
<x:String x:Key="Text.MoveRepositoryNode" xml:space="preserve">Bewege Repository Knoten</x:String>
<x:String x:Key="Text.MoveRepositoryNode.Target" xml:space="preserve">Wähle Vorgänger-Knoten für:</x:String>
<x:String x:Key="Text.Name" xml:space="preserve">Name:</x:String>
@ -562,7 +561,6 @@
<x:String x:Key="Text.Repository.Refresh" xml:space="preserve">Aktualisiern</x:String>
<x:String x:Key="Text.Repository.Remotes" xml:space="preserve">REMOTES</x:String>
<x:String x:Key="Text.Repository.Remotes.Add" xml:space="preserve">REMOTE HINZUFÜGEN</x:String>
<x:String x:Key="Text.Repository.Resolve" xml:space="preserve">KONFLIKTE BEHEBEN</x:String>
<x:String x:Key="Text.Repository.Search" xml:space="preserve">Commit suchen</x:String>
<x:String x:Key="Text.Repository.Search.ByFile" xml:space="preserve">Dateiname</x:String>
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">Commit-Nachricht</x:String>

View file

@ -281,6 +281,7 @@
<x:String x:Key="Text.FileCM.DiscardMulti" xml:space="preserve">Discard {0} files...</x:String>
<x:String x:Key="Text.FileCM.DiscardSelectedLines" xml:space="preserve">Discard Changes in Selected Line(s)</x:String>
<x:String x:Key="Text.FileCM.OpenWithExternalMerger" xml:space="preserve">Open External Merge Tool</x:String>
<x:String x:Key="Text.FileCM.ResolveUsing" xml:space="preserve">Resolve Using ${0}$</x:String>
<x:String x:Key="Text.FileCM.SaveAsPatch" xml:space="preserve">Save as Patch...</x:String>
<x:String x:Key="Text.FileCM.Stage" xml:space="preserve">Stage</x:String>
<x:String x:Key="Text.FileCM.StageMulti" xml:space="preserve">Stage {0} files</x:String>
@ -391,10 +392,14 @@
<x:String x:Key="Text.Hunk.Discard" xml:space="preserve">Discard</x:String>
<x:String x:Key="Text.Init" xml:space="preserve">Initialize Repository</x:String>
<x:String x:Key="Text.Init.Path" xml:space="preserve">Path:</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick in progress. Press 'Abort' to restore original HEAD.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Merge request in progress. Press 'Abort' to restore original HEAD.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase in progress. Press 'Abort' to restore original HEAD.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert in progress. Press 'Abort' to restore original HEAD.</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick in progress.</x:String>
<x:String x:Key="Text.InProgress.CherryPick.Head" xml:space="preserve">Processing commit</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Merge request in progress.</x:String>
<x:String x:Key="Text.InProgress.Merge.Operating" xml:space="preserve">Operating</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase in progress.</x:String>
<x:String x:Key="Text.InProgress.Rebase.StoppedAt" xml:space="preserve">Stopped at</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert in progress.</x:String>
<x:String x:Key="Text.InProgress.Revert.Head" xml:space="preserve">Reverting commit</x:String>
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Interactive Rebase</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Target Branch:</x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">On:</x:String>
@ -405,7 +410,7 @@
<x:String x:Key="Text.Merge" xml:space="preserve">Merge Branch</x:String>
<x:String x:Key="Text.Merge.Into" xml:space="preserve">Into:</x:String>
<x:String x:Key="Text.Merge.Mode" xml:space="preserve">Merge Option:</x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">Source Branch:</x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">Source:</x:String>
<x:String x:Key="Text.MergeMultiple" xml:space="preserve">Merge (Multiple)</x:String>
<x:String x:Key="Text.MergeMultiple.CommitChanges" xml:space="preserve">Commit all changes</x:String>
<x:String x:Key="Text.MergeMultiple.Strategy" xml:space="preserve">Strategy:</x:String>
@ -568,7 +573,6 @@
<x:String x:Key="Text.Repository.Refresh" xml:space="preserve">Refresh</x:String>
<x:String x:Key="Text.Repository.Remotes" xml:space="preserve">REMOTES</x:String>
<x:String x:Key="Text.Repository.Remotes.Add" xml:space="preserve">ADD REMOTE</x:String>
<x:String x:Key="Text.Repository.Resolve" xml:space="preserve">RESOLVE</x:String>
<x:String x:Key="Text.Repository.Search" xml:space="preserve">Search Commit</x:String>
<x:String x:Key="Text.Repository.Search.ByFile" xml:space="preserve">File</x:String>
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">Message</x:String>
@ -576,6 +580,7 @@
<x:String x:Key="Text.Repository.Search.ByUser" xml:space="preserve">Author &amp; Committer</x:String>
<x:String x:Key="Text.Repository.Search.InCurrentBranch" xml:space="preserve">Current Branch</x:String>
<x:String x:Key="Text.Repository.ShowTagsAsTree" xml:space="preserve">Show Tags as Tree</x:String>
<x:String x:Key="Text.Repository.Skip" xml:space="preserve">SKIP</x:String>
<x:String x:Key="Text.Repository.Statistics" xml:space="preserve">Statistics</x:String>
<x:String x:Key="Text.Repository.Submodules" xml:space="preserve">SUBMODULES</x:String>
<x:String x:Key="Text.Repository.Submodules.Add" xml:space="preserve">ADD SUBMODULE</x:String>

View file

@ -392,10 +392,10 @@
<x:String x:Key="Text.Hunk.Discard" xml:space="preserve">Descartar</x:String>
<x:String x:Key="Text.Init" xml:space="preserve">Inicializar Repositorio</x:String>
<x:String x:Key="Text.Init.Path" xml:space="preserve">Ruta:</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick en progreso. Presiona 'Abort' para restaurar el HEAD original.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Merge en progreso. Presiona 'Abort' para restaurar el HEAD original.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase en progreso. Presiona 'Abort' para restaurar el HEAD original.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert en progreso. Presiona 'Abort' para restaurar el HEAD original.</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick en progreso.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Merge en progreso.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase en progreso.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert en progreso.</x:String>
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Rebase Interactivo</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Rama Objetivo:</x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">En:</x:String>
@ -404,7 +404,6 @@
<x:String x:Key="Text.Merge" xml:space="preserve">Merge Rama</x:String>
<x:String x:Key="Text.Merge.Into" xml:space="preserve">En:</x:String>
<x:String x:Key="Text.Merge.Mode" xml:space="preserve">Opción de Merge:</x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">Rama Fuente:</x:String>
<x:String x:Key="Text.MoveRepositoryNode" xml:space="preserve">Mover Nodo del Repositorio</x:String>
<x:String x:Key="Text.MoveRepositoryNode.Target" xml:space="preserve">Seleccionar nodo padre para:</x:String>
<x:String x:Key="Text.Name" xml:space="preserve">Nombre:</x:String>
@ -564,7 +563,6 @@
<x:String x:Key="Text.Repository.Refresh" xml:space="preserve">Refrescar</x:String>
<x:String x:Key="Text.Repository.Remotes" xml:space="preserve">REMOTOS</x:String>
<x:String x:Key="Text.Repository.Remotes.Add" xml:space="preserve">AÑADIR REMOTO</x:String>
<x:String x:Key="Text.Repository.Resolve" xml:space="preserve">RESOLVER</x:String>
<x:String x:Key="Text.Repository.Search" xml:space="preserve">Buscar Commit</x:String>
<x:String x:Key="Text.Repository.Search.ByFile" xml:space="preserve">Archivo</x:String>
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">Mensaje</x:String>

View file

@ -386,10 +386,10 @@
<x:String x:Key="Text.Hunk.Discard" xml:space="preserve">Rejeter</x:String>
<x:String x:Key="Text.Init" xml:space="preserve">Initialiser le repository</x:String>
<x:String x:Key="Text.Init.Path" xml:space="preserve">Chemin :</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick en cours. Appuyer sur 'Abort' pour restaurer le HEAD d'origine.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Merge request in progress. Appuyer sur 'Abort' pour restaurer le HEAD d'origine.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase in progress. Appuyer sur 'Abort' pour restaurer le HEAD d'origine.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert in progress. Appuyer sur 'Abort' pour restaurer le HEAD d'origine.</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick en cours.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Merge request in progress.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase in progress.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert in progress.</x:String>
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Rebase interactif</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Branche cible :</x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">Sur :</x:String>
@ -400,7 +400,6 @@
<x:String x:Key="Text.Merge" xml:space="preserve">Merger la branche </x:String>
<x:String x:Key="Text.Merge.Into" xml:space="preserve">Dans :</x:String>
<x:String x:Key="Text.Merge.Mode" xml:space="preserve">Option de merge:</x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">Branche source :</x:String>
<x:String x:Key="Text.MoveRepositoryNode" xml:space="preserve">Déplacer le noeud du repository</x:String>
<x:String x:Key="Text.MoveRepositoryNode.Target" xml:space="preserve">Sélectionnier le noeud parent pour :</x:String>
<x:String x:Key="Text.Name" xml:space="preserve">Nom :</x:String>
@ -549,7 +548,6 @@
<x:String x:Key="Text.Repository.Refresh" xml:space="preserve">Rafraîchir</x:String>
<x:String x:Key="Text.Repository.Remotes" xml:space="preserve">DEPOTS DISTANTS</x:String>
<x:String x:Key="Text.Repository.Remotes.Add" xml:space="preserve">AJOUTER DEPOT DISTANT</x:String>
<x:String x:Key="Text.Repository.Resolve" xml:space="preserve">RESOUDRE</x:String>
<x:String x:Key="Text.Repository.Search" xml:space="preserve">Rechercher un commit</x:String>
<x:String x:Key="Text.Repository.Search.ByFile" xml:space="preserve">Fichier</x:String>
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">Message</x:String>

View file

@ -389,10 +389,10 @@
<x:String x:Key="Text.Hunk.Discard" xml:space="preserve">Scarta</x:String>
<x:String x:Key="Text.Init" xml:space="preserve">Inizializza Repository</x:String>
<x:String x:Key="Text.Init.Path" xml:space="preserve">Percorso:</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick in corso. Premi 'Annulla' per ripristinare l'HEAD originale.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Richiesta di merge in corso. Premi 'Annulla' per ripristinare l'HEAD originale.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase in corso. Premi 'Annulla' per ripristinare l'HEAD originale.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert in corso. Premi 'Annulla' per ripristinare l'HEAD originale.</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick in corso.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Richiesta di merge in corso.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase in corso.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert in corso.</x:String>
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Rebase Interattivo</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Branch di destinazione:</x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">Su:</x:String>
@ -403,7 +403,6 @@
<x:String x:Key="Text.Merge" xml:space="preserve">Unisci Branch</x:String>
<x:String x:Key="Text.Merge.Into" xml:space="preserve">In:</x:String>
<x:String x:Key="Text.Merge.Mode" xml:space="preserve">Opzione di Merge:</x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">Branch Sorgente:</x:String>
<x:String x:Key="Text.MoveRepositoryNode" xml:space="preserve">Sposta Nodo Repository</x:String>
<x:String x:Key="Text.MoveRepositoryNode.Target" xml:space="preserve">Seleziona nodo padre per:</x:String>
<x:String x:Key="Text.Name" xml:space="preserve">Nome:</x:String>
@ -555,7 +554,6 @@
<x:String x:Key="Text.Repository.Refresh" xml:space="preserve">Aggiorna</x:String>
<x:String x:Key="Text.Repository.Remotes" xml:space="preserve">REMOTI</x:String>
<x:String x:Key="Text.Repository.Remotes.Add" xml:space="preserve">AGGIUNGI REMOTO</x:String>
<x:String x:Key="Text.Repository.Resolve" xml:space="preserve">RISOLVI</x:String>
<x:String x:Key="Text.Repository.Search" xml:space="preserve">Cerca Commit</x:String>
<x:String x:Key="Text.Repository.Search.ByFile" xml:space="preserve">File</x:String>
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">Messaggio</x:String>

View file

@ -412,10 +412,10 @@
<x:String x:Key="Text.Hunk.Discard" xml:space="preserve">Descartar</x:String>
<x:String x:Key="Text.Init" xml:space="preserve">Inicializar Repositório</x:String>
<x:String x:Key="Text.Init.Path" xml:space="preserve">Caminho:</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick em andamento. Pressione 'Abort' para restaurar o HEAD original.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Merge em andamento. Pressione 'Abort' para restaurar o HEAD original.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase em andamento. Pressione 'Abort' para restaurar o HEAD original.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert em andamento. Pressione 'Abort' para restaurar o HEAD original.</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick em andamento.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Merge em andamento.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase em andamento.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert em andamento.</x:String>
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Rebase Interativo</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Ramo Alvo:</x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">Em:</x:String>
@ -426,7 +426,6 @@
<x:String x:Key="Text.Merge" xml:space="preserve">Mesclar Ramo</x:String>
<x:String x:Key="Text.Merge.Into" xml:space="preserve">Para:</x:String>
<x:String x:Key="Text.Merge.Mode" xml:space="preserve">Opção de Mesclagem:</x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">Ramo de Origem:</x:String>
<x:String x:Key="Text.MoveRepositoryNode" xml:space="preserve">Mover nó do repositório</x:String>
<x:String x:Key="Text.MoveRepositoryNode.Target" xml:space="preserve">Selecionar nó pai para:</x:String>
<x:String x:Key="Text.Name" xml:space="preserve">Nome:</x:String>
@ -583,7 +582,6 @@
<x:String x:Key="Text.Repository.Refresh" xml:space="preserve">Atualizar</x:String>
<x:String x:Key="Text.Repository.Remotes" xml:space="preserve">REMOTOS</x:String>
<x:String x:Key="Text.Repository.Remotes.Add" xml:space="preserve">ADICIONAR REMOTO</x:String>
<x:String x:Key="Text.Repository.Resolve" xml:space="preserve">RESOLVER</x:String>
<x:String x:Key="Text.Repository.Search" xml:space="preserve">Pesquisar Commit</x:String>
<x:String x:Key="Text.Repository.Search.ByFile" xml:space="preserve">Arquivo</x:String>
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">Mensagem</x:String>

View file

@ -392,10 +392,10 @@
<x:String x:Key="Text.Hunk.Discard" xml:space="preserve">Отклонить</x:String>
<x:String x:Key="Text.Init" xml:space="preserve">Инициализировать хранилище</x:String>
<x:String x:Key="Text.Init.Path" xml:space="preserve">Путь:</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Выполняется частичный забор. Нажмите «Отказ» для восстановления заголовка.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Выполняет запрос слияния. Нажмите «Отказ» для восстановления заголовка.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Выполняется перенос. Нажмите «Отказ» для восстановления заголовка.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Выполняется возврат. Нажмите «Отказ» для восстановления заголовка.</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Выполняется частичный забор.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Выполняет запрос слияния.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Выполняется перенос.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Выполняется возврат.</x:String>
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Интерактивное перемещение</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Целевая ветка:</x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">На:</x:String>
@ -406,7 +406,6 @@
<x:String x:Key="Text.Merge" xml:space="preserve">Слить ветку</x:String>
<x:String x:Key="Text.Merge.Into" xml:space="preserve">В:</x:String>
<x:String x:Key="Text.Merge.Mode" xml:space="preserve">Опции слияния:</x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">Исходная ветка:</x:String>
<x:String x:Key="Text.MoveRepositoryNode" xml:space="preserve">Переместить узел хранилища</x:String>
<x:String x:Key="Text.MoveRepositoryNode.Target" xml:space="preserve">Выбрать родительский узел для:</x:String>
<x:String x:Key="Text.Name" xml:space="preserve">Имя:</x:String>
@ -566,7 +565,6 @@
<x:String x:Key="Text.Repository.Refresh" xml:space="preserve">Обновить</x:String>
<x:String x:Key="Text.Repository.Remotes" xml:space="preserve">ВНЕШНИЕ ХРАНИЛИЩА</x:String>
<x:String x:Key="Text.Repository.Remotes.Add" xml:space="preserve">ДОБАВИТЬ ВНЕШНЕЕ ХРАНИЛИЩЕ</x:String>
<x:String x:Key="Text.Repository.Resolve" xml:space="preserve">РАЗРЕШИТЬ</x:String>
<x:String x:Key="Text.Repository.Search" xml:space="preserve">Поиск фиксации</x:String>
<x:String x:Key="Text.Repository.Search.ByFile" xml:space="preserve">Файл</x:String>
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">Сообщение</x:String>

View file

@ -284,6 +284,7 @@
<x:String x:Key="Text.FileCM.DiscardMulti" xml:space="preserve">放弃 {0} 个文件的更改...</x:String>
<x:String x:Key="Text.FileCM.DiscardSelectedLines" xml:space="preserve">放弃选中的更改</x:String>
<x:String x:Key="Text.FileCM.OpenWithExternalMerger" xml:space="preserve">使用外部合并工具打开</x:String>
<x:String x:Key="Text.FileCM.ResolveUsing" xml:space="preserve">应用 ${0}$</x:String>
<x:String x:Key="Text.FileCM.SaveAsPatch" xml:space="preserve">另存为补丁...</x:String>
<x:String x:Key="Text.FileCM.Stage" xml:space="preserve">暂存(add)</x:String>
<x:String x:Key="Text.FileCM.StageMulti" xml:space="preserve">暂存(add){0} 个文件</x:String>
@ -394,10 +395,14 @@
<x:String x:Key="Text.Hunk.Discard" xml:space="preserve">丢弃</x:String>
<x:String x:Key="Text.Init" xml:space="preserve">初始化新仓库</x:String>
<x:String x:Key="Text.Init.Path" xml:space="preserve">路径 </x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">挑选Cherry-Pick操作进行中。点击【终止】回滚到操作前的状态。</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">合并操作进行中。点击【终止】回滚到操作前的状态。</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">变基Rebase操作进行中。点击【终止】回滚到操作前的状态。</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">回滚提交操作进行中。点击【终止】回滚到操作前的状态。</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">挑选Cherry-Pick操作进行中。</x:String>
<x:String x:Key="Text.InProgress.CherryPick.Head" xml:space="preserve">正在处理提交</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">合并操作进行中。</x:String>
<x:String x:Key="Text.InProgress.Merge.Operating" xml:space="preserve">正在处理</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">变基Rebase操作进行中。</x:String>
<x:String x:Key="Text.InProgress.Rebase.StoppedAt" xml:space="preserve">当前停止于</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">回滚提交操作进行中。</x:String>
<x:String x:Key="Text.InProgress.Revert.Head" xml:space="preserve">正在回滚提交</x:String>
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">交互式变基</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">目标分支 </x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">起始提交 </x:String>
@ -408,7 +413,7 @@
<x:String x:Key="Text.Merge" xml:space="preserve">合并分支</x:String>
<x:String x:Key="Text.Merge.Into" xml:space="preserve">目标分支 </x:String>
<x:String x:Key="Text.Merge.Mode" xml:space="preserve">合并方式 </x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">合并分支 </x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">合并目标 </x:String>
<x:String x:Key="Text.MergeMultiple" xml:space="preserve">合并(多目标)</x:String>
<x:String x:Key="Text.MergeMultiple.CommitChanges" xml:space="preserve">提交变化</x:String>
<x:String x:Key="Text.MergeMultiple.Strategy" xml:space="preserve">合并策略 </x:String>
@ -572,7 +577,6 @@
<x:String x:Key="Text.Repository.Refresh" xml:space="preserve">重新加载</x:String>
<x:String x:Key="Text.Repository.Remotes" xml:space="preserve">远程列表</x:String>
<x:String x:Key="Text.Repository.Remotes.Add" xml:space="preserve">添加远程</x:String>
<x:String x:Key="Text.Repository.Resolve" xml:space="preserve">解决冲突</x:String>
<x:String x:Key="Text.Repository.Search" xml:space="preserve">查找提交</x:String>
<x:String x:Key="Text.Repository.Search.ByFile" xml:space="preserve">文件</x:String>
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">提交信息</x:String>
@ -580,6 +584,7 @@
<x:String x:Key="Text.Repository.Search.ByUser" xml:space="preserve">作者及提交者</x:String>
<x:String x:Key="Text.Repository.Search.InCurrentBranch" xml:space="preserve">仅在当前分支中查找</x:String>
<x:String x:Key="Text.Repository.ShowTagsAsTree" xml:space="preserve">以树型结构展示</x:String>
<x:String x:Key="Text.Repository.Skip" xml:space="preserve">跳过此提交</x:String>
<x:String x:Key="Text.Repository.Statistics" xml:space="preserve">提交统计</x:String>
<x:String x:Key="Text.Repository.Submodules" xml:space="preserve">子模块列表</x:String>
<x:String x:Key="Text.Repository.Submodules.Add" xml:space="preserve">添加子模块</x:String>

View file

@ -284,6 +284,7 @@
<x:String x:Key="Text.FileCM.DiscardMulti" xml:space="preserve">捨棄已選的 {0} 個檔案變更...</x:String>
<x:String x:Key="Text.FileCM.DiscardSelectedLines" xml:space="preserve">捨棄選取的變更</x:String>
<x:String x:Key="Text.FileCM.OpenWithExternalMerger" xml:space="preserve">使用外部合併工具開啟</x:String>
<x:String x:Key="Text.FileCM.ResolveUsing" xml:space="preserve">使用 ${0}$</x:String>
<x:String x:Key="Text.FileCM.SaveAsPatch" xml:space="preserve">另存為修補檔 (patch)...</x:String>
<x:String x:Key="Text.FileCM.Stage" xml:space="preserve">暫存 (add)</x:String>
<x:String x:Key="Text.FileCM.StageMulti" xml:space="preserve">暫存 (add) 已選的 {0} 個檔案</x:String>
@ -394,10 +395,14 @@
<x:String x:Key="Text.Hunk.Discard" xml:space="preserve">捨棄</x:String>
<x:String x:Key="Text.Init" xml:space="preserve">初始化存放庫</x:String>
<x:String x:Key="Text.Init.Path" xml:space="preserve">路徑:</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">揀選 (cherry-pick) 操作進行中。點選 [中止] 復原到操作前的狀態。</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">合併操作進行中。點選 [中止] 復原到操作前的狀態。</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">重定基底 (rebase) 操作進行中。點選 [中止] 復原到操作前的狀態。</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">復原提交操作進行中。點選 [中止] 復原到操作前的狀態。</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">揀選 (cherry-pick) 操作進行中。</x:String>
<x:String x:Key="Text.InProgress.CherryPick.Head" xml:space="preserve">正在處理提交</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">合併操作進行中。</x:String>
<x:String x:Key="Text.InProgress.Merge.Operating" xml:space="preserve">正在處理</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">重定基底 (rebase) 操作進行中。</x:String>
<x:String x:Key="Text.InProgress.Rebase.StoppedAt" xml:space="preserve">当前停止于</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">復原提交操作進行中。</x:String>
<x:String x:Key="Text.InProgress.Revert.Head" xml:space="preserve">正在復原提交</x:String>
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">互動式重定基底</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">目標分支:</x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">起始提交:</x:String>
@ -408,7 +413,7 @@
<x:String x:Key="Text.Merge" xml:space="preserve">合併分支</x:String>
<x:String x:Key="Text.Merge.Into" xml:space="preserve">目標分支:</x:String>
<x:String x:Key="Text.Merge.Mode" xml:space="preserve">合併方式:</x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">合併分支:</x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">合併目標:</x:String>
<x:String x:Key="Text.MergeMultiple" xml:space="preserve">合併(多目標)</x:String>
<x:String x:Key="Text.MergeMultiple.CommitChanges" xml:space="preserve">提交變更</x:String>
<x:String x:Key="Text.MergeMultiple.Strategy" xml:space="preserve">合併策略:</x:String>
@ -571,7 +576,6 @@
<x:String x:Key="Text.Repository.Refresh" xml:space="preserve">重新載入</x:String>
<x:String x:Key="Text.Repository.Remotes" xml:space="preserve">遠端列表</x:String>
<x:String x:Key="Text.Repository.Remotes.Add" xml:space="preserve">新增遠端</x:String>
<x:String x:Key="Text.Repository.Resolve" xml:space="preserve">解決衝突</x:String>
<x:String x:Key="Text.Repository.Search" xml:space="preserve">搜尋提交</x:String>
<x:String x:Key="Text.Repository.Search.ByFile" xml:space="preserve">檔案</x:String>
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">提交訊息</x:String>
@ -579,6 +583,7 @@
<x:String x:Key="Text.Repository.Search.ByUser" xml:space="preserve">作者及提交者</x:String>
<x:String x:Key="Text.Repository.Search.InCurrentBranch" xml:space="preserve">僅搜尋目前分支</x:String>
<x:String x:Key="Text.Repository.ShowTagsAsTree" xml:space="preserve">以樹型結構展示</x:String>
<x:String x:Key="Text.Repository.Skip" xml:space="preserve">跳過此提交</x:String>
<x:String x:Key="Text.Repository.Statistics" xml:space="preserve">提交統計</x:String>
<x:String x:Key="Text.Repository.Submodules" xml:space="preserve">子模組列表</x:String>
<x:String x:Key="Text.Repository.Submodules.Add" xml:space="preserve">新增子模組</x:String>

View file

@ -847,8 +847,13 @@ namespace SourceGit.ViewModels
fastForward.IsEnabled = current.TrackStatus.Ahead.Count == 0;
fastForward.Click += (_, e) =>
{
var b = _repo.Branches.Find(x => x.FriendlyName == upstream);
if (b == null)
return;
if (PopupHost.CanCreatePopup())
PopupHost.ShowAndStartPopup(new Merge(_repo, upstream, current.Name));
PopupHost.ShowAndStartPopup(new Merge(_repo, b, current.Name));
e.Handled = true;
};
submenu.Items.Add(fastForward);
@ -943,7 +948,7 @@ namespace SourceGit.ViewModels
merge.Click += (_, e) =>
{
if (PopupHost.CanCreatePopup())
PopupHost.ShowPopup(new Merge(_repo, branch.Name, current.Name));
PopupHost.ShowPopup(new Merge(_repo, branch, current.Name));
e.Handled = true;
};
submenu.Items.Add(merge);
@ -1027,7 +1032,7 @@ namespace SourceGit.ViewModels
merge.Click += (_, e) =>
{
if (PopupHost.CanCreatePopup())
PopupHost.ShowPopup(new Merge(_repo, name, current.Name));
PopupHost.ShowPopup(new Merge(_repo, branch, current.Name));
e.Handled = true;
};
@ -1086,7 +1091,7 @@ namespace SourceGit.ViewModels
merge.Click += (_, e) =>
{
if (PopupHost.CanCreatePopup())
PopupHost.ShowPopup(new Merge(_repo, tag.Name, current.Name));
PopupHost.ShowPopup(new Merge(_repo, tag, current.Name));
e.Handled = true;
};
submenu.Items.Add(merge);

View file

@ -16,10 +16,17 @@ namespace SourceGit.ViewModels
set;
}
public InProgressContext(string repo, string cmd)
public bool CanSkip
{
get;
protected set;
}
public InProgressContext(string repo, string cmd, bool canSkip)
{
Repository = repo;
Cmd = cmd;
CanSkip = canSkip;
}
public bool Abort()
@ -32,6 +39,19 @@ namespace SourceGit.ViewModels
}.Exec();
}
public bool Skip()
{
if (!CanSkip)
return true;
return new Commands.Command()
{
WorkingDirectory = Repository,
Context = Repository,
Args = $"{Cmd} --skip",
}.Exec();
}
public virtual bool Continue()
{
return new Commands.Command()
@ -42,18 +62,79 @@ namespace SourceGit.ViewModels
Args = $"{Cmd} --continue",
}.Exec();
}
protected string GetFriendlyNameOfCommit(Models.Commit commit)
{
var branchDecorator = commit.Decorators.Find(x => x.Type == Models.DecoratorType.LocalBranchHead || x.Type == Models.DecoratorType.RemoteBranchHead);
if (branchDecorator != null)
return branchDecorator.Name;
var tagDecorator = commit.Decorators.Find(x => x.Type == Models.DecoratorType.Tag);
if (tagDecorator != null)
return tagDecorator.Name;
return commit.SHA.Substring(0, 10);
}
}
public class CherryPickInProgress : InProgressContext
{
public CherryPickInProgress(string repo) : base(repo, "cherry-pick") { }
public Models.Commit Head
{
get;
private set;
}
public string HeadName
{
get => GetFriendlyNameOfCommit(Head);
}
public CherryPickInProgress(Repository repo) : base(repo.FullPath, "cherry-pick", true)
{
var headSHA = File.ReadAllText(Path.Combine(repo.GitDir, "CHERRY_PICK_HEAD")).Trim();
Head = new Commands.QuerySingleCommit(repo.FullPath, headSHA).Result() ?? new Models.Commit() { SHA = headSHA };
}
}
public class RebaseInProgress : InProgressContext
{
public RebaseInProgress(Repository repo) : base(repo.FullPath, "rebase")
public string HeadName
{
get;
private set;
}
public string BaseName
{
get => GetFriendlyNameOfCommit(Onto);
}
public Models.Commit StoppedAt
{
get;
private set;
}
public Models.Commit Onto
{
get;
private set;
}
public RebaseInProgress(Repository repo) : base(repo.FullPath, "rebase", true)
{
_gitDir = repo.GitDir;
var stoppedSHA = File.ReadAllText(Path.Combine(repo.GitDir, "rebase-merge", "stopped-sha")).Trim();
StoppedAt = new Commands.QuerySingleCommit(repo.FullPath, stoppedSHA).Result() ?? new Models.Commit() { SHA = stoppedSHA };
var ontoSHA = File.ReadAllText(Path.Combine(repo.GitDir, "rebase-merge", "onto")).Trim();
Onto = new Commands.QuerySingleCommit(repo.FullPath, ontoSHA).Result() ?? new Models.Commit() { SHA = ontoSHA };
HeadName = File.ReadAllText(Path.Combine(repo.GitDir, "rebase-merge", "head-name")).Trim();
if (HeadName.StartsWith("refs/heads/"))
HeadName = HeadName.Substring(11);
}
public override bool Continue()
@ -90,11 +171,44 @@ namespace SourceGit.ViewModels
public class RevertInProgress : InProgressContext
{
public RevertInProgress(string repo) : base(repo, "revert") { }
public Models.Commit Head
{
get;
private set;
}
public RevertInProgress(Repository repo) : base(repo.FullPath, "revert", false)
{
var headSHA = File.ReadAllText(Path.Combine(repo.GitDir, "REVERT_HEAD")).Trim();
Head = new Commands.QuerySingleCommit(repo.FullPath, headSHA).Result() ?? new Models.Commit() { SHA = headSHA };
}
}
public class MergeInProgress : InProgressContext
{
public MergeInProgress(string repo) : base(repo, "merge") { }
public string Current
{
get;
private set;
}
public Models.Commit Source
{
get;
private set;
}
public string SourceName
{
get => GetFriendlyNameOfCommit(Source);
}
public MergeInProgress(Repository repo) : base(repo.FullPath, "merge", false)
{
Current = Commands.Branch.ShowCurrent(repo.FullPath);
var sourceSHA = File.ReadAllText(Path.Combine(repo.GitDir, "MERGE_HEAD")).Trim();
Source = new Commands.QuerySingleCommit(repo.FullPath, sourceSHA).Result() ?? new Models.Commit() { SHA = sourceSHA };
}
}
}

View file

@ -5,7 +5,7 @@ namespace SourceGit.ViewModels
{
public class Merge : Popup
{
public string Source
public object Source
{
get;
}
@ -21,9 +21,22 @@ namespace SourceGit.ViewModels
set;
}
public Merge(Repository repo, string source, string into)
public Merge(Repository repo, Models.Branch source, string into)
{
_repo = repo;
_sourceName = source.FriendlyName;
Source = source;
Into = into;
SelectedMode = AutoSelectMergeMode();
View = new Views.Merge() { DataContext = this };
}
public Merge(Repository repo, Models.Tag source, string into)
{
_repo = repo;
_sourceName = source.Name;
Source = source;
Into = into;
SelectedMode = AutoSelectMergeMode();
@ -33,11 +46,11 @@ namespace SourceGit.ViewModels
public override Task<bool> Sure()
{
_repo.SetWatcherEnabled(false);
ProgressDescription = $"Merging '{Source}' into '{Into}' ...";
ProgressDescription = $"Merging '{_sourceName}' into '{Into}' ...";
return Task.Run(() =>
{
var succ = new Commands.Merge(_repo.FullPath, Source, SelectedMode.Arg, SetProgressDescription).Exec();
var succ = new Commands.Merge(_repo.FullPath, _sourceName, SelectedMode.Arg, SetProgressDescription).Exec();
CallUIThread(() => _repo.SetWatcherEnabled(true));
return succ;
});
@ -59,5 +72,6 @@ namespace SourceGit.ViewModels
}
private readonly Repository _repo = null;
private readonly string _sourceName = string.Empty;
}
}

View file

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
using Avalonia.Collections;
@ -65,8 +66,8 @@ namespace SourceGit.ViewModels
get => _defaultFontFamily;
set
{
var trimmed = value.Trim();
if (SetProperty(ref _defaultFontFamily, trimmed) && !_isLoading)
var name = FixFontFamilyName(value);
if (SetProperty(ref _defaultFontFamily, name) && !_isLoading)
App.SetFonts(_defaultFontFamily, _monospaceFontFamily, _onlyUseMonoFontInEditor);
}
}
@ -76,8 +77,8 @@ namespace SourceGit.ViewModels
get => _monospaceFontFamily;
set
{
var trimmed = value.Trim();
if (SetProperty(ref _monospaceFontFamily, trimmed) && !_isLoading)
var name = FixFontFamilyName(value);
if (SetProperty(ref _monospaceFontFamily, name) && !_isLoading)
App.SetFonts(_defaultFontFamily, _monospaceFontFamily, _onlyUseMonoFontInEditor);
}
}
@ -588,6 +589,35 @@ namespace SourceGit.ViewModels
return changed;
}
private string FixFontFamilyName(string name)
{
var trimmed = name.Trim();
if (string.IsNullOrEmpty(trimmed))
return string.Empty;
var builder = new StringBuilder();
var lastIsSpace = false;
for (int i = 0; i < trimmed.Length; i++)
{
var c = trimmed[i];
if (char.IsWhiteSpace(c))
{
if (lastIsSpace)
continue;
lastIsSpace = true;
}
else
{
lastIsSpace = false;
}
builder.Append(c);
}
return builder.ToString();
}
private static Preference _instance = null;
private static bool _isLoading = false;

View file

@ -764,12 +764,6 @@ namespace SourceGit.ViewModels
_workingCopy?.StashAll(autoStart);
}
public void GotoResolve()
{
if (_workingCopy != null)
SelectedViewIndex = 1;
}
public void AbortMerge()
{
_workingCopy?.AbortMerge();
@ -1311,8 +1305,13 @@ namespace SourceGit.ViewModels
fastForward.IsEnabled = branch.TrackStatus.Ahead.Count == 0;
fastForward.Click += (_, e) =>
{
var b = _branches.Find(x => x.FriendlyName == upstream);
if (b == null)
return;
if (PopupHost.CanCreatePopup())
PopupHost.ShowAndStartPopup(new Merge(this, upstream, branch.Name));
PopupHost.ShowAndStartPopup(new Merge(this, b, branch.Name));
e.Handled = true;
};
@ -1391,7 +1390,7 @@ namespace SourceGit.ViewModels
merge.Click += (_, e) =>
{
if (PopupHost.CanCreatePopup())
PopupHost.ShowPopup(new Merge(this, branch.Name, _currentBranch.Name));
PopupHost.ShowPopup(new Merge(this, branch, _currentBranch.Name));
e.Handled = true;
};
@ -1687,7 +1686,7 @@ namespace SourceGit.ViewModels
merge.Click += (_, e) =>
{
if (PopupHost.CanCreatePopup())
PopupHost.ShowPopup(new Merge(this, name, _currentBranch.Name));
PopupHost.ShowPopup(new Merge(this, branch, _currentBranch.Name));
e.Handled = true;
};

View file

@ -237,13 +237,13 @@ namespace SourceGit.ViewModels
var inProgress = null as InProgressContext;
if (File.Exists(Path.Combine(_repo.GitDir, "CHERRY_PICK_HEAD")))
inProgress = new CherryPickInProgress(_repo.FullPath);
inProgress = new CherryPickInProgress(_repo);
else if (File.Exists(Path.Combine(_repo.GitDir, "REBASE_HEAD")) && Directory.Exists(Path.Combine(_repo.GitDir, "rebase-merge")))
inProgress = new RebaseInProgress(_repo);
else if (File.Exists(Path.Combine(_repo.GitDir, "REVERT_HEAD")))
inProgress = new RevertInProgress(_repo.FullPath);
inProgress = new RevertInProgress(_repo);
else if (File.Exists(Path.Combine(_repo.GitDir, "MERGE_HEAD")))
inProgress = new MergeInProgress(_repo.FullPath);
inProgress = new MergeInProgress(_repo);
HasUnsolvedConflicts = _cached.Find(x => x.IsConflit) != null;
InProgressContext = inProgress;
@ -310,13 +310,13 @@ namespace SourceGit.ViewModels
var inProgress = null as InProgressContext;
if (File.Exists(Path.Combine(_repo.GitDir, "CHERRY_PICK_HEAD")))
inProgress = new CherryPickInProgress(_repo.FullPath);
inProgress = new CherryPickInProgress(_repo);
else if (File.Exists(Path.Combine(_repo.GitDir, "REBASE_HEAD")) && Directory.Exists(Path.Combine(_repo.GitDir, "rebase-merge")))
inProgress = new RebaseInProgress(_repo);
else if (File.Exists(Path.Combine(_repo.GitDir, "REVERT_HEAD")))
inProgress = new RevertInProgress(_repo.FullPath);
inProgress = new RevertInProgress(_repo);
else if (File.Exists(Path.Combine(_repo.GitDir, "MERGE_HEAD")))
inProgress = new MergeInProgress(_repo.FullPath);
inProgress = new MergeInProgress(_repo);
InProgressContext = inProgress;
@ -569,8 +569,30 @@ namespace SourceGit.ViewModels
e.Handled = true;
};
if (_inProgressContext is CherryPickInProgress cherryPick)
{
useTheirs.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", cherryPick.HeadName);
useMine.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", _repo.CurrentBranch.Name);
}
else if(_inProgressContext is RebaseInProgress rebase)
{
useTheirs.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", rebase.HeadName);
useMine.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", rebase.BaseName);
}
else if (_inProgressContext is RevertInProgress revert)
{
useTheirs.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", revert.Head.SHA.Substring(0, 10) + " (revert)");
useMine.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", _repo.CurrentBranch.Name);
}
else if (_inProgressContext is MergeInProgress merge)
{
useTheirs.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", merge.SourceName);
useMine.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", _repo.CurrentBranch.Name);
}
menu.Items.Add(useTheirs);
menu.Items.Add(useMine);
menu.Items.Add(new MenuItem() { Header = "-" });
menu.Items.Add(openMerger);
menu.Items.Add(new MenuItem() { Header = "-" });
}
@ -892,6 +914,27 @@ namespace SourceGit.ViewModels
e.Handled = true;
};
if (_inProgressContext is CherryPickInProgress cherryPick)
{
useTheirs.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", cherryPick.HeadName);
useMine.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", _repo.CurrentBranch.Name);
}
else if (_inProgressContext is RebaseInProgress rebase)
{
useTheirs.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", rebase.HeadName);
useMine.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", rebase.BaseName);
}
else if (_inProgressContext is RevertInProgress revert)
{
useTheirs.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", revert.Head.SHA.Substring(0,10) + " (revert)");
useMine.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", _repo.CurrentBranch.Name);
}
else if (_inProgressContext is MergeInProgress merge)
{
useTheirs.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", merge.SourceName);
useMine.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", _repo.CurrentBranch.Name);
}
menu.Items.Add(useTheirs);
menu.Items.Add(useMine);
return menu;

View file

@ -16,10 +16,23 @@
HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,8,0"
Text="{DynamicResource Text.Merge.Source}"/>
<StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal" Height="20" VerticalAlignment="Center">
<Path Margin="0,0,8,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG1}" Data="{StaticResource Icons.Branch}"/>
<TextBlock Text="{Binding Source}"/>
</StackPanel>
<ContentControl Grid.Row="0" Grid.Column="1" Content="{Binding Source}">
<ContentControl.DataTemplates>
<DataTemplate DataType="m:Branch">
<StackPanel Orientation="Horizontal">
<Path Width="14" Height="14" Data="{StaticResource Icons.Branch}"/>
<TextBlock VerticalAlignment="Center" Text="{Binding FriendlyName}" Margin="8,0,0,0"/>
</StackPanel>
</DataTemplate>
<DataTemplate DataType="m:Tag">
<StackPanel Orientation="Horizontal">
<Path Width="14" Height="14" Data="{StaticResource Icons.Tag}"/>
<TextBlock VerticalAlignment="Center" Text="{Binding Name}" Margin="8,0,0,0"/>
</StackPanel>
</DataTemplate>
</ContentControl.DataTemplates>
</ContentControl>
<TextBlock Grid.Row="1" Grid.Column="0"
HorizontalAlignment="Right" VerticalAlignment="Center"

View file

@ -550,41 +550,78 @@
<Grid Grid.Row="0" Height="28" ColumnDefinitions="*,Auto,Auto" Background="{DynamicResource Brush.Conflict}" IsVisible="{Binding InProgressContext, Converter={x:Static ObjectConverters.IsNotNull}}">
<ContentControl Grid.Column="0" Margin="8,0" Content="{Binding InProgressContext}">
<ContentControl.DataTemplates>
<DataTemplate DataType="m:Commit">
<StackPanel MinWidth="400" Orientation="Vertical">
<Grid ColumnDefinitions="Auto,*,Auto">
<v:Avatar Grid.Column="0" Width="16" Height="16" VerticalAlignment="Center" IsHitTestVisible="False" User="{Binding Author}"/>
<TextBlock Grid.Column="1" Classes="primary" Text="{Binding Author.Name}" Margin="8,0,0,0"/>
<TextBlock Grid.Column="2" Classes="primary" Text="{Binding CommitterTimeStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/>
</Grid>
<TextBlock Classes="primary" Margin="0,8,0,0" Text="{Binding Subject}" TextWrapping="Wrap"/>
</StackPanel>
</DataTemplate>
<DataTemplate DataType="vm:CherryPickInProgress">
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.CherryPick}"/>
<StackPanel Orientation="Horizontal">
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.CherryPick}"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.CherryPick.Head}"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="DarkOrange" Text="{Binding Head.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" ToolTip.Tip="{Binding Head}"/>
</StackPanel>
</DataTemplate>
<DataTemplate DataType="vm:RebaseInProgress">
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Rebase}"/>
<StackPanel Orientation="Horizontal">
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Rebase}"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Rebase.StoppedAt}"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="DarkOrange" Text="{Binding StoppedAt.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" ToolTip.Tip="{Binding StoppedAt}"/>
</StackPanel>
</DataTemplate>
<DataTemplate DataType="vm:RevertInProgress">
<StackPanel Orientation="Horizontal">
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Revert}"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Revert.Head}"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="DarkOrange" Text="{Binding Head.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" ToolTip.Tip="{Binding Head}"/>
</StackPanel>
</DataTemplate>
<DataTemplate DataType="vm:MergeInProgress">
<StackPanel Orientation="Horizontal">
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Merge}"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Merge.Operating}"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="DarkOrange" Text="{Binding SourceName}" ToolTip.Tip="{Binding Source}"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.ConflictForeground}" Text="→"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="DarkOrange" Text="{Binding Current}"/>
</StackPanel>
</DataTemplate>
</ContentControl.DataTemplates>
</ContentControl>
<ContentControl Grid.Column="1" Margin="4,0" Content="{Binding InProgressContext}">
<ContentControl.DataTemplates>
<DataTemplate DataType="vm:CherryPickInProgress">
<Button Classes="flat" FontWeight="Regular" BorderThickness="0" Content="{DynamicResource Text.Repository.Skip}" Padding="8,2" Command="{Binding Skip}"/>
</DataTemplate>
<DataTemplate DataType="vm:RebaseInProgress">
<Button Classes="flat" FontWeight="Regular" BorderThickness="0" Content="{DynamicResource Text.Repository.Skip}" Padding="8,2" Command="{Binding Skip}"/>
</DataTemplate>
<DataTemplate DataType="vm:RevertInProgress">
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Revert}"/>
</DataTemplate>
<DataTemplate DataType="vm:MergeInProgress">
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Merge}"/>
</DataTemplate>
</ContentControl.DataTemplates>
</ContentControl>
<Button Grid.Column="1"
Classes="flat"
FontWeight="Regular"
BorderThickness="0"
Content="{DynamicResource Text.Repository.Resolve}"
Padding="8,0" Margin="4,0"
Command="{Binding GotoResolve}">
<Button.IsVisible>
<Binding Path="SelectedViewIndex" Converter="{x:Static c:IntConverters.IsNotOne}"/>
</Button.IsVisible>
</Button>
<Button Grid.Column="2"
Classes="flat"
FontWeight="Regular"
BorderThickness="0"
Content="{DynamicResource Text.Repository.Abort}"
Padding="8,0" Margin="4,0"
Padding="8,2" Margin="4,0"
Command="{Binding AbortMerge}"/>
</Grid>