Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
5748a1bf
Commit
5748a1bf
authored
Oct 18, 2014
by
Mathieu Giraud
Browse files
diff.py: adds 'who' +/- characters in the front of actual diffs
parent
b299c109
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/diff.py
View file @
5748a1bf
...
...
@@ -33,10 +33,24 @@ args.nb_others = 3
def
diff_two_clones
(
self
,
other
):
if
not
other
or
not
self
:
who
=
"+-"
[
not
other
]
print
who
,
print
"!!! Clone not present:"
,
self
,
"/"
,
other
return
if
not
self
.
d
[
'reads'
]
==
other
.
d
[
'reads'
]:
### Computes 'who' character identification
who_minus
=
False
who_plus
=
False
for
reads_s
,
reads_o
in
zip
(
self
.
d
[
'reads'
],
other
.
d
[
'reads'
]):
if
reads_o
>
reads_s
:
who_plus
=
True
if
reads_o
<
reads_s
:
who_minus
=
True
who
=
[
"=+"
,
"-?"
][
who_minus
][
who_plus
]
print
who
,
print
"!!! Not the same number or reads:"
,
self
.
d
[
'id'
],
"-"
,
self
.
d
[
'reads'
],
"/"
,
other
.
d
[
'reads'
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment