comparison tests/test-commit-amend.t @ 23587:8063901e56cd

memctx: calculate exact status being committed from specified files Before this patch, "memctx._status" is initialized by "(files, [], [], [], [], [], [])" and this causes "memctx.modified" to include not only modified files but also added and removed ones incorrectly. This patch adds "_status" method to calculate exact status being committed according to "files" specified at construction time. Exact "_status" is useful to share/reuse logic of committablectx. This patch is also preparation for issues fixed by subsequent patches. Some details of changes for tests in this patch: - some filename lines are omitted in "test-convert-svn-encoding.t", because they are correctly listed up as "removed" files those lines are written out in "localrepository.commitctx" for "modified" and "added" files by "ui.note". - "| fixbundle" filterring in "test-histedit-fold.t" is omitted to check lines including "added" correctly "fixbundle" discards all lines including "added".
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Wed, 17 Dec 2014 15:09:38 +0900
parents bd5dbb8a05c8
children 87a76cff7147
comparison
equal deleted inserted replaced
23586:112f9c73a0e5 23587:8063901e56cd
840 amend as secret 840 amend as secret
841 $ HGEDITOR=cat hg commit --amend -m "editor should be suppressed" 841 $ HGEDITOR=cat hg commit --amend -m "editor should be suppressed"
842 $ hg parents --template "{desc}\n" 842 $ hg parents --template "{desc}\n"
843 editor should be suppressed 843 editor should be suppressed
844 844
845 $ hg status --rev '.^1::.'
846 A foo
845 $ HGEDITOR=cat hg commit --amend -m "editor should be invoked" --edit 847 $ HGEDITOR=cat hg commit --amend -m "editor should be invoked" --edit
846 editor should be invoked 848 editor should be invoked
847 849
848 850
849 HG: Enter commit message. Lines beginning with 'HG:' are removed. 851 HG: Enter commit message. Lines beginning with 'HG:' are removed.
850 HG: Leave message empty to abort commit. 852 HG: Leave message empty to abort commit.
851 HG: -- 853 HG: --
852 HG: user: test 854 HG: user: test
853 HG: branch 'silliness' 855 HG: branch 'silliness'
854 HG: changed foo 856 HG: added foo
855 $ hg parents --template "{desc}\n" 857 $ hg parents --template "{desc}\n"
856 editor should be invoked 858 editor should be invoked
857 859
858 Check for issue4405 860 Check for issue4405
859 ------------------- 861 -------------------