changeset 31607:aea8ec3f7dd1

py3: prove `hg {add,addremove,commit} all work We can't do a second commit in a repo yet, because pure-Python bdiff is broken on Python 3. That is probably a good next step.
author Augie Fackler <augie@google.com>
date Sun, 19 Mar 2017 01:47:56 -0400
parents 0b3eb280564b
children 4baf79a77afa
files tests/test-check-py3-commands.t
diffstat 1 files changed, 41 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-check-py3-commands.t	Thu Mar 23 10:46:50 2017 -0400
+++ b/tests/test-check-py3-commands.t	Sun Mar 19 01:47:56 2017 -0400
@@ -122,4 +122,44 @@
 
 `hg init` can create empty repos
 
-  $ $PYTHON3 `which hg` init emptyrepo
+  $ $PYTHON3 `which hg` init py3repo
+  $ cd py3repo
+  $ echo "This is the file 'iota'." > iota
+  $ $PYTHON3 $HGBIN status
+  ? iota
+  $ $PYTHON3 $HGBIN add iota
+  $ $PYTHON3 $HGBIN status
+  A iota
+  $ $PYTHON3 $HGBIN commit --message 'commit performed in Python 3'
+  $ $PYTHON3 $HGBIN status
+
+TODO: bdiff is broken on Python 3 so we can't do a second commit yet,
+when that works remove this rollback command.
+  $ hg rollback
+  repository tip rolled back to revision -1 (undo commit)
+  working directory now based on revision -1
+
+  $ mkdir A
+  $ echo "This is the file 'mu'." > A/mu
+  $ $PYTHON3 $HGBIN addremove
+  adding A/mu
+  $ $PYTHON3 $HGBIN status
+  A A/mu
+  A iota
+  $ HGEDITOR='echo message > ' $PYTHON3 $HGBIN commit
+  $ $PYTHON3 $HGBIN status
+
+Prove the repo is valid using the Python 2 `hg`:
+  $ hg verify
+  checking changesets
+  checking manifests
+  crosschecking files in changesets and manifests
+  checking files
+  2 files, 1 changesets, 2 total revisions
+  $ hg log
+  changeset:   0:e825505ba339
+  tag:         tip
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     message
+