Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 36844:eeb87b24aea7 stable
amend: abort if unresolved merge conflicts found (issue5805)
It was checked by repo.commit() before e8a7c1a0565a "cmdutil: remove the
redundant commit during amend."
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 11 Mar 2018 20:10:38 +0900 |
parents | e5b6ba786d83 |
children | c479692690ef |
comparison
equal
deleted
inserted
replaced
36759:9639c433be54 | 36844:eeb87b24aea7 |
---|---|
32 error, | 32 error, |
33 formatter, | 33 formatter, |
34 graphmod, | 34 graphmod, |
35 match as matchmod, | 35 match as matchmod, |
36 mdiff, | 36 mdiff, |
37 mergeutil, | |
37 obsolete, | 38 obsolete, |
38 patch, | 39 patch, |
39 pathutil, | 40 pathutil, |
40 pycompat, | 41 pycompat, |
41 registrar, | 42 registrar, |
3210 # amend should abort if commitsubrepos is enabled | 3211 # amend should abort if commitsubrepos is enabled |
3211 assert not commitsubs | 3212 assert not commitsubs |
3212 if subs: | 3213 if subs: |
3213 subrepo.writestate(repo, newsubstate) | 3214 subrepo.writestate(repo, newsubstate) |
3214 | 3215 |
3216 # avoid cycle (TODO: should be removed in default branch) | |
3217 from . import merge as mergemod | |
3218 ms = mergemod.mergestate.read(repo) | |
3219 mergeutil.checkunresolved(ms) | |
3220 | |
3215 filestoamend = set(f for f in wctx.files() if matcher(f)) | 3221 filestoamend = set(f for f in wctx.files() if matcher(f)) |
3216 | 3222 |
3217 changes = (len(filestoamend) > 0) | 3223 changes = (len(filestoamend) > 0) |
3218 if changes: | 3224 if changes: |
3219 # Recompute copies (avoid recording a -> b -> a) | 3225 # Recompute copies (avoid recording a -> b -> a) |