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
3f9a5c910131
Commit
3f9a5c91
authored
Feb 03, 2021
by
Sushil Khanchi
🐨
Browse files
pick: move `continue` and `abort` blocks above for more clarity
parent
65d4e47d7f26
Changes
1
Show whitespace changes
Inline
Side-by-side
hgext3rd/evolve/cmdrewrite.py
View file @
3f9a5c91
...
@@ -1412,7 +1412,20 @@
...
@@ -1412,7 +1412,20 @@
pickstate
=
state
.
cmdstate
(
repo
,
path
=
b
'pickstate'
)
pickstate
=
state
.
cmdstate
(
repo
,
path
=
b
'pickstate'
)
pctx
=
repo
[
b
'.'
]
pctx
=
repo
[
b
'.'
]
if
not
cont
and
not
abort
:
if
cont
:
if
revs
:
raise
error
.
Abort
(
_
(
b
"cannot specify both --continue and "
b
"revision"
))
if
not
pickstate
:
raise
error
.
Abort
(
_
(
b
"no interrupted pick state exists"
))
pickstate
.
load
()
orignode
=
pickstate
[
b
'orignode'
]
origctx
=
repo
[
orignode
]
elif
abort
:
return
abortpick
(
ui
,
repo
,
pickstate
)
else
:
cmdutil
.
bailifchanged
(
repo
)
cmdutil
.
bailifchanged
(
repo
)
revs
=
scmutil
.
revrange
(
repo
,
revs
)
revs
=
scmutil
.
revrange
(
repo
,
revs
)
if
len
(
revs
)
>
1
:
if
len
(
revs
)
>
1
:
...
@@ -1440,21 +1453,6 @@
...
@@ -1440,21 +1453,6 @@
pickstate
.
save
()
pickstate
.
save
()
raise
error
.
InterventionRequired
(
_
(
b
"unresolved merge conflicts"
raise
error
.
InterventionRequired
(
_
(
b
"unresolved merge conflicts"
b
" (see hg help resolve)"
))
b
" (see hg help resolve)"
))
elif
abort
:
return
abortpick
(
ui
,
repo
,
pickstate
)
else
:
if
revs
:
raise
error
.
Abort
(
_
(
b
"cannot specify both --continue and "
b
"revision"
))
if
not
pickstate
:
raise
error
.
Abort
(
_
(
b
"no interrupted pick state exists"
))
pickstate
.
load
()
orignode
=
pickstate
[
b
'orignode'
]
origctx
=
repo
[
orignode
]
overrides
=
{(
b
'phases'
,
b
'new-commit'
):
origctx
.
phase
()}
overrides
=
{(
b
'phases'
,
b
'new-commit'
):
origctx
.
phase
()}
with
repo
.
ui
.
configoverride
(
overrides
,
b
'pick'
):
with
repo
.
ui
.
configoverride
(
overrides
,
b
'pick'
):
newnode
=
repo
.
commit
(
text
=
origctx
.
description
(),
newnode
=
repo
.
commit
(
text
=
origctx
.
description
(),
...
...
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