##// END OF EJS Templates
revpair: update test to make a difference if odd range not handled specially...
revpair: update test to make a difference if odd range not handled specially It was added at 2a0efa1112ac, but there was no difference between -r2 and -r2:2 because the working directory was clean.

File last commit:

r26019:85f5352c default
r26019:85f5352c default
Show More
test-diff-change.t
103 lines | 2.0 KiB | text/troff | Tads3Lexer
/ tests / test-diff-change.t
Adrian Buehlmann
tests: unify test-diff-change
r12136 Testing diff --change
$ hg init a
$ cd a
$ echo "first" > file.txt
$ hg add file.txt
$ hg commit -m 'first commit' # 0
$ echo "second" > file.txt
$ hg commit -m 'second commit' # 1
$ echo "third" > file.txt
$ hg commit -m 'third commit' # 2
$ hg diff --nodates --change 1
diff -r 4bb65dda5db4 -r e9b286083166 file.txt
--- a/file.txt
+++ b/file.txt
@@ -1,1 +1,1 @@
-first
+second
$ hg diff --change e9b286083166
diff -r 4bb65dda5db4 -r e9b286083166 file.txt
--- a/file.txt Thu Jan 01 00:00:00 1970 +0000
+++ b/file.txt Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +1,1 @@
-first
+second
Yuya Nishihara
revpair: update test to make a difference if odd range not handled specially...
r26019 $ cd ..
Matt Mackall
revpair: handle odd ranges (issue3474)
r16790 Test dumb revspecs (issue3474)
Yuya Nishihara
revpair: update test to make a difference if odd range not handled specially...
r26019 $ hg clone -q a dumbspec
$ cd dumbspec
$ echo "wdir" > file.txt
Matt Mackall
revpair: handle odd ranges (issue3474)
r16790 $ hg diff -r 2:2
$ hg diff -r "2 and 1"
abort: empty revision range
[255]
Adrian Buehlmann
tests: unify test-diff-change
r12136
Yuya Nishihara
revpair: update test to make a difference if odd range not handled specially...
r26019 $ cd ..
Adrian Buehlmann
tests: unify test-diff-change
r12136 Testing diff --change when merge:
Yuya Nishihara
revpair: update test to make a difference if odd range not handled specially...
r26019 $ cd a
Adrian Buehlmann
tests: unify test-diff-change
r12136 $ for i in 1 2 3 4 5 6 7 8 9 10; do
Mads Kiilerich
tests: fix incorrect markup of continued lines of sh commands
r16487 > echo $i >> file.txt
> done
Adrian Buehlmann
tests: unify test-diff-change
r12136 $ hg commit -m "lots of text" # 3
$ sed -e 's,^2$,x,' file.txt > file.txt.tmp
$ mv file.txt.tmp file.txt
$ hg commit -m "change 2 to x" # 4
$ hg up -r 3
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ sed -e 's,^8$,y,' file.txt > file.txt.tmp
$ mv file.txt.tmp file.txt
$ hg commit -m "change 8 to y"
created new head
$ hg up -C -r 4
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg merge -r 5
merging file.txt
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg commit -m "merge 8 to y" # 6
$ hg diff --change 5
diff -r ae119d680c82 -r 9085c5c02e52 file.txt
--- a/file.txt Thu Jan 01 00:00:00 1970 +0000
+++ b/file.txt Thu Jan 01 00:00:00 1970 +0000
@@ -6,6 +6,6 @@
5
6
7
-8
+y
9
10
must be similar to 'hg diff --change 5':
$ hg diff -c 6
diff -r 273b50f17c6d -r 979ca961fd2e file.txt
--- a/file.txt Thu Jan 01 00:00:00 1970 +0000
+++ b/file.txt Thu Jan 01 00:00:00 1970 +0000
@@ -6,6 +6,6 @@
5
6
7
-8
+y
9
10
Mads Kiilerich
tests: add missing trailing 'cd ..'...
r16913 $ cd ..