[PATCH 7 of 7] tests: add a test case verifying that mq respects --no-git option

Alexander Fomin afomin at fb.com
Tue Mar 21 13:08:40 EDT 2017


# HG changeset patch
# User Alexander Fomin <afomin at fb.com>
# Date 1490113938 25200
#      Tue Mar 21 09:32:18 2017 -0700
# Node ID 9a11a79f6bcdd1134484ddd8eace997b55e7073a
# Parent  e9044ade1523e847877f4eee1d4e06734e2aa4cd
tests: add a test case verifying that mq respects --no-git option

This patch adds a test case to verify that --no-git option still works in mq
after making it explicitly request binary diff even in Git mode (issue5510).

diff --git a/tests/test-mq.t b/tests/test-mq.t
--- a/tests/test-mq.t
+++ b/tests/test-mq.t
@@ -1162,6 +1162,21 @@ check binary patches can be popped and p
   8ba2a2f3e77b55d03051ff9c24ad65e7  bucephalus
 
 
+check binary patches respect --no-git
+
+  $ cat > writebin.py <<EOF
+  > import sys
+  > path = sys.argv[1]
+  > open(path, 'wb').write('BIN\x42RY')
+  > EOF
+  $ python writebin.py answer
+
+  $ python "$TESTDIR/md5sum.py" answer
+  ce0b4fda508e3d9f9ece98f8e823b6f7  answer
+  $ hg add answer
+  $ hg qnew -f --no-git addanswer
+  $ grep diff .hg/patches/addanswer
+  diff -r [a-f0-9]* -r [a-f0-9]* answer (re)
 
 strip again
 


More information about the Mercurial-devel mailing list