diff 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
line wrap: on
line diff
--- a/tests/test-commit-amend.t	Fri Dec 12 12:31:41 2014 -0800
+++ b/tests/test-commit-amend.t	Wed Dec 17 15:09:38 2014 +0900
@@ -842,6 +842,8 @@
   $ hg parents --template "{desc}\n"
   editor should be suppressed
 
+  $ hg status --rev '.^1::.'
+  A foo
   $ HGEDITOR=cat hg commit --amend -m "editor should be invoked" --edit
   editor should be invoked
   
@@ -851,7 +853,7 @@
   HG: --
   HG: user: test
   HG: branch 'silliness'
-  HG: changed foo
+  HG: added foo
   $ hg parents --template "{desc}\n"
   editor should be invoked