[PATCH 4 of 4 py3] py3: prove `hg {add,addremove,commit} all work
Augie Fackler
raf at durin42.com
Tue Mar 21 15:13:03 EDT 2017
# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1489902476 14400
# Sun Mar 19 01:47:56 2017 -0400
# Node ID c45ada02713a079e62f67340f84727ba593e5a3b
# Parent 3af735529b5f475e5c53ffaf7b136eecb97fcd61
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.
diff --git a/tests/test-check-py3-commands.t b/tests/test-check-py3-commands.t
--- a/tests/test-check-py3-commands.t
+++ b/tests/test-check-py3-commands.t
@@ -122,4 +122,44 @@ Test bytes-ness of policy.policy with HG
`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
+
More information about the Mercurial-devel
mailing list