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 >
10
{% if let Some(e) = error %}< p class = " error " > {{ e }}</ p > {% endif %}
11
{% if let Some(d) = delegation %}< p class = " error " > {{ d }}</ p > {% endif %}
12
< form method = " post" action = " {{ repo.url }}/resolve/{{ bookmark }}/{{ path }}" >
13
< input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" >
14
< input type = " hidden" name = " state" value = " {{ state }}" >
15
{% for p in pieces %}
16
{% match p %}
17
{% when crate::web::resolve::Piece::Plain with (text) %}
18
< pre class = " marked context " > {{ text }}</ pre >
19
{% when crate::web::resolve::Piece::Region with (r) %}
20
< section class = " file-diff conflict-region " id = " region-{{ r.n }} " >
21
< header > < a href = " #region-{{ r.n }}" > < strong > Conflict {{ r.n }}</ strong > </ a > < span class = " small mute " > {{ r.sides.len() }} sides</ span > </ header >
22
{% for s in r.sides %}
23
< div class = " side " >
24
< 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 >
25
{% if s.deletion %}< p class = " small mute " > Keeping this side keeps the deletion of these lines:</ p > {% endif %}
26
< pre class = " marked{% if s.deletion %} deleted{% endif %} " > {{ s.text }}</ pre >
27
</ div >
28
{% endfor %}
29
< div class = " choice " >
30
< label > < input type = " radio" name = " r{{ r.n }}" value = " all" > keep every side, in order</ label >
31
< label > < input type = " radio" name = " r{{ r.n }}" value = " none" > keep none</ label >
32
< label > < input type = " radio" name = " r{{ r.n }}" value = " text" > write it myself:</ label >
33
</ div >
34
< textarea name = " t{{ r.n }}" rows = " {{ r.all().lines().count() + 1 }}" aria-label = " Your text for conflict {{ r.n }}" > {{ r.all() }}</ textarea >
35
</ section >
36
{% endmatch %}
37
{% endfor %}
38
< label for = " message" > Message</ label > < input type = " text" id = " message " name = " message" value = " {{ message }}" >
39
< button type = " submit" > COMMIT RESOLUTION</ button >
40
</ form >
41
{% endblock %}