mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
Compare commits
53 commits
4a3ef6267f
...
0e37e018ef
Author | SHA1 | Date | |
---|---|---|---|
|
0e37e018ef | ||
|
e1fb799fd4 | ||
|
f986e59a94 | ||
|
0a0e2bc044 | ||
|
24b6153226 | ||
|
751991c816 | ||
|
a99bd2e973 | ||
|
26923435e7 | ||
|
02658839c2 | ||
|
6eb226eb44 | ||
|
59f11e9aca | ||
|
c4c7bef93c | ||
|
27afe1871f | ||
|
0ac1031c4c | ||
|
2053ce033d | ||
|
e17b53da42 | ||
|
9dd4166009 | ||
|
a10f9e0dd0 | ||
|
0dd6692cd8 | ||
|
dcaeaef48a | ||
|
36ecbcc4e0 | ||
|
55ad194e0e | ||
|
9b88db290d | ||
|
93d9a04460 | ||
|
2dd9cab695 | ||
|
3b5d87391d | ||
|
767de75512 | ||
|
feb7e96b2c | ||
|
c8cdda3477 | ||
|
3cecb3f888 | ||
|
2504a52398 | ||
|
4dd3b7f412 | ||
|
ef40e4b738 | ||
|
e1df5c52f1 | ||
|
33ef9a612d | ||
|
0a486a90d9 | ||
|
aee3abfffb | ||
|
1644b4c8ce | ||
|
967429cea6 | ||
|
33625b58da | ||
|
64bedd2ae9 | ||
|
2b6210e61c | ||
|
94daa46db9 | ||
|
4eed9674b4 | ||
|
dce33fdf60 | ||
|
c9c7fb5d5b | ||
|
ee3942fec6 | ||
|
3990cc9452 | ||
|
bea2a39feb | ||
|
19307cebc0 | ||
|
a9011ddc2c | ||
|
9f5cbaba09 | ||
|
a263002c83 |
59 changed files with 1250 additions and 343 deletions
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
|
@ -25,6 +25,7 @@ jobs:
|
|||
with:
|
||||
version: ${{ needs.version.outputs.version }}
|
||||
publish-packages:
|
||||
needs: [package, version]
|
||||
name: Publish Packages
|
||||
uses: ./.github/workflows/publish-packages.yml
|
||||
secrets:
|
||||
|
|
29
README.md
29
README.md
|
@ -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-99.58%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-99.86%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-97.03%25-yellow)](TRANSLATION.md) [![it__IT](https://img.shields.io/badge/it__IT-97.45%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-98.87%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-100.00%25-brightgreen)](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.50%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-97.78%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-95.00%25-yellow)](TRANSLATION.md) [![it__IT](https://img.shields.io/badge/it__IT-95.56%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-96.81%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-97.92%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
|
||||
|
||||
|
@ -98,6 +98,33 @@ For **macOS** users:
|
|||
|
||||
For **Linux** users:
|
||||
|
||||
* For Debian/Ubuntu based distributions, you can add the `sourcegit` repository by following:
|
||||
You may need to install curl and/or gpg first, if you're on a very minimal host:
|
||||
```shell
|
||||
apt update && apt install curl gpg -y
|
||||
```
|
||||
Install the registry signing key:
|
||||
```shell
|
||||
curl -fsSL "https://packages.buildkite.com/sourcegit/sourcegit-deb/gpgkey" | gpg --dearmor -o /etc/apt/keyrings/sourcegit_sourcegit-deb-archive-keyring.gpg
|
||||
```
|
||||
Configure the source:
|
||||
```shell
|
||||
echo -e "deb [signed-by=/etc/apt/keyrings/sourcegit_sourcegit-deb-archive-keyring.gpg] https://packages.buildkite.com/sourcegit/sourcegit-deb/any/ any main\ndeb-src [signed-by=/etc/apt/keyrings/sourcegit_sourcegit-deb-archive-keyring.gpg] https://packages.buildkite.com/sourcegit/sourcegit-deb/any/ any main" > /etc/apt/sources.list.d/buildkite-sourcegit-sourcegit-deb.list
|
||||
```
|
||||
Update your local repository and install the package:
|
||||
```shell
|
||||
apt update && apt install sourcegit
|
||||
```
|
||||
* For RHEL/Fedora based distributions, you can add the `sourcegit` repository by following:
|
||||
Configure the source:
|
||||
```shell
|
||||
sudo sh -c 'echo -e "[sourcegit-rpm]\nname=sourcegit-rpm\nbaseurl=https://packages.buildkite.com/sourcegit/sourcegit-rpm/rpm_any/rpm_any/\$basearch\nenabled=1\nrepo_gpgcheck=1\ngpgcheck=0\ngpgkey=https://packages.buildkite.com/sourcegit/sourcegit-rpm/gpgkey\npriority=1"' > /etc/yum.repos.d/sourcegit-rpm.repo
|
||||
```
|
||||
Install the package with this command:
|
||||
```shell
|
||||
sudo dnf install -y sourcegit
|
||||
```
|
||||
* `Appimage` files can be found on [AppimageHub](https://appimage.github.io/SourceGit/)
|
||||
* `xdg-open` must be installed to support open native file manager.
|
||||
* Make sure [git-credential-manager](https://github.com/git-ecosystem/git-credential-manager/releases) is installed on your linux.
|
||||
* Maybe you need to set environment variable `AVALONIA_SCREEN_SCALE_FACTORS`. See https://github.com/AvaloniaUI/Avalonia/wiki/Configuring-X11-per-monitor-DPI.
|
||||
|
|
102
TRANSLATION.md
102
TRANSLATION.md
|
@ -1,37 +1,81 @@
|
|||
### de_DE.axaml: 99.58%
|
||||
### de_DE.axaml: 97.50%
|
||||
|
||||
|
||||
<details>
|
||||
<summary>Missing Keys</summary>
|
||||
|
||||
- Text.BranchCM.MergeMultiBranches
|
||||
- Text.CommitCM.Merge
|
||||
- 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: 99.86%
|
||||
### es_ES.axaml: 97.78%
|
||||
|
||||
|
||||
<details>
|
||||
<summary>Missing Keys</summary>
|
||||
|
||||
- Text.BranchCM.MergeMultiBranches
|
||||
- Text.CommitCM.Merge
|
||||
- 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: 97.03%
|
||||
### fr_FR.axaml: 95.00%
|
||||
|
||||
|
||||
<details>
|
||||
<summary>Missing Keys</summary>
|
||||
|
||||
- Text.BranchCM.MergeMultiBranches
|
||||
- Text.CherryPick.AppendSourceToMessage
|
||||
- Text.CherryPick.Mainline.Tips
|
||||
- Text.CommitCM.CherryPickMultiple
|
||||
- Text.CommitCM.Merge
|
||||
- Text.CommitCM.MergeMultiple
|
||||
- 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
|
||||
- Text.MergeMultiple.Targets
|
||||
- Text.Preference.Appearance.FontSize
|
||||
- Text.Preference.Appearance.FontSize.Default
|
||||
- Text.Preference.Appearance.FontSize.Editor
|
||||
|
@ -44,18 +88,22 @@
|
|||
- 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: 97.45%
|
||||
### it_IT.axaml: 95.56%
|
||||
|
||||
|
||||
<details>
|
||||
<summary>Missing Keys</summary>
|
||||
|
||||
- Text.BranchCM.MergeMultiBranches
|
||||
- Text.CommitCM.Merge
|
||||
- Text.CommitCM.MergeMultiple
|
||||
- Text.CommitDetail.Files.Search
|
||||
- Text.CommitDetail.Info.Children
|
||||
- Text.Configure.IssueTracker.AddSampleGitLabMergeRequest
|
||||
|
@ -63,6 +111,16 @@
|
|||
- 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
|
||||
- Text.MergeMultiple.Targets
|
||||
- Text.Preference.General.ShowChildren
|
||||
- Text.Repository.FilterCommits
|
||||
- Text.Repository.FilterCommits.Default
|
||||
|
@ -71,36 +129,66 @@
|
|||
- 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: 98.87%
|
||||
### pt_BR.axaml: 96.81%
|
||||
|
||||
|
||||
<details>
|
||||
<summary>Missing Keys</summary>
|
||||
|
||||
- Text.BranchCM.MergeMultiBranches
|
||||
- Text.CommitCM.Merge
|
||||
- Text.CommitCM.MergeMultiple
|
||||
- Text.CommitDetail.Files.Search
|
||||
- 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: 100.00%
|
||||
### ru_RU.axaml: 97.92%
|
||||
|
||||
|
||||
<details>
|
||||
<summary>Missing Keys</summary>
|
||||
|
||||
|
||||
- Text.BranchCM.MergeMultiBranches
|
||||
- Text.CommitCM.Merge
|
||||
- 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>
|
||||
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
8.42
|
||||
8.43
|
|
@ -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();
|
||||
|
|
|
@ -74,7 +74,11 @@ namespace SourceGit.Commands
|
|||
}
|
||||
|
||||
if (string.IsNullOrEmpty(e.Data))
|
||||
{
|
||||
errs.Add(string.Empty);
|
||||
return;
|
||||
}
|
||||
|
||||
if (TraitErrorAsOutput)
|
||||
OnReadline(e.Data);
|
||||
|
||||
|
@ -89,6 +93,7 @@ namespace SourceGit.Commands
|
|||
return;
|
||||
if (REG_PROGRESS().IsMatch(e.Data))
|
||||
return;
|
||||
|
||||
errs.Add(e.Data);
|
||||
};
|
||||
|
||||
|
@ -99,12 +104,8 @@ namespace SourceGit.Commands
|
|||
catch (Exception e)
|
||||
{
|
||||
if (RaiseError)
|
||||
{
|
||||
Dispatcher.UIThread.Invoke(() =>
|
||||
{
|
||||
App.RaiseException(Context, e.Message);
|
||||
});
|
||||
}
|
||||
Dispatcher.UIThread.Post(() => App.RaiseException(Context, e.Message));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -115,15 +116,15 @@ namespace SourceGit.Commands
|
|||
int exitCode = proc.ExitCode;
|
||||
proc.Close();
|
||||
|
||||
if (!isCancelled && exitCode != 0 && errs.Count > 0)
|
||||
if (!isCancelled && exitCode != 0)
|
||||
{
|
||||
if (RaiseError)
|
||||
{
|
||||
Dispatcher.UIThread.Invoke(() =>
|
||||
{
|
||||
App.RaiseException(Context, string.Join("\n", errs));
|
||||
});
|
||||
var errMsg = string.Join("\n", errs);
|
||||
if (!string.IsNullOrWhiteSpace(errMsg))
|
||||
Dispatcher.UIThread.Post(() => App.RaiseException(Context, errMsg));
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace SourceGit.Commands
|
||||
{
|
||||
|
@ -13,6 +15,29 @@ namespace SourceGit.Commands
|
|||
Args = $"merge --progress {source} {mode}";
|
||||
}
|
||||
|
||||
public Merge(string repo, List<string> targets, bool autoCommit, string strategy, Action<string> outputHandler)
|
||||
{
|
||||
_outputHandler = outputHandler;
|
||||
WorkingDirectory = repo;
|
||||
Context = repo;
|
||||
TraitErrorAsOutput = true;
|
||||
|
||||
var builder = new StringBuilder();
|
||||
builder.Append("merge --progress ");
|
||||
if (!string.IsNullOrEmpty(strategy))
|
||||
builder.Append($"--strategy={strategy} ");
|
||||
if (!autoCommit)
|
||||
builder.Append("--no-commit ");
|
||||
|
||||
foreach (var t in targets)
|
||||
{
|
||||
builder.Append(t);
|
||||
builder.Append(' ');
|
||||
}
|
||||
|
||||
Args = builder.ToString();
|
||||
}
|
||||
|
||||
protected override void OnReadline(string line)
|
||||
{
|
||||
_outputHandler?.Invoke(line);
|
||||
|
|
|
@ -52,16 +52,28 @@ namespace SourceGit.Commands
|
|||
_current.Commit.CommitterTime = ulong.Parse(line);
|
||||
break;
|
||||
default:
|
||||
if (line.Equals(_boundary, StringComparison.Ordinal))
|
||||
nextPartIdx = -1;
|
||||
var boundary = rs.StdOut.IndexOf(_boundary, end + 1);
|
||||
if (boundary > end)
|
||||
{
|
||||
_current.Message = rs.StdOut.Substring(start, boundary - start - 1);
|
||||
end = boundary + _boundary.Length;
|
||||
}
|
||||
else
|
||||
_current.Message += line;
|
||||
{
|
||||
_current.Message = rs.StdOut.Substring(start);
|
||||
end = rs.StdOut.Length - 2;
|
||||
}
|
||||
|
||||
nextPartIdx = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
nextPartIdx++;
|
||||
|
||||
start = end + 1;
|
||||
if (start >= rs.StdOut.Length - 1)
|
||||
break;
|
||||
|
||||
end = rs.StdOut.IndexOf('\n', start);
|
||||
}
|
||||
|
||||
|
|
24
src/Models/MergeStrategy.cs
Normal file
24
src/Models/MergeStrategy.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace SourceGit.Models
|
||||
{
|
||||
public class MergeStrategy
|
||||
{
|
||||
public string Name { get; internal set; }
|
||||
public string Desc { get; internal set; }
|
||||
public string Arg { get; internal set; }
|
||||
|
||||
public static List<MergeStrategy> ForMultiple { get; private set; } = [
|
||||
new MergeStrategy("Default", "Let Git automatically select a strategy", string.Empty),
|
||||
new MergeStrategy("Octopus", "Attempt merging multiple heads", "octopus"),
|
||||
new MergeStrategy("Ours", "Record the merge without modifying the tree", "ours"),
|
||||
];
|
||||
|
||||
public MergeStrategy(string n, string d, string a)
|
||||
{
|
||||
Name = n;
|
||||
Desc = d;
|
||||
Arg = a;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
<StreamGeometry x:Key="Icons.Clean">M797 829a49 49 0 1049 49 49 49 0 00-49-49zm147-114A49 49 0 10992 764a49 49 0 00-49-49zM928 861a49 49 0 1049 49A49 49 0 00928 861zm-5-586L992 205 851 64l-71 71a67 67 0 00-94 0l235 235a67 67 0 000-94zm-853 128a32 32 0 00-32 50 1291 1291 0 0075 112L288 552c20 0 25 21 8 37l-93 86a1282 1282 0 00120 114l100-32c19-6 28 15 14 34l-40 55c26 19 53 36 82 53a89 89 0 00115-20 1391 1391 0 00256-485l-188-188s-306 224-595 198z</StreamGeometry>
|
||||
<StreamGeometry x:Key="Icons.Clone">M1280 704c0 141-115 256-256 256H288C129 960 0 831 0 672c0-126 80-232 192-272A327 327 0 01192 384c0-177 143-320 320-320 119 0 222 64 277 160C820 204 857 192 896 192c106 0 192 86 192 192 0 24-5 48-13 69C1192 477 1280 580 1280 704zm-493-128H656V352c0-18-14-32-32-32h-96c-18 0-32 14-32 32v224h-131c-29 0-43 34-23 55l211 211c12 12 33 12 45 0l211-211c20-20 6-55-23-55z</StreamGeometry>
|
||||
<StreamGeometry x:Key="Icons.Code">M853 102H171C133 102 102 133 102 171v683C102 891 133 922 171 922h683C891 922 922 891 922 853V171C922 133 891 102 853 102zM390 600l-48 48L205 512l137-137 48 48L301 512l88 88zM465 819l-66-18L559 205l66 18L465 819zm218-171L634 600 723 512l-88-88 48-48L819 512 683 649z</StreamGeometry>
|
||||
<StreamGeometry x:Key="Icons.CodeBlock">M320 171A21 21 0 00299 192v213c0 49-32 85-61 107 30 22 61 58 61 107V832A21 21 0 00320 853h85v85H320A107 107 0 01213 832V619c0-11-8-26-32-42a157 157 0 00-33-17c-11-4-18-5-20-5v-85c2 0 9-1 20-5a157 157 0 0033-17c24-16 32-32 32-42V192A107 107 0 01320 85h85v85H320zm384 0h-85V85H704A107 107 0 01811 192v213c0 11 8 26 32 42 11 7 22 13 33 17 11 4 18 5 20 5v85c-2 0-9 1-20 5a157 157 0 00-33 17c-24 16-32 31-32 42V832A107 107 0 01704 939h-85v-85H704A21 21 0 00725 832V619c0-49 32-85 61-107-30-22-61-58-61-107V192A21 21 0 00704 171z</StreamGeometry>
|
||||
<StreamGeometry x:Key="Icons.CodeBlock">M684 736 340 736l0-53 344 1-0 53zM552 565l-213-2 0-53 212 2-0 53zM684 392 340 392l0-53 344 1-0 53zM301 825c-45 0-78-9-100-27-22-18-33-43-33-75v-116c0-22-4-37-12-45-7-9-20-13-40-13v-61c19 0 32-4 40-12 8-9 12-24 12-46v-116c0-32 11-57 33-75 22-18 56-27 100-27h24v61h-24a35 35 0 00-27 12 41 41 0 00-11 29v116c0 35-10 60-31 75a66 66 0 01-31 14c11 2 22 6 31 14 20 17 31 42 31 75v116c0 12 4 22 11 29 7 8 16 12 27 12h24v61h-24zM701 764h24c10 0 19-4 27-12a41 41 0 0011-29v-116c0-33 10-58 31-75 9-7 19-12 31-14a66 66 0 01-31-14c-20-15-31-40-31-75v-116a41 41 0 00-11-29 35 35 0 00-27-12h-24v-61h24c45 0 78 9 100 27 22 18 33 43 33 75v116c0 22 4 37 11 46 8 8 21 12 40 12v61c-19 0-33 4-40 13-7 8-11 23-11 45v116c0 32-11 57-33 75-22 18-55 27-100 27h-24v-61z</StreamGeometry>
|
||||
<StreamGeometry x:Key="Icons.ColorPicker">M128 854h768v86H128zM390 797c13 13 29 19 48 19s35-6 45-19l291-288c26-22 26-64 0-90L435 83l-61 61L426 192l-272 269c-22 22-22 64 0 90l237 246zm93-544 211 211-32 32H240l243-243zM707 694c0 48 38 86 86 86 48 0 86-38 86-86 0-22-10-45-26-61L794 576l-61 61c-13 13-26 35-26 58z</StreamGeometry>
|
||||
<StreamGeometry x:Key="Icons.Commit">M796 471A292 292 0 00512 256a293 293 0 00-284 215H0v144h228A293 293 0 00512 832a291 291 0 00284-217H1024V471h-228M512 688A146 146 0 01366 544A145 145 0 01512 400c80 0 146 63 146 144A146 146 0 01512 688</StreamGeometry>
|
||||
<StreamGeometry x:Key="Icons.Commit">M0 512M1024 512M512 0M512 1024M796 471A292 292 0 00512 256a293 293 0 00-284 215H0v144h228A293 293 0 00512 832a291 291 0 00284-217H1024V471h-228M512 688A146 146 0 01366 544A145 145 0 01512 400c80 0 146 63 146 144A146 146 0 01512 688</StreamGeometry>
|
||||
<StreamGeometry x:Key="Icons.CommitMessageGenerator">M796 561a5 5 0 014 7l-39 90a5 5 0 004 7h100a5 5 0 014 8l-178 247a5 5 0 01-9-4l32-148a5 5 0 00-5-6h-89a5 5 0 01-4-7l86-191a5 5 0 014-3h88zM731 122a73 73 0 0173 73v318a54 54 0 00-8-1H731V195H244v634h408l-16 73H244a73 73 0 01-73-73V195a73 73 0 0173-73h488zm-219 366v73h-195v-73h195zm146-146v73H317v-73h341z</StreamGeometry>
|
||||
<StreamGeometry x:Key="Icons.Compare">M645 448l64 64 220-221L704 64l-64 64 115 115H128v90h628zM375 576l-64-64-220 224L314 960l64-64-116-115H896v-90H262z</StreamGeometry>
|
||||
<StreamGeometry x:Key="Icons.Conflict">M608 0q48 0 88 23t63 63 23 87v70h55q35 0 67 14t57 38 38 57 14 67V831q0 34-14 66t-38 57-57 38-67 13H426q-34 0-66-13t-57-38-38-57-14-66v-70h-56q-34 0-66-14t-57-38-38-57-13-67V174q0-47 23-87T109 23 196 0h412m175 244H426q-46 0-86 22T278 328t-26 85v348H608q47 0 86-22t63-62 25-85l1-348m-269 318q18 0 31 13t13 31-13 31-31 13-31-13-13-31 13-31 31-13m0-212q13 0 22 9t11 22v125q0 14-9 23t-22 10-23-7-11-22l-1-126q0-13 10-23t23-10z</StreamGeometry>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
<x:String x:Key="Text.BranchCM.FetchInto" xml:space="preserve">Fetch ${0}$ into ${1}$...</x:String>
|
||||
<x:String x:Key="Text.BranchCM.Finish" xml:space="preserve">Git Flow - Finish ${0}$</x:String>
|
||||
<x:String x:Key="Text.BranchCM.Merge" xml:space="preserve">Merge ${0}$ into ${1}$...</x:String>
|
||||
<x:String x:Key="Text.BranchCM.MergeMultiBranches" xml:space="preserve">Merge selected {0} branches into current</x:String>
|
||||
<x:String x:Key="Text.BranchCM.Pull" xml:space="preserve">Pull ${0}$</x:String>
|
||||
<x:String x:Key="Text.BranchCM.PullInto" xml:space="preserve">Pull ${0}$ into ${1}$...</x:String>
|
||||
<x:String x:Key="Text.BranchCM.Push" xml:space="preserve">Push ${0}$</x:String>
|
||||
|
@ -101,7 +102,7 @@
|
|||
<x:String x:Key="Text.Clone.RemoteURL" xml:space="preserve">Repository URL:</x:String>
|
||||
<x:String x:Key="Text.Close" xml:space="preserve">CLOSE</x:String>
|
||||
<x:String x:Key="Text.CodeEditor" xml:space="preserve">Editor</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CherryPick" xml:space="preserve">Cherry-Pick This Commit</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CherryPick" xml:space="preserve">Cherry-Pick Commit</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CherryPickMultiple" xml:space="preserve">Cherry-Pick ...</x:String>
|
||||
<x:String x:Key="Text.CommitCM.Checkout" xml:space="preserve">Checkout Commit</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CompareWithHead" xml:space="preserve">Compare with HEAD</x:String>
|
||||
|
@ -109,14 +110,16 @@
|
|||
<x:String x:Key="Text.CommitCM.CopyInfo" xml:space="preserve">Copy Info</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CopySHA" xml:space="preserve">Copy SHA</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CustomAction" xml:space="preserve">Custom Action</x:String>
|
||||
<x:String x:Key="Text.CommitCM.InteractiveRebase" xml:space="preserve">Interactive Rebase ${0}$ to Here</x:String>
|
||||
<x:String x:Key="Text.CommitCM.Rebase" xml:space="preserve">Rebase ${0}$ to Here</x:String>
|
||||
<x:String x:Key="Text.CommitCM.InteractiveRebase" xml:space="preserve">Interactively Rebase ${0}$ on Here</x:String>
|
||||
<x:String x:Key="Text.CommitCM.Merge" xml:space="preserve">Merge to ${0}$</x:String>
|
||||
<x:String x:Key="Text.CommitCM.MergeMultiple" xml:space="preserve">Merge ...</x:String>
|
||||
<x:String x:Key="Text.CommitCM.Rebase" xml:space="preserve">Rebase ${0}$ on Here</x:String>
|
||||
<x:String x:Key="Text.CommitCM.Reset" xml:space="preserve">Reset ${0}$ to Here</x:String>
|
||||
<x:String x:Key="Text.CommitCM.Revert" xml:space="preserve">Revert Commit</x:String>
|
||||
<x:String x:Key="Text.CommitCM.Reword" xml:space="preserve">Reword</x:String>
|
||||
<x:String x:Key="Text.CommitCM.SaveAsPatch" xml:space="preserve">Save as Patch...</x:String>
|
||||
<x:String x:Key="Text.CommitCM.Squash" xml:space="preserve">Squash into Parent</x:String>
|
||||
<x:String x:Key="Text.CommitCM.SquashCommitsSinceThis" xml:space="preserve">Squash Child Commits to Here</x:String>
|
||||
<x:String x:Key="Text.CommitCM.SquashCommitsSinceThis" xml:space="preserve">Squash Children into Here</x:String>
|
||||
<x:String x:Key="Text.CommitDetail.Changes" xml:space="preserve">CHANGES</x:String>
|
||||
<x:String x:Key="Text.CommitDetail.Changes.Search" xml:space="preserve">Search Changes...</x:String>
|
||||
<x:String x:Key="Text.CommitDetail.Files" xml:space="preserve">FILES</x:String>
|
||||
|
@ -279,6 +282,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>
|
||||
|
@ -357,6 +361,7 @@
|
|||
<x:String x:Key="Text.Hotkeys" xml:space="preserve">Keyboard Shortcuts Reference</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global" xml:space="preserve">GLOBAL</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.CancelPopup" xml:space="preserve">Cancel current popup</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.Clone" xml:space="preserve">Clone new repository</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.CloseTab" xml:space="preserve">Close current page</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.GotoPrevTab" xml:space="preserve">Go to previous page</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.GotoNextTab" xml:space="preserve">Go to next page</x:String>
|
||||
|
@ -388,10 +393,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>
|
||||
|
@ -402,7 +411,11 @@
|
|||
<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>
|
||||
<x:String x:Key="Text.MergeMultiple.Targets" xml:space="preserve">Targets:</x:String>
|
||||
<x:String x:Key="Text.MoveRepositoryNode" xml:space="preserve">Move Repository Node</x:String>
|
||||
<x:String x:Key="Text.MoveRepositoryNode.Target" xml:space="preserve">Select parent node for:</x:String>
|
||||
<x:String x:Key="Text.Name" xml:space="preserve">Name:</x:String>
|
||||
|
@ -561,7 +574,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>
|
||||
|
@ -569,6 +581,7 @@
|
|||
<x:String x:Key="Text.Repository.Search.ByUser" xml:space="preserve">Author & 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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -357,6 +357,7 @@
|
|||
<x:String x:Key="Text.Hotkeys" xml:space="preserve">Riferimento Scorciatoie da Tastiera</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global" xml:space="preserve">GLOBALE</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.CancelPopup" xml:space="preserve">Annulla il popup corrente</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.Clone" xml:space="preserve">Clona una nuova repository</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.CloseTab" xml:space="preserve">Chiudi la pagina corrente</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.GotoPrevTab" xml:space="preserve">Vai alla pagina precedente</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.GotoNextTab" xml:space="preserve">Vai alla pagina successiva</x:String>
|
||||
|
@ -388,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>
|
||||
|
@ -402,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>
|
||||
|
@ -554,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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
<x:String x:Key="Text.BranchCM.FetchInto" xml:space="preserve">拉取(fetch) ${0}$ 至 ${1}$...</x:String>
|
||||
<x:String x:Key="Text.BranchCM.Finish" xml:space="preserve">GIT工作流 - 完成 ${0}$</x:String>
|
||||
<x:String x:Key="Text.BranchCM.Merge" xml:space="preserve">合并 ${0}$ 到 ${1}$...</x:String>
|
||||
<x:String x:Key="Text.BranchCM.MergeMultiBranches" xml:space="preserve">合并 {0} 个分支到当前分支</x:String>
|
||||
<x:String x:Key="Text.BranchCM.Pull" xml:space="preserve">拉回(pull) ${0}$</x:String>
|
||||
<x:String x:Key="Text.BranchCM.PullInto" xml:space="preserve">拉回(pull) ${0}$ 内容至 ${1}$...</x:String>
|
||||
<x:String x:Key="Text.BranchCM.Push" xml:space="preserve">推送(push)${0}$</x:String>
|
||||
|
@ -113,6 +114,8 @@
|
|||
<x:String x:Key="Text.CommitCM.CopySHA" xml:space="preserve">复制提交指纹</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CustomAction" xml:space="preserve">自定义操作</x:String>
|
||||
<x:String x:Key="Text.CommitCM.InteractiveRebase" xml:space="preserve">交互式变基(rebase -i) ${0}$ 到此处</x:String>
|
||||
<x:String x:Key="Text.CommitCM.Merge" xml:space="preserve">合并(merge)此提交至 ${0}$</x:String>
|
||||
<x:String x:Key="Text.CommitCM.MergeMultiple" xml:space="preserve">合并(merge)...</x:String>
|
||||
<x:String x:Key="Text.CommitCM.Rebase" xml:space="preserve">变基(rebase) ${0}$ 到此处</x:String>
|
||||
<x:String x:Key="Text.CommitCM.Reset" xml:space="preserve">重置(reset) ${0}$ 到此处</x:String>
|
||||
<x:String x:Key="Text.CommitCM.Revert" xml:space="preserve">回滚此提交</x:String>
|
||||
|
@ -282,6 +285,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>
|
||||
|
@ -360,6 +364,7 @@
|
|||
<x:String x:Key="Text.Hotkeys" xml:space="preserve">快捷键参考</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global" xml:space="preserve">全局快捷键</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.CancelPopup" xml:space="preserve">取消弹出面板</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.Clone" xml:space="preserve">克隆远程仓库</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.CloseTab" xml:space="preserve">关闭当前页面</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.GotoPrevTab" xml:space="preserve">切换到上一个页面</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.GotoNextTab" xml:space="preserve">切换到下一个页面</x:String>
|
||||
|
@ -391,10 +396,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>
|
||||
|
@ -405,7 +414,11 @@
|
|||
<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>
|
||||
<x:String x:Key="Text.MergeMultiple.Targets" 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>
|
||||
|
@ -565,7 +578,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>
|
||||
|
@ -573,6 +585,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>
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
<x:String x:Key="Text.BranchCM.FetchInto" xml:space="preserve">提取 (fetch) ${0}$ 到 ${1}$...</x:String>
|
||||
<x:String x:Key="Text.BranchCM.Finish" xml:space="preserve">Git 工作流 - 完成 ${0}$</x:String>
|
||||
<x:String x:Key="Text.BranchCM.Merge" xml:space="preserve">合併 ${0}$ 到 ${1}$...</x:String>
|
||||
<x:String x:Key="Text.BranchCM.MergeMultiBranches" xml:space="preserve">合併 {0} 個分支到目前分支</x:String>
|
||||
<x:String x:Key="Text.BranchCM.Pull" xml:space="preserve">拉取 (pull) ${0}$</x:String>
|
||||
<x:String x:Key="Text.BranchCM.PullInto" xml:space="preserve">拉取 (pull) ${0}$ 內容至 ${1}$...</x:String>
|
||||
<x:String x:Key="Text.BranchCM.Push" xml:space="preserve">推送 (push) ${0}$</x:String>
|
||||
|
@ -113,6 +114,8 @@
|
|||
<x:String x:Key="Text.CommitCM.CopySHA" xml:space="preserve">複製提交編號</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CustomAction" xml:space="preserve">自訂動作</x:String>
|
||||
<x:String x:Key="Text.CommitCM.InteractiveRebase" xml:space="preserve">互動式重定基底 (rebase -i) ${0}$ 到此處</x:String>
|
||||
<x:String x:Key="Text.CommitCM.Merge" xml:space="preserve">合併 (merge) 此提交到 ${0}$</x:String>
|
||||
<x:String x:Key="Text.CommitCM.MergeMultiple" xml:space="preserve">合併 (merge)...</x:String>
|
||||
<x:String x:Key="Text.CommitCM.Rebase" xml:space="preserve">重定基底 (rebase) ${0}$ 到此處</x:String>
|
||||
<x:String x:Key="Text.CommitCM.Reset" xml:space="preserve">重設 (reset) ${0}$ 到此處</x:String>
|
||||
<x:String x:Key="Text.CommitCM.Revert" xml:space="preserve">復原此提交</x:String>
|
||||
|
@ -282,6 +285,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>
|
||||
|
@ -360,6 +364,7 @@
|
|||
<x:String x:Key="Text.Hotkeys" xml:space="preserve">快速鍵參考</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global" xml:space="preserve">全域快速鍵</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.CancelPopup" xml:space="preserve">取消彈出面板</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.Clone" xml:space="preserve">複製 (clone) 遠端存放庫</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.CloseTab" xml:space="preserve">關閉目前頁面</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.GotoPrevTab" xml:space="preserve">切換到上一個頁面</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.GotoNextTab" xml:space="preserve">切換到下一個頁面</x:String>
|
||||
|
@ -391,10 +396,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>
|
||||
|
@ -405,7 +414,11 @@
|
|||
<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>
|
||||
<x:String x:Key="Text.MergeMultiple.Targets" 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>
|
||||
|
@ -564,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>
|
||||
|
@ -572,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>
|
||||
|
|
|
@ -72,10 +72,9 @@ namespace SourceGit.ViewModels
|
|||
|
||||
return Task.Run(() =>
|
||||
{
|
||||
var succ = false;
|
||||
if (IsMergeCommit)
|
||||
{
|
||||
succ = new Commands.CherryPick(
|
||||
new Commands.CherryPick(
|
||||
_repo.FullPath,
|
||||
Targets[0].SHA,
|
||||
!AutoCommit,
|
||||
|
@ -84,7 +83,7 @@ namespace SourceGit.ViewModels
|
|||
}
|
||||
else
|
||||
{
|
||||
succ = new Commands.CherryPick(
|
||||
new Commands.CherryPick(
|
||||
_repo.FullPath,
|
||||
string.Join(' ', Targets.ConvertAll(c => c.SHA)),
|
||||
!AutoCommit,
|
||||
|
@ -93,7 +92,7 @@ namespace SourceGit.ViewModels
|
|||
}
|
||||
|
||||
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
||||
return succ;
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
78
src/ViewModels/Conflict.cs
Normal file
78
src/ViewModels/Conflict.cs
Normal file
|
@ -0,0 +1,78 @@
|
|||
namespace SourceGit.ViewModels
|
||||
{
|
||||
public class Conflict
|
||||
{
|
||||
public object Theirs
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public object Mine
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public bool IsResolved
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public Conflict(Repository repo, WorkingCopy wc, Models.Change change)
|
||||
{
|
||||
_wc = wc;
|
||||
_change = change;
|
||||
|
||||
IsResolved = new Commands.IsConflictResolved(repo.FullPath, change).ReadToEnd().IsSuccess;
|
||||
|
||||
var context = wc.InProgressContext;
|
||||
if (context is CherryPickInProgress cherryPick)
|
||||
{
|
||||
Theirs = cherryPick.Head;
|
||||
Mine = repo.CurrentBranch;
|
||||
}
|
||||
else if (context is RebaseInProgress rebase)
|
||||
{
|
||||
Theirs = repo.Branches.Find(x => x.IsLocal && x.Name == rebase.HeadName) ??
|
||||
new Models.Branch()
|
||||
{
|
||||
IsLocal = true,
|
||||
Name = rebase.HeadName,
|
||||
FullName = $"refs/heads/{rebase.HeadName}"
|
||||
};
|
||||
|
||||
Mine = rebase.Onto;
|
||||
}
|
||||
else if (context is RevertInProgress revert)
|
||||
{
|
||||
Theirs = revert.Head;
|
||||
Mine = repo.CurrentBranch;
|
||||
}
|
||||
else if (context is MergeInProgress merge)
|
||||
{
|
||||
Theirs = merge.Source;
|
||||
Mine = repo.CurrentBranch;
|
||||
}
|
||||
}
|
||||
|
||||
public void UseTheirs()
|
||||
{
|
||||
_wc.UseTheirs([_change]);
|
||||
}
|
||||
|
||||
public void UseMine()
|
||||
{
|
||||
_wc.UseMine([_change]);
|
||||
}
|
||||
|
||||
public void OpenExternalMergeTool()
|
||||
{
|
||||
_wc.UseExternalMergeTool(_change);
|
||||
}
|
||||
|
||||
private WorkingCopy _wc = null;
|
||||
private Models.Change _change = null;
|
||||
}
|
||||
}
|
|
@ -228,22 +228,28 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
var selected = new List<Models.Commit>();
|
||||
var canCherryPick = true;
|
||||
var canMerge = true;
|
||||
|
||||
foreach (var item in list.SelectedItems)
|
||||
{
|
||||
if (item is Models.Commit c)
|
||||
{
|
||||
selected.Add(c);
|
||||
|
||||
if (c.IsMerged || c.Parents.Count > 1)
|
||||
if (c.IsMerged)
|
||||
{
|
||||
canMerge = false;
|
||||
canCherryPick = false;
|
||||
}
|
||||
else if (c.Parents.Count > 1)
|
||||
{
|
||||
canCherryPick = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sort selected commits in order.
|
||||
selected.Sort((l, r) =>
|
||||
{
|
||||
return _commits.IndexOf(r) - _commits.IndexOf(l);
|
||||
});
|
||||
selected.Sort((l, r) => _commits.IndexOf(r) - _commits.IndexOf(l));
|
||||
|
||||
var multipleMenu = new ContextMenu();
|
||||
|
||||
|
@ -259,9 +265,25 @@ namespace SourceGit.ViewModels
|
|||
e.Handled = true;
|
||||
};
|
||||
multipleMenu.Items.Add(cherryPickMultiple);
|
||||
multipleMenu.Items.Add(new MenuItem() { Header = "-" });
|
||||
}
|
||||
|
||||
if (canMerge)
|
||||
{
|
||||
var mergeMultiple = new MenuItem();
|
||||
mergeMultiple.Header = App.Text("CommitCM.MergeMultiple");
|
||||
mergeMultiple.Icon = App.CreateMenuIcon("Icons.Merge");
|
||||
mergeMultiple.Click += (_, e) =>
|
||||
{
|
||||
if (PopupHost.CanCreatePopup())
|
||||
PopupHost.ShowPopup(new MergeMultiple(_repo, selected));
|
||||
e.Handled = true;
|
||||
};
|
||||
multipleMenu.Items.Add(mergeMultiple);
|
||||
}
|
||||
|
||||
if (canCherryPick || canMerge)
|
||||
multipleMenu.Items.Add(new MenuItem() { Header = "-" });
|
||||
|
||||
var saveToPatchMultiple = new MenuItem();
|
||||
saveToPatchMultiple.Icon = App.CreateMenuIcon("Icons.Diff");
|
||||
saveToPatchMultiple.Header = App.Text("CommitCM.SaveAsPatch");
|
||||
|
@ -385,24 +407,26 @@ namespace SourceGit.ViewModels
|
|||
};
|
||||
menu.Items.Add(reset);
|
||||
|
||||
var squash = new MenuItem();
|
||||
squash.Header = App.Text("CommitCM.SquashCommitsSinceThis");
|
||||
squash.Icon = App.CreateMenuIcon("Icons.SquashIntoParent");
|
||||
squash.IsVisible = commit.IsMerged;
|
||||
squash.Click += (_, e) =>
|
||||
if (commit.IsMerged)
|
||||
{
|
||||
if (_repo.LocalChangesCount > 0)
|
||||
var squash = new MenuItem();
|
||||
squash.Header = App.Text("CommitCM.SquashCommitsSinceThis");
|
||||
squash.Icon = App.CreateMenuIcon("Icons.SquashIntoParent");
|
||||
squash.Click += (_, e) =>
|
||||
{
|
||||
App.RaiseException(_repo.FullPath, "You have local changes. Please run stash or discard first.");
|
||||
return;
|
||||
}
|
||||
if (_repo.LocalChangesCount > 0)
|
||||
{
|
||||
App.RaiseException(_repo.FullPath, "You have local changes. Please run stash or discard first.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (PopupHost.CanCreatePopup())
|
||||
PopupHost.ShowPopup(new Squash(_repo, commit, commit.SHA));
|
||||
if (PopupHost.CanCreatePopup())
|
||||
PopupHost.ShowPopup(new Squash(_repo, commit, commit.SHA));
|
||||
|
||||
e.Handled = true;
|
||||
};
|
||||
menu.Items.Add(squash);
|
||||
e.Handled = true;
|
||||
};
|
||||
menu.Items.Add(squash);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -460,6 +484,21 @@ namespace SourceGit.ViewModels
|
|||
};
|
||||
menu.Items.Add(rebase);
|
||||
|
||||
if (!commit.HasDecorators)
|
||||
{
|
||||
var merge = new MenuItem();
|
||||
merge.Header = new Views.NameHighlightedTextBlock("CommitCM.Merge", current.Name);
|
||||
merge.Icon = App.CreateMenuIcon("Icons.Merge");
|
||||
merge.Click += (_, e) =>
|
||||
{
|
||||
if (PopupHost.CanCreatePopup())
|
||||
PopupHost.ShowPopup(new Merge(_repo, commit, current.Name));
|
||||
|
||||
e.Handled = true;
|
||||
};
|
||||
menu.Items.Add(merge);
|
||||
}
|
||||
|
||||
var cherryPick = new MenuItem();
|
||||
cherryPick.Header = App.Text("CommitCM.CherryPick");
|
||||
cherryPick.Icon = App.CreateMenuIcon("Icons.CherryPick");
|
||||
|
@ -504,27 +543,6 @@ namespace SourceGit.ViewModels
|
|||
e.Handled = true;
|
||||
};
|
||||
menu.Items.Add(revert);
|
||||
|
||||
var interactiveRebase = new MenuItem();
|
||||
interactiveRebase.Header = new Views.NameHighlightedTextBlock("CommitCM.InteractiveRebase", current.Name);
|
||||
interactiveRebase.Icon = App.CreateMenuIcon("Icons.InteractiveRebase");
|
||||
interactiveRebase.IsVisible = current.Head != commit.SHA;
|
||||
interactiveRebase.Click += (_, e) =>
|
||||
{
|
||||
if (_repo.LocalChangesCount > 0)
|
||||
{
|
||||
App.RaiseException(_repo.FullPath, "You have local changes. Please run stash or discard first.");
|
||||
return;
|
||||
}
|
||||
|
||||
App.OpenDialog(new Views.InteractiveRebase()
|
||||
{
|
||||
DataContext = new InteractiveRebase(_repo, current, commit)
|
||||
});
|
||||
|
||||
e.Handled = true;
|
||||
};
|
||||
menu.Items.Add(interactiveRebase);
|
||||
}
|
||||
|
||||
if (current.Head != commit.SHA)
|
||||
|
@ -543,6 +561,30 @@ namespace SourceGit.ViewModels
|
|||
|
||||
menu.Items.Add(new MenuItem() { Header = "-" });
|
||||
|
||||
if (commit.IsMerged && current.Head != commit.SHA)
|
||||
{
|
||||
var interactiveRebase = new MenuItem();
|
||||
interactiveRebase.Header = new Views.NameHighlightedTextBlock("CommitCM.InteractiveRebase", current.Name);
|
||||
interactiveRebase.Icon = App.CreateMenuIcon("Icons.InteractiveRebase");
|
||||
interactiveRebase.Click += (_, e) =>
|
||||
{
|
||||
if (_repo.LocalChangesCount > 0)
|
||||
{
|
||||
App.RaiseException(_repo.FullPath, "You have local changes. Please run stash or discard first.");
|
||||
return;
|
||||
}
|
||||
|
||||
App.OpenDialog(new Views.InteractiveRebase()
|
||||
{
|
||||
DataContext = new InteractiveRebase(_repo, current, commit)
|
||||
});
|
||||
|
||||
e.Handled = true;
|
||||
};
|
||||
menu.Items.Add(interactiveRebase);
|
||||
menu.Items.Add(new MenuItem() { Header = "-" });
|
||||
}
|
||||
|
||||
if (current.Head != commit.SHA)
|
||||
{
|
||||
var compareWithHead = new MenuItem();
|
||||
|
@ -825,8 +867,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);
|
||||
|
@ -921,7 +968,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);
|
||||
|
@ -1005,7 +1052,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;
|
||||
};
|
||||
|
||||
|
@ -1064,7 +1111,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);
|
||||
|
|
|
@ -4,31 +4,29 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
public abstract class InProgressContext
|
||||
{
|
||||
public string Repository
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string Cmd
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public InProgressContext(string repo, string cmd)
|
||||
{
|
||||
Repository = repo;
|
||||
Cmd = cmd;
|
||||
_repo = repo;
|
||||
_cmd = cmd;
|
||||
}
|
||||
|
||||
public bool Abort()
|
||||
{
|
||||
return new Commands.Command()
|
||||
{
|
||||
WorkingDirectory = Repository,
|
||||
Context = Repository,
|
||||
Args = $"{Cmd} --abort",
|
||||
WorkingDirectory = _repo,
|
||||
Context = _repo,
|
||||
Args = $"{_cmd} --abort",
|
||||
}.Exec();
|
||||
}
|
||||
|
||||
public virtual bool Skip()
|
||||
{
|
||||
return new Commands.Command()
|
||||
{
|
||||
WorkingDirectory = _repo,
|
||||
Context = _repo,
|
||||
Args = $"{_cmd} --skip",
|
||||
}.Exec();
|
||||
}
|
||||
|
||||
|
@ -36,32 +34,96 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
return new Commands.Command()
|
||||
{
|
||||
WorkingDirectory = Repository,
|
||||
Context = Repository,
|
||||
WorkingDirectory = _repo,
|
||||
Context = _repo,
|
||||
Editor = Commands.Command.EditorType.None,
|
||||
Args = $"{Cmd} --continue",
|
||||
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);
|
||||
}
|
||||
|
||||
protected string _repo = string.Empty;
|
||||
protected string _cmd = string.Empty;
|
||||
}
|
||||
|
||||
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")
|
||||
{
|
||||
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 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")
|
||||
{
|
||||
_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()
|
||||
{
|
||||
var succ = new Commands.Command()
|
||||
{
|
||||
WorkingDirectory = Repository,
|
||||
Context = Repository,
|
||||
WorkingDirectory = _repo,
|
||||
Context = _repo,
|
||||
Editor = Commands.Command.EditorType.RebaseEditor,
|
||||
Args = $"rebase --continue",
|
||||
}.Exec();
|
||||
|
@ -90,11 +152,49 @@ 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")
|
||||
{
|
||||
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")
|
||||
{
|
||||
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 };
|
||||
}
|
||||
|
||||
public override bool Skip()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
public class Merge : Popup
|
||||
{
|
||||
public string Source
|
||||
public object Source
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
@ -21,9 +21,33 @@ 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.Commit source, string into)
|
||||
{
|
||||
_repo = repo;
|
||||
_sourceName = source.SHA;
|
||||
|
||||
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 +57,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 +83,6 @@ namespace SourceGit.ViewModels
|
|||
}
|
||||
|
||||
private readonly Repository _repo = null;
|
||||
private readonly string _sourceName = string.Empty;
|
||||
}
|
||||
}
|
||||
|
|
93
src/ViewModels/MergeMultiple.cs
Normal file
93
src/ViewModels/MergeMultiple.cs
Normal file
|
@ -0,0 +1,93 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SourceGit.ViewModels
|
||||
{
|
||||
public class MergeMultiple : Popup
|
||||
{
|
||||
public List<object> Targets
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
} = [];
|
||||
|
||||
public bool AutoCommit
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public Models.MergeStrategy Strategy
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public MergeMultiple(Repository repo, List<Models.Commit> commits)
|
||||
{
|
||||
_repo = repo;
|
||||
Targets.AddRange(commits);
|
||||
AutoCommit = true;
|
||||
Strategy = Models.MergeStrategy.ForMultiple[0];
|
||||
View = new Views.MergeMultiple() { DataContext = this };
|
||||
}
|
||||
|
||||
public MergeMultiple(Repository repo, List<Models.Branch> branches)
|
||||
{
|
||||
_repo = repo;
|
||||
Targets.AddRange(branches);
|
||||
AutoCommit = true;
|
||||
Strategy = Models.MergeStrategy.ForMultiple[0];
|
||||
View = new Views.MergeMultiple() { DataContext = this };
|
||||
}
|
||||
|
||||
public override Task<bool> Sure()
|
||||
{
|
||||
_repo.SetWatcherEnabled(false);
|
||||
ProgressDescription = "Merge head(s) ...";
|
||||
|
||||
return Task.Run(() =>
|
||||
{
|
||||
var succ = new Commands.Merge(
|
||||
_repo.FullPath,
|
||||
ConvertTargetToMergeSources(),
|
||||
AutoCommit,
|
||||
Strategy.Arg,
|
||||
SetProgressDescription).Exec();
|
||||
|
||||
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
||||
return succ;
|
||||
});
|
||||
}
|
||||
|
||||
private List<string> ConvertTargetToMergeSources()
|
||||
{
|
||||
var ret = new List<string>();
|
||||
foreach (var t in Targets)
|
||||
{
|
||||
if (t is Models.Branch branch)
|
||||
{
|
||||
ret.Add(branch.FriendlyName);
|
||||
}
|
||||
else if (t is Models.Commit commit)
|
||||
{
|
||||
var d = commit.Decorators.Find(x =>
|
||||
{
|
||||
return x.Type == Models.DecoratorType.LocalBranchHead ||
|
||||
x.Type == Models.DecoratorType.RemoteBranchHead ||
|
||||
x.Type == Models.DecoratorType.Tag;
|
||||
});
|
||||
|
||||
if (d != null)
|
||||
ret.Add(d.Name);
|
||||
else
|
||||
ret.Add(commit.SHA);
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
private readonly Repository _repo = null;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -764,10 +764,9 @@ namespace SourceGit.ViewModels
|
|||
_workingCopy?.StashAll(autoStart);
|
||||
}
|
||||
|
||||
public void GotoResolve()
|
||||
public void SkipMerge()
|
||||
{
|
||||
if (_workingCopy != null)
|
||||
SelectedViewIndex = 1;
|
||||
_workingCopy?.SkipMerge();
|
||||
}
|
||||
|
||||
public void AbortMerge()
|
||||
|
@ -950,6 +949,12 @@ namespace SourceGit.ViewModels
|
|||
PopupHost.ShowPopup(new DeleteMultipleBranches(this, branches, isLocal));
|
||||
}
|
||||
|
||||
public void MergeMultipleBranches(List<Models.Branch> branches)
|
||||
{
|
||||
if (PopupHost.CanCreatePopup())
|
||||
PopupHost.ShowPopup(new MergeMultiple(this, branches));
|
||||
}
|
||||
|
||||
public void CreateNewTag()
|
||||
{
|
||||
if (_currentBranch == null)
|
||||
|
@ -1305,8 +1310,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;
|
||||
};
|
||||
|
||||
|
@ -1385,7 +1395,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;
|
||||
};
|
||||
|
||||
|
@ -1681,7 +1691,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;
|
||||
};
|
||||
|
||||
|
|
|
@ -31,9 +31,9 @@ namespace SourceGit.ViewModels
|
|||
|
||||
return Task.Run(() =>
|
||||
{
|
||||
var succ = new Commands.Revert(_repo.FullPath, Target.SHA, AutoCommit).Exec();
|
||||
new Commands.Revert(_repo.FullPath, Target.SHA, AutoCommit).Exec();
|
||||
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
||||
return succ;
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -119,9 +119,9 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
var defaultCloneDir = Preference.Instance.GitDefaultCloneDir;
|
||||
if (string.IsNullOrEmpty(defaultCloneDir))
|
||||
App.RaiseException(PopupHost.Active.GetId(), "The default clone dir haven't been configured!");
|
||||
App.RaiseException(PopupHost.Active.GetId(), "The default clone dir hasn't been configured!");
|
||||
else if (!Directory.Exists(defaultCloneDir))
|
||||
App.RaiseException(PopupHost.Active.GetId(), $"The default clone dir '{defaultCloneDir}' is not exists!");
|
||||
App.RaiseException(PopupHost.Active.GetId(), $"The default clone dir '{defaultCloneDir}' does not exist!");
|
||||
else if (PopupHost.CanCreatePopup())
|
||||
PopupHost.ShowAndStartPopup(new ScanRepositories(defaultCloneDir));
|
||||
}
|
||||
|
|
|
@ -11,26 +11,6 @@ using CommunityToolkit.Mvvm.ComponentModel;
|
|||
|
||||
namespace SourceGit.ViewModels
|
||||
{
|
||||
public class ConflictContext : ObservableObject
|
||||
{
|
||||
public bool IsResolved
|
||||
{
|
||||
get => _isResolved;
|
||||
set => SetProperty(ref _isResolved, value);
|
||||
}
|
||||
|
||||
public ConflictContext(string repo, Models.Change change)
|
||||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
var result = new Commands.IsConflictResolved(repo, change).ReadToEnd().IsSuccess;
|
||||
Dispatcher.UIThread.Post(() => IsResolved = result);
|
||||
});
|
||||
}
|
||||
|
||||
private bool _isResolved = false;
|
||||
}
|
||||
|
||||
public class WorkingCopy : ObservableObject
|
||||
{
|
||||
public bool IncludeUntracked
|
||||
|
@ -49,11 +29,7 @@ namespace SourceGit.ViewModels
|
|||
public bool CanCommitWithPush
|
||||
{
|
||||
get => _canCommitWithPush;
|
||||
set
|
||||
{
|
||||
if (SetProperty(ref _canCommitWithPush, value))
|
||||
OnPropertyChanged(nameof(IsCommitWithPushVisible));
|
||||
}
|
||||
set => SetProperty(ref _canCommitWithPush, value);
|
||||
}
|
||||
|
||||
public bool HasUnsolvedConflicts
|
||||
|
@ -109,16 +85,10 @@ namespace SourceGit.ViewModels
|
|||
|
||||
Staged = GetStagedChanges();
|
||||
SelectedStaged = [];
|
||||
OnPropertyChanged(nameof(IsCommitWithPushVisible));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsCommitWithPushVisible
|
||||
{
|
||||
get => !UseAmend && CanCommitWithPush;
|
||||
}
|
||||
|
||||
public List<Models.Change> Unstaged
|
||||
{
|
||||
get => _unstaged;
|
||||
|
@ -237,13 +207,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 +280,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;
|
||||
|
||||
|
@ -440,6 +410,54 @@ namespace SourceGit.ViewModels
|
|||
}
|
||||
}
|
||||
|
||||
public async void UseTheirs(List<Models.Change> changes)
|
||||
{
|
||||
var files = new List<string>();
|
||||
foreach (var change in changes)
|
||||
{
|
||||
if (change.IsConflit)
|
||||
files.Add(change.Path);
|
||||
}
|
||||
|
||||
_repo.SetWatcherEnabled(false);
|
||||
var succ = await Task.Run(() => new Commands.Checkout(_repo.FullPath).UseTheirs(files));
|
||||
if (succ)
|
||||
{
|
||||
await Task.Run(() => new Commands.Add(_repo.FullPath, changes).Exec());
|
||||
}
|
||||
_repo.MarkWorkingCopyDirtyManually();
|
||||
_repo.SetWatcherEnabled(true);
|
||||
}
|
||||
|
||||
public async void UseMine(List<Models.Change> changes)
|
||||
{
|
||||
var files = new List<string>();
|
||||
foreach (var change in changes)
|
||||
{
|
||||
if (change.IsConflit)
|
||||
files.Add(change.Path);
|
||||
}
|
||||
|
||||
_repo.SetWatcherEnabled(false);
|
||||
var succ = await Task.Run(() => new Commands.Checkout(_repo.FullPath).UseMine(files));
|
||||
if (succ)
|
||||
{
|
||||
await Task.Run(() => new Commands.Add(_repo.FullPath, changes).Exec());
|
||||
}
|
||||
_repo.MarkWorkingCopyDirtyManually();
|
||||
_repo.SetWatcherEnabled(true);
|
||||
}
|
||||
|
||||
public async void UseExternalMergeTool(Models.Change change)
|
||||
{
|
||||
var toolType = Preference.Instance.ExternalMergeToolType;
|
||||
var toolPath = Preference.Instance.ExternalMergeToolPath;
|
||||
|
||||
_repo.SetWatcherEnabled(false);
|
||||
await Task.Run(() => Commands.MergeTool.OpenForMerge(_repo.FullPath, toolType, toolPath, change.Path));
|
||||
_repo.SetWatcherEnabled(true);
|
||||
}
|
||||
|
||||
public void ContinueMerge()
|
||||
{
|
||||
if (_inProgressContext != null)
|
||||
|
@ -463,6 +481,29 @@ namespace SourceGit.ViewModels
|
|||
}
|
||||
}
|
||||
|
||||
public void SkipMerge()
|
||||
{
|
||||
if (_inProgressContext != null)
|
||||
{
|
||||
_repo.SetWatcherEnabled(false);
|
||||
Task.Run(() =>
|
||||
{
|
||||
var succ = _inProgressContext.Skip();
|
||||
Dispatcher.UIThread.Invoke(() =>
|
||||
{
|
||||
if (succ)
|
||||
CommitMessage = string.Empty;
|
||||
|
||||
_repo.SetWatcherEnabled(true);
|
||||
});
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
_repo.MarkWorkingCopyDirtyManually();
|
||||
}
|
||||
}
|
||||
|
||||
public void AbortMerge()
|
||||
{
|
||||
if (_inProgressContext != null)
|
||||
|
@ -569,8 +610,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 +955,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;
|
||||
|
@ -1395,59 +1479,11 @@ namespace SourceGit.ViewModels
|
|||
if (change == null)
|
||||
DetailContext = null;
|
||||
else if (change.IsConflit && isUnstaged)
|
||||
DetailContext = new ConflictContext(_repo.FullPath, change);
|
||||
DetailContext = new Conflict(_repo, this, change);
|
||||
else
|
||||
DetailContext = new DiffContext(_repo.FullPath, new Models.DiffOption(change, isUnstaged), _detailContext as DiffContext);
|
||||
}
|
||||
|
||||
private async void UseTheirs(List<Models.Change> changes)
|
||||
{
|
||||
var files = new List<string>();
|
||||
foreach (var change in changes)
|
||||
{
|
||||
if (change.IsConflit)
|
||||
files.Add(change.Path);
|
||||
}
|
||||
|
||||
_repo.SetWatcherEnabled(false);
|
||||
var succ = await Task.Run(() => new Commands.Checkout(_repo.FullPath).UseTheirs(files));
|
||||
if (succ)
|
||||
{
|
||||
await Task.Run(() => new Commands.Add(_repo.FullPath, changes).Exec());
|
||||
}
|
||||
_repo.MarkWorkingCopyDirtyManually();
|
||||
_repo.SetWatcherEnabled(true);
|
||||
}
|
||||
|
||||
private async void UseMine(List<Models.Change> changes)
|
||||
{
|
||||
var files = new List<string>();
|
||||
foreach (var change in changes)
|
||||
{
|
||||
if (change.IsConflit)
|
||||
files.Add(change.Path);
|
||||
}
|
||||
|
||||
_repo.SetWatcherEnabled(false);
|
||||
var succ = await Task.Run(() => new Commands.Checkout(_repo.FullPath).UseMine(files));
|
||||
if (succ)
|
||||
{
|
||||
await Task.Run(() => new Commands.Add(_repo.FullPath, changes).Exec());
|
||||
}
|
||||
_repo.MarkWorkingCopyDirtyManually();
|
||||
_repo.SetWatcherEnabled(true);
|
||||
}
|
||||
|
||||
private async void UseExternalMergeTool(Models.Change change)
|
||||
{
|
||||
var toolType = Preference.Instance.ExternalMergeToolType;
|
||||
var toolPath = Preference.Instance.ExternalMergeToolPath;
|
||||
|
||||
_repo.SetWatcherEnabled(false);
|
||||
await Task.Run(() => Commands.MergeTool.OpenForMerge(_repo.FullPath, toolType, toolPath, change.Path));
|
||||
_repo.SetWatcherEnabled(true);
|
||||
}
|
||||
|
||||
private void DoCommit(bool autoStage, bool autoPush, bool allowEmpty)
|
||||
{
|
||||
if (!PopupHost.CanCreatePopup())
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
<DataTemplate DataType="m:Commit">
|
||||
<Grid ColumnDefinitions="Auto,Auto,*">
|
||||
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
||||
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
|
||||
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
|
||||
</Grid>
|
||||
|
|
|
@ -405,6 +405,17 @@ namespace SourceGit.Views
|
|||
ev.Handled = true;
|
||||
};
|
||||
menu.Items.Add(deleteMulti);
|
||||
|
||||
var mergeMulti = new MenuItem();
|
||||
mergeMulti.Header = App.Text("BranchCM.MergeMultiBranches", branches.Count);
|
||||
mergeMulti.Icon = App.CreateMenuIcon("Icons.Merge");
|
||||
mergeMulti.Click += (_, ev) =>
|
||||
{
|
||||
repo.MergeMultipleBranches(branches);
|
||||
ev.Handled = true;
|
||||
};
|
||||
menu.Items.Add(mergeMulti);
|
||||
|
||||
menu?.Open(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
Margin="0,0,8,0"
|
||||
Text="{DynamicResource Text.Checkout.Commit.Target}" />
|
||||
<Grid Grid.Row="0" Grid.Column="1" ColumnDefinitions="Auto,Auto,*">
|
||||
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}" />
|
||||
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}" />
|
||||
<TextBlock Grid.Column="1" Classes="primary" Foreground="DarkOrange" VerticalAlignment="Center" Margin="8,0" Text="{Binding Commit.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" />
|
||||
<TextBlock Grid.Column="2" Text="{Binding Commit.Subject}" TextTrimming="CharacterEllipsis"/>
|
||||
</Grid>
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="m:Commit">
|
||||
<Grid ColumnDefinitions="14,Auto,*">
|
||||
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
||||
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
|
||||
<TextBlock Grid.Column="1" FontFamily="{DynamicResource Fonts.Monospace}" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="6,0,4,0"/>
|
||||
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" TextTrimming="CharacterEllipsis"/>
|
||||
</Grid>
|
||||
|
|
|
@ -112,7 +112,8 @@
|
|||
Cursor="Hand"
|
||||
Margin="0,0,16,0"
|
||||
PointerEntered="OnSHAPointerEntered"
|
||||
PointerPressed="OnSHAPressed">
|
||||
PointerPressed="OnSHAPressed"
|
||||
ToolTip.ShowDelay="0">
|
||||
<TextBlock.DataTemplates>
|
||||
<DataTemplate DataType="m:Commit">
|
||||
<StackPanel MinWidth="400" Orientation="Vertical">
|
||||
|
@ -149,7 +150,8 @@
|
|||
Cursor="Hand"
|
||||
Margin="0,0,16,0"
|
||||
PointerEntered="OnSHAPointerEntered"
|
||||
PointerPressed="OnSHAPressed">
|
||||
PointerPressed="OnSHAPressed"
|
||||
ToolTip.ShowDelay="0">
|
||||
<TextBlock.DataTemplates>
|
||||
<DataTemplate DataType="m:Commit">
|
||||
<StackPanel MinWidth="400" Orientation="Vertical">
|
||||
|
|
|
@ -130,19 +130,15 @@ namespace SourceGit.Views
|
|||
{
|
||||
var tooltip = ToolTip.GetTip(ctl);
|
||||
if (tooltip is Models.Commit commit && commit.SHA == sha)
|
||||
{
|
||||
ToolTip.SetIsOpen(ctl, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
var c = await Task.Run(() => detail.GetParent(sha));
|
||||
if (c != null && ctl.IsVisible && ctl.DataContext is string newSHA && newSHA == sha)
|
||||
{
|
||||
ToolTip.SetTip(ctl, c);
|
||||
return;
|
||||
|
||||
if (ctl.IsPointerOver)
|
||||
ToolTip.SetIsOpen(ctl, true);
|
||||
}
|
||||
var c = await Task.Run(() => detail.GetParent(sha));
|
||||
if (c != null && ctl.IsVisible && ctl.DataContext is string newSHA && newSHA == sha)
|
||||
{
|
||||
ToolTip.SetTip(ctl, c);
|
||||
|
||||
if (ctl.IsPointerOver)
|
||||
ToolTip.SetIsOpen(ctl, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ namespace SourceGit.Views
|
|||
if (change.Property == TextProperty && _changingWay == TextChangeWay.None)
|
||||
{
|
||||
_changingWay = TextChangeWay.FromSource;
|
||||
var normalized = Text.ReplaceLineEndings("\n").Trim();
|
||||
var normalized = Text.ReplaceLineEndings("\n");
|
||||
var subjectEnd = normalized.IndexOf("\n\n", StringComparison.Ordinal);
|
||||
if (subjectEnd == -1)
|
||||
{
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
<DataTemplate DataType="m:Commit">
|
||||
<Grid ColumnDefinitions="Auto,Auto,*">
|
||||
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
||||
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
|
||||
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
|
||||
</Grid>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
<DataTemplate DataType="m:Commit">
|
||||
<Grid ColumnDefinitions="Auto,Auto,*">
|
||||
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
||||
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
|
||||
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
|
||||
</Grid>
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
FontSize="{Binding Source={x:Static vm:Preference.Instance}, Path=DefaultFontSize, Converter={x:Static c:DoubleConverters.Increase}}"
|
||||
Margin="0,0,0,8"/>
|
||||
|
||||
<Grid RowDefinitions="20,20,20,20,20,20" ColumnDefinitions="150,*">
|
||||
<Grid RowDefinitions="20,20,20,20,20,20,20" ColumnDefinitions="150,*">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Classes="primary bold" Text="{OnPlatform Ctrl+Shift+P, macOS=⌘+\,}"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Global.OpenPreference}"/>
|
||||
|
||||
|
@ -61,8 +61,11 @@
|
|||
<TextBlock Grid.Row="4" Grid.Column="0" Classes="primary bold" Text="{OnPlatform Ctrl+Tab, macOS=⌘+⌥+→}"/>
|
||||
<TextBlock Grid.Row="4" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Global.GotoNextTab}" />
|
||||
|
||||
<TextBlock Grid.Row="5" Grid.Column="0" Classes="primary bold" Text="ESC"/>
|
||||
<TextBlock Grid.Row="5" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Global.CancelPopup}" />
|
||||
<TextBlock Grid.Row="5" Grid.Column="0" Classes="primary bold" Text="{OnPlatform Ctrl+N, macOS=⌘+N}"/>
|
||||
<TextBlock Grid.Row="5" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Global.Clone}" />
|
||||
|
||||
<TextBlock Grid.Row="6" Grid.Column="0" Classes="primary bold" Text="ESC"/>
|
||||
<TextBlock Grid.Row="6" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Global.CancelPopup}" />
|
||||
</Grid>
|
||||
|
||||
<TextBlock Text="{DynamicResource Text.Hotkeys.Repo}"
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Current.FriendlyName}" Margin="8,0,0,0"/>
|
||||
|
||||
<TextBlock Grid.Column="3" Margin="48,0,0,0" Text="{DynamicResource Text.InteractiveRebase.On}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold"/>
|
||||
<Path Grid.Column="4" Width="14" Height="14" Margin="8,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
||||
<Path Grid.Column="4" Width="14" Height="14" Margin="8,0,0,0" Data="{StaticResource Icons.Commit}"/>
|
||||
<TextBlock Grid.Column="5" Classes="primary" VerticalAlignment="Center" Text="{Binding On.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||
<TextBlock Grid.Column="6" VerticalAlignment="Center" Text="{Binding On.Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
|
||||
</Grid>
|
||||
|
|
|
@ -136,6 +136,16 @@ namespace SourceGit.Views
|
|||
return;
|
||||
}
|
||||
|
||||
if (e.Key == Key.N)
|
||||
{
|
||||
if (vm.ActivePage.Data is not ViewModels.Welcome)
|
||||
vm.AddNewTab();
|
||||
|
||||
ViewModels.Welcome.Instance.Clone();
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if ((OperatingSystem.IsMacOS() && e.KeyModifiers.HasFlag(KeyModifiers.Alt) && e.Key == Key.Right) ||
|
||||
(!OperatingSystem.IsMacOS() && !e.KeyModifiers.HasFlag(KeyModifiers.Shift) && e.Key == Key.Tab))
|
||||
{
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
HorizontalAlignment="Right"
|
||||
IsVisible="{Binding InProgress, Converter={x:Static BoolConverters.Not}}">
|
||||
<Button Classes="flat primary"
|
||||
Width="80" Height="28"
|
||||
Width="100" Height="28"
|
||||
Padding="0"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
|
@ -85,7 +85,7 @@
|
|||
Click="OnPopupSure"
|
||||
HotKey="Enter"/>
|
||||
<Button Classes="flat"
|
||||
Width="80" Height="28"
|
||||
Width="100" Height="28"
|
||||
Margin="8,0,0,0"
|
||||
Padding="0"
|
||||
HorizontalContentAlignment="Center"
|
||||
|
@ -112,19 +112,24 @@
|
|||
<Border Margin="6" HorizontalAlignment="Stretch" VerticalAlignment="Top" Effect="drop-shadow(0 0 8 #8F000000)">
|
||||
<Border Padding="8" CornerRadius="6" Background="{DynamicResource Brush.Popup}">
|
||||
<Grid RowDefinitions="26,Auto">
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto" Margin="8,0">
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto,Auto" Margin="8,0">
|
||||
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Error}" Fill="Red" IsVisible="{Binding IsError}"/>
|
||||
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Info}" Fill="Green" IsVisible="{Binding !IsError}"/>
|
||||
<TextBlock Grid.Column="1" Margin="8,0,0,0" FontWeight="Bold" FontSize="14" Text="{DynamicResource Text.Launcher.Error}" IsVisible="{Binding IsError}"/>
|
||||
<TextBlock Grid.Column="1" Margin="8,0,0,0" FontWeight="Bold" FontSize="14" Text="{DynamicResource Text.Launcher.Info}" IsVisible="{Binding !IsError}"/>
|
||||
<Button Grid.Column="2" Classes="icon_button" Width="16" Height="16" Click="OnDismissNotification">
|
||||
<Button Grid.Column="2" Classes="icon_button" Width="16" Height="16" Click="OnCopyNotification">
|
||||
<Path Width="12" Height="12" Data="{StaticResource Icons.Copy}"/>
|
||||
</Button>
|
||||
<Button Grid.Column="3" Classes="icon_button" Width="16" Height="16" Margin="8,0,0,0" Click="OnDismissNotification">
|
||||
<Path Width="10" Height="10" Data="{StaticResource Icons.Window.Close}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<ScrollViewer Grid.Row="1" Margin="8" MaxHeight="100" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
||||
<SelectableTextBlock TextWrapping="Wrap" Text="{Binding Message}"/>
|
||||
</ScrollViewer>
|
||||
<Border Grid.Row="1" Margin="8" Background="{DynamicResource Brush.Contents}" BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}">
|
||||
<ScrollViewer MaxHeight="200" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
|
||||
<TextBlock Margin="4,2" TextWrapping="NoWrap" Text="{Binding Message}"/>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Border>
|
||||
|
|
|
@ -32,6 +32,14 @@ namespace SourceGit.Views
|
|||
OnPopupCancel(sender, e);
|
||||
}
|
||||
|
||||
private void OnCopyNotification(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is Button { DataContext: Models.Notification notice })
|
||||
App.CopyText(notice.Message);
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void OnDismissNotification(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is Button { DataContext: Models.Notification notice } &&
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:m="using:SourceGit.Models"
|
||||
xmlns:vm="using:SourceGit.ViewModels"
|
||||
xmlns:c="using:SourceGit.Converters"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="SourceGit.Views.Merge"
|
||||
x:DataType="vm:Merge">
|
||||
|
@ -11,15 +12,36 @@
|
|||
<TextBlock FontSize="18"
|
||||
Classes="bold"
|
||||
Text="{DynamicResource Text.Merge}"/>
|
||||
<Grid Margin="0,16,0,0" RowDefinitions="32,32,32" ColumnDefinitions="150,*">
|
||||
<Grid Margin="0,16,0,0" RowDefinitions="32,32,32" ColumnDefinitions="130,*">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0"
|
||||
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:Commit">
|
||||
<Grid ColumnDefinitions="Auto,Auto,*">
|
||||
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
|
||||
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
|
||||
</Grid>
|
||||
</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"
|
||||
|
|
93
src/Views/MergeMultiple.axaml
Normal file
93
src/Views/MergeMultiple.axaml
Normal file
|
@ -0,0 +1,93 @@
|
|||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:m="using:SourceGit.Models"
|
||||
xmlns:vm="using:SourceGit.ViewModels"
|
||||
xmlns:c="using:SourceGit.Converters"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="SourceGit.Views.MergeMultiple"
|
||||
x:DataType="vm:MergeMultiple">
|
||||
<StackPanel Orientation="Vertical" Margin="8,0">
|
||||
<TextBlock FontSize="18"
|
||||
Classes="bold"
|
||||
Text="{DynamicResource Text.MergeMultiple}"/>
|
||||
|
||||
<Grid Margin="0,16,0,0" RowDefinitions="Auto,32,32" ColumnDefinitions="100,*">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Top"
|
||||
Margin="0,6,8,0"
|
||||
Text="{DynamicResource Text.MergeMultiple.Targets}"/>
|
||||
<ListBox Grid.Row="0" Grid.Column="1"
|
||||
MinHeight="32" MaxHeight="100" Margin="0,0,0,4"
|
||||
ItemsSource="{Binding Targets}"
|
||||
Background="{DynamicResource Brush.Contents}"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{DynamicResource Brush.Border2}"
|
||||
Padding="4"
|
||||
CornerRadius="4"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto">
|
||||
<ListBox.Styles>
|
||||
<Style Selector="ListBoxItem">
|
||||
<Setter Property="Padding" Value="4,0"/>
|
||||
<Setter Property="Height" Value="26"/>
|
||||
<Setter Property="CornerRadius" Value="4"/>
|
||||
</Style>
|
||||
</ListBox.Styles>
|
||||
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Vertical"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ContentControl Content="{Binding}">
|
||||
<ContentControl.DataTemplates>
|
||||
<DataTemplate DataType="m:Commit">
|
||||
<Grid ColumnDefinitions="14,Auto,*">
|
||||
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
|
||||
<TextBlock Grid.Column="1" FontFamily="{DynamicResource Fonts.Monospace}" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="6,0,4,0"/>
|
||||
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" TextTrimming="CharacterEllipsis"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<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>
|
||||
</ContentControl.DataTemplates>
|
||||
</ContentControl>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||
Margin="0,0,8,0"
|
||||
Text="{DynamicResource Text.MergeMultiple.Strategy}"/>
|
||||
<ComboBox Grid.Row="1" Grid.Column="1"
|
||||
Height="28" Padding="8,0"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Stretch"
|
||||
ItemsSource="{Binding Source={x:Static m:MergeStrategy.ForMultiple}}"
|
||||
SelectedItem="{Binding Strategy, Mode=TwoWay}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate DataType="m:MergeStrategy">
|
||||
<StackPanel Orientation="Horizontal" Height="20" VerticalAlignment="Center">
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
<TextBlock Text="{Binding Desc}" Margin="8,0,0,0" FontSize="11" Foreground="{DynamicResource Brush.FG2}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<CheckBox Grid.Row="2" Grid.Column="1"
|
||||
Content="{DynamicResource Text.MergeMultiple.CommitChanges}"
|
||||
IsChecked="{Binding AutoCommit, Mode=TwoWay}"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</UserControl>
|
12
src/Views/MergeMultiple.axaml.cs
Normal file
12
src/Views/MergeMultiple.axaml.cs
Normal file
|
@ -0,0 +1,12 @@
|
|||
using Avalonia.Controls;
|
||||
|
||||
namespace SourceGit.Views
|
||||
{
|
||||
public partial class MergeMultiple : UserControl
|
||||
{
|
||||
public MergeMultiple()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
<DataTemplate DataType="m:Commit">
|
||||
<Grid ColumnDefinitions="Auto,Auto,*">
|
||||
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
||||
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
|
||||
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
|
||||
</Grid>
|
||||
|
|
|
@ -546,45 +546,76 @@
|
|||
BorderBrush="{DynamicResource Brush.Border0}"/>
|
||||
|
||||
<!-- Right -->
|
||||
<Grid Grid.Column="2" RowDefinitions="Auto,Auto,*">
|
||||
<Grid Grid.Row="0" Height="28" ColumnDefinitions="*,Auto,Auto" Background="{DynamicResource Brush.Conflict}" IsVisible="{Binding InProgressContext, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||
<Grid Grid.Column="2" RowDefinitions="Auto,Auto,*">
|
||||
<Grid Grid.Row="0" Height="28" ColumnDefinitions="*,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}"/>
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<StackPanel Grid.Column="0" 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>
|
||||
|
||||
<Button Grid.Column="1" Classes="flat" FontWeight="Regular" BorderThickness="0" Content="{DynamicResource Text.Repository.Skip}" Padding="8,2" Click="OnSkipInProgress"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="vm:RebaseInProgress">
|
||||
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Rebase}"/>
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<StackPanel Grid.Column="0" 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>
|
||||
|
||||
<Button Grid.Column="1" Classes="flat" FontWeight="Regular" BorderThickness="0" Content="{DynamicResource Text.Repository.Skip}" Padding="8,2" Click="OnSkipInProgress"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="vm:RevertInProgress">
|
||||
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Revert}"/>
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<StackPanel Grid.Column="0" 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>
|
||||
|
||||
<Button Grid.Column="1" Classes="flat" FontWeight="Regular" BorderThickness="0" Content="{DynamicResource Text.Repository.Skip}" Padding="8,2" Click="OnSkipInProgress"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="vm:MergeInProgress">
|
||||
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Merge}"/>
|
||||
<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>
|
||||
|
||||
<Button Grid.Column="1"
|
||||
Classes="flat"
|
||||
|
||||
<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"
|
||||
Content="{DynamicResource Text.Repository.Abort}"
|
||||
Padding="8,2" Margin="0,0,8,0"
|
||||
Command="{Binding AbortMerge}"/>
|
||||
</Grid>
|
||||
|
||||
|
|
|
@ -428,5 +428,13 @@ namespace SourceGit.Views
|
|||
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void OnSkipInProgress(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (DataContext is ViewModels.Repository repo)
|
||||
repo.SkipMerge();
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -270,7 +270,10 @@
|
|||
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="m:IssueTrackerRule">
|
||||
<TextBlock Text="{Binding Name}" Margin="8,0" TextTrimming="CharacterEllipsis"/>
|
||||
<Grid ColumnDefinitions="Auto,*">
|
||||
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Issue}"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" Margin="8,0" TextTrimming="CharacterEllipsis"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
@ -311,7 +314,7 @@
|
|||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Fill="{DynamicResource Brush.FG2}"
|
||||
Data="{StaticResource Icons.Issue}"/>
|
||||
Data="{StaticResource Icons.Empty}"/>
|
||||
</Binding.TargetNullValue>
|
||||
</Binding>
|
||||
</ContentControl.Content>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
Margin="0,0,8,0"
|
||||
Text="{DynamicResource Text.Reset.MoveTo}"/>
|
||||
<Grid Grid.Row="1" Grid.Column="1" ColumnDefinitions="Auto,Auto,*" Height="20" VerticalAlignment="Center">
|
||||
<Path Grid.Column="0" Margin="0,6,8,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG1}" Data="{StaticResource Icons.Commit}"/>
|
||||
<Path Grid.Column="0" Margin="0,0,8,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG1}" Data="{StaticResource Icons.Commit}"/>
|
||||
<TextBlock Grid.Column="1" Classes="primary" Text="{Binding To.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange"/>
|
||||
<TextBlock Grid.Column="2" Text="{Binding To.Subject}" Margin="8,0,0,0" TextTrimming="CharacterEllipsis"/>
|
||||
</Grid>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
Text="{DynamicResource Text.Revert.Commit}"/>
|
||||
|
||||
<Grid Grid.Row="0" Grid.Column="1" ColumnDefinitions="Auto,Auto,*">
|
||||
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
||||
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
|
||||
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding Target.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Target.Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
|
||||
</Grid>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
Text="{DynamicResource Text.Reword}"/>
|
||||
|
||||
<StackPanel Margin="8,16,8,0" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Path Margin="0,6,8,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG1}" Data="{StaticResource Icons.Commit}"/>
|
||||
<Path Margin="0,0,8,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG1}" Data="{StaticResource Icons.Commit}"/>
|
||||
<TextBlock Classes="primary" Text="{Binding Head.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange"/>
|
||||
</StackPanel>
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<TextBlock Grid.Column="0"
|
||||
Text="{DynamicResource Text.Squash.Into}"/>
|
||||
<Path Grid.Column="1"
|
||||
Margin="8,6,8,0"
|
||||
Margin="8,0"
|
||||
Width="14" Height="14"
|
||||
Fill="{DynamicResource Brush.FG1}"
|
||||
Data="{StaticResource Icons.Commit}"/>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
SelectionChanged="OnRowSelectionChanged">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="vm:TagTreeNode">
|
||||
<Grid ColumnDefinitions="16,Auto,*,Auto"
|
||||
<Grid ColumnDefinitions="16,Auto,*,20"
|
||||
Margin="{Binding Depth, Converter={x:Static c:IntConverters.ToTreeMargin}}"
|
||||
Background="Transparent"
|
||||
ContextRequested="OnRowContextRequested"
|
||||
|
|
|
@ -719,19 +719,22 @@ namespace SourceGit.Views
|
|||
else if (change.Property == BlockNavigationProperty)
|
||||
{
|
||||
var oldValue = change.OldValue as ViewModels.BlockNavigation;
|
||||
var newValue = change.NewValue as ViewModels.BlockNavigation;
|
||||
if (oldValue != null)
|
||||
{
|
||||
oldValue.PropertyChanged -= OnBlockNavigationPropertyChanged;
|
||||
if (oldValue.Current != -1)
|
||||
TextArea?.TextView?.Redraw();
|
||||
}
|
||||
|
||||
var newValue = change.NewValue as ViewModels.BlockNavigation;
|
||||
if (newValue != null)
|
||||
newValue.PropertyChanged += OnBlockNavigationPropertyChanged;
|
||||
|
||||
InvalidateVisual();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnBlockNavigationPropertyChanged(object _1, PropertyChangedEventArgs _2)
|
||||
{
|
||||
TextArea.TextView.Redraw();
|
||||
TextArea?.TextView?.Redraw();
|
||||
}
|
||||
|
||||
private void OnTextViewContextRequested(object sender, ContextRequestedEventArgs e)
|
||||
|
@ -1576,7 +1579,7 @@ namespace SourceGit.Views
|
|||
|
||||
UseBlockNavigationProperty.Changed.AddClassHandler<TextDiffView>((v, _) =>
|
||||
{
|
||||
v.RefreshContent(v.DataContext as Models.TextDiff, false);
|
||||
v.RefreshBlockNavigation();
|
||||
});
|
||||
|
||||
SelectedChunkProperty.Changed.AddClassHandler<TextDiffView>((v, _) =>
|
||||
|
@ -1664,6 +1667,14 @@ namespace SourceGit.Views
|
|||
Editor.Content = diff;
|
||||
}
|
||||
|
||||
RefreshBlockNavigation();
|
||||
|
||||
IsUnstagedChange = diff.Option.IsUnstaged;
|
||||
EnableChunkSelection = diff.Option.WorkingCopyChange != null;
|
||||
}
|
||||
|
||||
private void RefreshBlockNavigation()
|
||||
{
|
||||
if (UseBlockNavigation)
|
||||
{
|
||||
BlockNavigation = new ViewModels.BlockNavigation(Editor.Content);
|
||||
|
@ -1674,9 +1685,6 @@ namespace SourceGit.Views
|
|||
BlockNavigation = null;
|
||||
BlockNavigationIndicator = "-/-";
|
||||
}
|
||||
|
||||
IsUnstagedChange = diff.Option.IsUnstaged;
|
||||
EnableChunkSelection = diff.Option.WorkingCopyChange != null;
|
||||
}
|
||||
|
||||
private void OnStageChunk(object _1, RoutedEventArgs _2)
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:m="using:SourceGit.Models"
|
||||
xmlns:vm="using:SourceGit.ViewModels"
|
||||
xmlns:v="using:SourceGit.Views"
|
||||
xmlns:c="using:SourceGit.Converters"
|
||||
|
@ -169,13 +170,67 @@
|
|||
|
||||
<ContentControl Content="{Binding DetailContext}">
|
||||
<ContentControl.DataTemplates>
|
||||
<DataTemplate DataType="vm:ConflictContext">
|
||||
<DataTemplate DataType="vm:Conflict">
|
||||
<Border Background="{DynamicResource Brush.Window}" BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}">
|
||||
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Grid VerticalAlignment="Center">
|
||||
<StackPanel Orientation="Vertical" IsVisible="{Binding !IsResolved}">
|
||||
<Path Width="64" Height="64" Data="{StaticResource Icons.Conflict}" Fill="{DynamicResource Brush.FG2}"/>
|
||||
<TextBlock Margin="0,16,0,8" FontSize="20" FontWeight="Bold" Text="{DynamicResource Text.WorkingCopy.Conflicts}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Center"/>
|
||||
<TextBlock Text="{DynamicResource Text.WorkingCopy.ResolveTip}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Center"/>
|
||||
<StackPanel.DataTemplates>
|
||||
<DataTemplate DataType="m:Branch">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Path Width="12" Height="12" Data="{StaticResource Icons.Branch}"/>
|
||||
<TextBlock Margin="4,0,0,0" Text="{Binding FriendlyName}"/>
|
||||
<TextBlock Margin="4,0,0,0" Text="{Binding Head, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="m:Commit">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Path Width="12" Height="12" Data="{StaticResource Icons.Commit}"/>
|
||||
<v:CommitRefsPresenter Margin="8,0,0,0"
|
||||
TagBackground="{DynamicResource Brush.DecoratorTag}"
|
||||
Foreground="{DynamicResource Brush.FG1}"
|
||||
FontFamily="{DynamicResource Fonts.Primary}"
|
||||
FontSize="11"
|
||||
VerticalAlignment="Center"
|
||||
UseGraphColor="False"/>
|
||||
<TextBlock Margin="4,0,0,0" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange"/>
|
||||
<TextBlock Margin="4,0,0,0" Text="{Binding Subject}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="m:Tag">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Path Width="12" Height="12" Data="{StaticResource Icons.Tag}"/>
|
||||
<TextBlock Margin="4,0,0,0" Text="{Binding Name}"/>
|
||||
<TextBlock Margin="4,0,0,0" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</StackPanel.DataTemplates>
|
||||
|
||||
<Path Width="64" Height="64" Data="{StaticResource Icons.Conflict}" Fill="{DynamicResource Brush.FG2}" HorizontalAlignment="Center"/>
|
||||
<TextBlock Margin="0,16" FontSize="20" FontWeight="Bold" Text="{DynamicResource Text.WorkingCopy.Conflicts}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Center"/>
|
||||
|
||||
<Border Margin="16,0" Padding="8" CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}">
|
||||
<Border.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Path="Theirs" Converter="{x:Static ObjectConverters.IsNotNull}"/>
|
||||
<Binding Path="Mine" Converter="{x:Static ObjectConverters.IsNotNull}"/>
|
||||
</MultiBinding>
|
||||
</Border.IsVisible>
|
||||
|
||||
<Grid Margin="8,0,0,0" RowDefinitions="32,32" ColumnDefinitions="Auto,*">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Classes="info_label" Text="THEIRS"/>
|
||||
<ContentControl Grid.Row="0" Grid.Column="1" Margin="16,0,0,0" Content="{Binding Theirs}"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Classes="info_label" Text="MINE"/>
|
||||
<ContentControl Grid.Row="1" Grid.Column="1" Margin="16,0,0,0" Content="{Binding Mine}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<StackPanel Margin="0,8,0,0" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button Classes="flat" Content="USE THEIRS" Command="{Binding UseTheirs}"/>
|
||||
<Button Classes="flat" Margin="8,0,0,0" Content="USE MINE" Command="{Binding UseMine}"/>
|
||||
<Button Classes="flat" Margin="8,0,0,0" Content="OPEN EXTERNAL MERGETOOL" Command="{Binding OpenExternalMergeTool}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Vertical" IsVisible="{Binding IsResolved}">
|
||||
|
@ -300,8 +355,15 @@
|
|||
HotKey="Alt+Enter"
|
||||
ToolTip.Tip="{OnPlatform Alt+Enter, macOS=⌥+Enter}"
|
||||
ToolTip.Placement="Top"
|
||||
ToolTip.VerticalOffset="0"
|
||||
IsVisible="{Binding IsCommitWithPushVisible}"/>
|
||||
ToolTip.VerticalOffset="0">
|
||||
<Button.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Path="UseAmend" Converter="{x:Static BoolConverters.Not}"/>
|
||||
<Binding Path="CanCommitWithPush"/>
|
||||
<Binding Path="InProgressContext" Converter="{x:Static ObjectConverters.IsNull}"/>
|
||||
</MultiBinding>
|
||||
</Button.IsVisible>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
|
Loading…
Reference in a new issue