Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mercurial
evolve
Commits
e7e154b2388b
Commit
e7e154b2
authored
Nov 19, 2018
by
Pierre-Yves David
🐙
Browse files
compat: drop 4.3 compatiblity code for 'successors' revset
parent
7661706dc14d
Changes
1
Show whitespace changes
Inline
Side-by-side
hgext3rd/evolve/templatekw.py
View file @
e7e154b2
...
...
@@ -17,7 +17,6 @@
from
mercurial
import
(
templatekw
,
node
,
util
)
...
...
@@ -48,35 +47,7 @@
"""
return
directsuccessorssets
(
repo
,
nodeid
)
if
util
.
safehasattr
(
templatekw
,
'showsuccessorssets'
):
templatekw
.
keywords
[
"successors"
]
=
templatekw
.
showsuccessorssets
else
:
# for version <= hg4.3
@
eh
.
templatekw
(
"successors"
)
def
shownextvisiblesuccessors
(
repo
,
ctx
,
templ
,
**
args
):
"""Returns a string of sets of successors for a changectx
Format used is: [ctx1, ctx2], [ctx3] if ctx has been splitted into ctx1 and
ctx2 while also diverged into ctx3"""
if
not
ctx
.
obsolete
():
return
''
ssets
,
_
=
closestsuccessors
(
repo
,
ctx
.
node
())
ssets
=
[[
node
.
hex
(
n
)
for
n
in
ss
]
for
ss
in
ssets
]
data
=
[]
gen
=
[]
for
ss
in
ssets
:
subgen
=
'[%s]'
%
', '
.
join
(
n
[:
12
]
for
n
in
ss
)
gen
.
append
(
subgen
)
h
=
templatekw
.
_hybrid
(
iter
(
subgen
),
ss
,
lambda
x
:
{
'successor'
:
x
},
lambda
d
:
"%s"
%
d
[
"successor"
])
data
.
append
(
h
)
gen
=
', '
.
join
(
gen
)
return
templatekw
.
_hybrid
(
iter
(
gen
),
data
,
lambda
x
:
{
'successorset'
:
x
},
lambda
d
:
d
[
"successorset"
])
templatekw
.
keywords
[
"successors"
]
=
templatekw
.
showsuccessorssets
def
_getusername
(
ui
):
"""the default username in the config or None"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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