mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
tests: add some testing for patch.diffstat()
This commit is contained in:
parent
d6688cc959
commit
fc7a3b7024
@ -70,3 +70,17 @@ hg --traceback --cwd b pull ../a 2>&1 | sed -e 's/\(Message-Id:\).*/\1/' \
|
||||
-e 's/changeset \([0-9a-f]*\) in .*/changeset \1/' \
|
||||
-e 's/^Date:.*/Date:/'
|
||||
|
||||
cat << EOF >> $HGRCPATH
|
||||
[hooks]
|
||||
incoming.notify = python:hgext.notify.hook
|
||||
|
||||
[notify]
|
||||
sources = pull
|
||||
diffstat = True
|
||||
EOF
|
||||
|
||||
echo % pull
|
||||
hg --cwd b rollback
|
||||
hg --traceback --cwd b pull ../a 2>&1 | sed -e 's/\(Message-Id:\).*/\1/' \
|
||||
-e 's/changeset \([0-9a-f]*\) in .*/changeset \1/' \
|
||||
-e 's/^Date:.*/Date:/'
|
||||
|
@ -64,3 +64,35 @@ diff -r cb9a9f314b8b -r 0647d048b600 a
|
||||
a
|
||||
+a
|
||||
(run 'hg update' to get a working copy)
|
||||
% pull
|
||||
rolling back last transaction
|
||||
pulling from ../a
|
||||
searching for changes
|
||||
adding changesets
|
||||
adding manifests
|
||||
adding file changes
|
||||
added 1 changesets with 1 changes to 1 files
|
||||
Date:
|
||||
Subject: b
|
||||
From: test@test.com
|
||||
X-Hg-Notification: changeset 0647d048b600
|
||||
Message-Id:
|
||||
To: baz@test.com, foo@bar
|
||||
|
||||
changeset 0647d048b600
|
||||
description:
|
||||
b
|
||||
diffstat:
|
||||
|
||||
1 file changed, 1 insertion(+)
|
||||
a | 1 +
|
||||
|
||||
diffs (6 lines):
|
||||
|
||||
diff -r cb9a9f314b8b -r 0647d048b600 a
|
||||
--- a/a Thu Jan 01 00:00:00 1970 +0000
|
||||
+++ b/a Thu Jan 01 00:00:01 1970 +0000
|
||||
@@ -1,1 +1,2 @@
|
||||
a
|
||||
+a
|
||||
(run 'hg update' to get a working copy)
|
||||
|
Loading…
Reference in New Issue
Block a user