##// END OF EJS Templates
convert: add a mode where mercurial_sink skips empty revisions....
convert: add a mode where mercurial_sink skips empty revisions. The getchanges function of some converter_source classes can return some false positives. I.e. they sometimes claim that a file "foo" was changed in some revision, even though its contents are still the same. convert_svn is particularly bad, but I think this can also happen with convert_cvs and, at least in theory, with mercurial_source. For regular conversions this is not really a problem - as long as getfile returns the right contents, we'll get a converted revision with the right contents. But when we use --filemap, this could lead to superfluous revisions being converted. Instead of fixing every converter_source, I decided to change mercurial_sink to work around this problem. When --filemap is used, we're interested only in revisions that touch some specific files. If a revision doesn't change any of these files, then we're not interested in it (at least for revisions with a single parent; merges are special). For mercurial_sink, we abuse this property and rollback a commit if the manifest text hasn't changed. This avoids duplicating the logic from localrepo.filecommit to detect unchanged files.

File last commit:

r4878:372d93f0 default
r5378:8a2915f5 default
Show More
test-diff-ignore-whitespace.out
289 lines | 4.4 KiB | text/plain | TextLexer
/ tests / test-diff-ignore-whitespace.out
Vadim Gelfer
add missed tests for diff -b/-B
r2594 adding foo
>>> two diffs showing three added lines <<<
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 hg diff
Vadim Gelfer
add missed tests for diff -b/-B
r2594 diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,5 @@ hello world
+
hello world
+
goodbye world
+
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 hg diff -b
Vadim Gelfer
add missed tests for diff -b/-B
r2594 diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,5 @@ hello world
+
hello world
+
goodbye world
+
>>> no diffs <<<
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 hg diff -B
hg diff -Bb
Vadim Gelfer
add missed tests for diff -b/-B
r2594 >>> four diffs showing added space first on the first line <<<
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 hg diff
Vadim Gelfer
add missed tests for diff -b/-B
r2594 diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,2 @@ hello world
-hello world
+ hello world
goodbye world
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 hg diff -b
Vadim Gelfer
add missed tests for diff -b/-B
r2594 diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,2 @@ hello world
-hello world
+ hello world
goodbye world
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 hg diff -B
Vadim Gelfer
add missed tests for diff -b/-B
r2594 diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,2 @@ hello world
-hello world
+ hello world
goodbye world
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 hg diff -Bb
Vadim Gelfer
add missed tests for diff -b/-B
r2594 diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,2 @@ hello world
-hello world
+ hello world
goodbye world
>>> two diffs showing space appended to the first line <<<
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 hg diff
Vadim Gelfer
add missed tests for diff -b/-B
r2594 diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,2 @@ hello world
-hello world
+hello world
goodbye world
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 hg diff -B
Vadim Gelfer
add missed tests for diff -b/-B
r2594 diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,2 @@ hello world
-hello world
+hello world
goodbye world
>>> no diffs <<<
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 hg diff -b
hg diff -Bb
Vadim Gelfer
add missed tests for diff -b/-B
r2594 >>> four diffs showing space inserted into "goodbye" <<<
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 hg diff
Vadim Gelfer
add missed tests for diff -b/-B
r2594 diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,2 @@ hello world
hello world
-goodbye world
+good bye world
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 hg diff -B
Vadim Gelfer
add missed tests for diff -b/-B
r2594 diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,2 @@ hello world
hello world
-goodbye world
+good bye world
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 hg diff -b
Vadim Gelfer
add missed tests for diff -b/-B
r2594 diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,2 @@ hello world
hello world
-goodbye world
+good bye world
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 hg diff -Bb
Vadim Gelfer
add missed tests for diff -b/-B
r2594 diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,2 @@ hello world
hello world
-goodbye world
+good bye world
>>> two diffs showing changed whitespace amount in the last line <<<
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 hg diff
Vadim Gelfer
add missed tests for diff -b/-B
r2594 diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,2 @@ hello world
hello world
-goodbye world
+goodbye world
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 hg diff -B
Vadim Gelfer
add missed tests for diff -b/-B
r2594 diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,2 @@ hello world
hello world
-goodbye world
+goodbye world
>>> no diffs <<<
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 hg diff -b
hg diff -Bb
Vadim Gelfer
add missed tests for diff -b/-B
r2594 >>> four diffs showing added blank line w/horizontal space <<<
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 hg diff
Vadim Gelfer
add missed tests for diff -b/-B
r2594 diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,3 @@ hello world
hello world
+
goodbye world
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 hg diff -B
diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,3 @@ hello world
hello world
+
goodbye world
hg diff -b
Vadim Gelfer
add missed tests for diff -b/-B
r2594 diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,3 @@ hello world
hello world
+
goodbye world
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 hg diff -Bb
>>> three diffs showing added blank line w/other space <<<
hg diff
diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,3 @@ hello world
-hello world
-goodbye world
+hello world
+
+goodbye world
hg diff -B
diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,3 @@ hello world
-hello world
-goodbye world
+hello world
+
+goodbye world
hg diff -b
Vadim Gelfer
add missed tests for diff -b/-B
r2594 diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,3 @@ hello world
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 -hello world
-goodbye world
+hello world
Vadim Gelfer
add missed tests for diff -b/-B
r2594 +
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 +goodbye world
hg diff -Bb
>>> four diffs showing changed whitespace <<<
hg diff
diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,2 @@ hello world
-hello world
-goodbye world
+helloworld
+goodbye world
hg diff -B
diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,2 @@ hello world
-hello world
-goodbye world
+helloworld
+goodbye world
hg diff -b
diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,2 @@ hello world
-hello world
-goodbye world
+helloworld
+goodbye world
hg diff -Bb
diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,2 @@ hello world
-hello world
-goodbye world
+helloworld
+goodbye world
hg diff -w
>>> five diffs showing changed whitespace <<<
hg diff
Vadim Gelfer
add missed tests for diff -b/-B
r2594 diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
Matt Mackall
diff: correctly handle combinations of whitespace options
r4878 @@ -1,2 +1,5 @@ hello world
-hello world
-goodbye world
+helloworld
+
+
+
+goodbye world
hg diff -B
diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,5 @@ hello world
-hello world
-goodbye world
+helloworld
+
+
+
+goodbye world
hg diff -b
diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,5 @@ hello world
-hello world
-goodbye world
+helloworld
+
+
+
+goodbye world
hg diff -Bb
diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,5 @@ hello world
-hello world
-goodbye world
+helloworld
+
+
+
+goodbye world
hg diff -w
diff -r 540c40a65b78 foo
--- a/foo
+++ b/foo
@@ -1,2 +1,5 @@ hello world
-hello world
-goodbye world
+helloworld
+
+
+
+goodbye world
hg diff -wB