c5f3bde4 Andy McCall 1 month ago ↶
1
{% extends "base.html" %}
2
{% import "repo_tabs.html" as m %}
3
{% block title %}Resolve {{ path }} · {{ repo.owner }}/{{ repo.name }}{% endblock %}
4
{% block bodyattrs %} data-repo="{{ repo.url }}"{% endblock %}
5
{% block tabs %}{% call m::tabs(repo, "conflicts") %}{% endblock %}
6
{% block mainclass %} class="wide"{% endblock %}
7
{% block content %}
8
< div class = " head " > < h1 > Resolve < code > {{ path }}</ code > < small > on < span class = " lbl lbl-bm " > {{ bookmark }}</ span > </ small > </ h1 >
9
< p class = " small mute " > Choose what each conflict keeps. The file is put back together around the lines no one disagrees on and committed to {{ bookmark }} as a resolution: it depends on every change that wrote a side, so no side is lost from history. Link to a conflict with its < code > #region-N</ code > .</ p > </ div >
16cb2b3a Andy McCall 1 month ago ↶
10
< p class = " small " > < a href = " {{ vscode }}" > Resolve in VS Code</ a > < span class = " mute " > (with the Oxygen extension: it opens your checkout on {{ bookmark }}, or offers to clone it)</ span > </ p >
c5f3bde4 Andy McCall 1 month ago ↶
11
{% if let Some(e) = error %}< p class = " error " > {{ e }}</ p > {% endif %}
12
{% if let Some(d) = delegation %}< p class = " error " > {{ d }}</ p > {% endif %}
13
< form method = " post" action = " {{ repo.url }}/resolve/{{ bookmark }}/{{ path }}" >
14
< input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" >
15
< input type = " hidden" name = " state" value = " {{ state }}" >
16
{% for p in pieces %}
17
{% match p %}
18
{% when crate::web::resolve::Piece::Plain with (text) %}
19
< pre class = " marked context " > {{ text }}</ pre >
20
{% when crate::web::resolve::Piece::Region with (r) %}
21
< section class = " file-diff conflict-region " id = " region-{{ r.n }} " >
22
< header > < a href = " #region-{{ r.n }}" > < strong > Conflict {{ r.n }}</ strong > </ a > < span class = " small mute " > {{ r.sides.len() }} sides</ span > </ header >
23
{% for s in r.sides %}
24
< div class = " side " >
25
< label > < input type = " radio" name = " r{{ r.n }}" value = " side{{ loop.index }}" {% if loop.first %} checked {% endif %}> keep side {{ loop.index }} < span class = " small mute " > {{ s.label }}</ span > </ label >
26
{% if s.deletion %}< p class = " small mute " > Keeping this side keeps the deletion of these lines:</ p > {% endif %}
27
< pre class = " marked{% if s.deletion %} deleted{% endif %} " > {{ s.text }}</ pre >
28
</ div >
29
{% endfor %}
30
< div class = " choice " >
31
< label > < input type = " radio" name = " r{{ r.n }}" value = " all" > keep every side, in order</ label >
32
< label > < input type = " radio" name = " r{{ r.n }}" value = " none" > keep none</ label >
33
< label > < input type = " radio" name = " r{{ r.n }}" value = " text" > write it myself:</ label >
34
</ div >
35
< textarea name = " t{{ r.n }}" rows = " {{ r.all().lines().count() + 1 }}" aria-label = " Your text for conflict {{ r.n }}" > {{ r.all() }}</ textarea >
36
</ section >
37
{% endmatch %}
38
{% endfor %}
39
< label for = " message" > Message</ label > < input type = " text" id = " message " name = " message" value = " {{ message }}" >
40
< button type = " submit" > COMMIT RESOLUTION</ button >
41
</ form >
42
{% endblock %}