Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mercurial-devel
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mercurial
mercurial-devel
Commits
3774e1453ef4
Commit
3774e1453ef4
authored
13 years ago
by
Patrick Mezard
Browse files
Options
Downloads
Patches
Plain Diff
diff: --ignore-blank-lines was too enthusiastic
It was ignoring changes from: ab to: a b
parent
00276525e2b7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mercurial/mdiff.py
+1
-1
1 addition, 1 deletion
mercurial/mdiff.py
tests/test-diff-ignore-whitespace.t
+13
-0
13 additions, 0 deletions
tests/test-diff-ignore-whitespace.t
with
14 additions
and
1 deletion
mercurial/mdiff.py
+
1
−
1
View file @
3774e145
...
...
@@ -72,7 +72,7 @@
text
=
re
.
sub
(
'
[
\t\r
]+
'
,
'
'
,
text
)
text
=
text
.
replace
(
'
\n
'
,
'
\n
'
)
if
blank
and
opts
.
ignoreblanklines
:
text
=
re
.
sub
(
'
\n
+
'
,
''
,
text
)
text
=
re
.
sub
(
'
\n
+
'
,
'
\n
'
,
text
)
.
strip
(
'
\n
'
)
return
text
def
diffline
(
revs
,
a
,
b
,
opts
):
...
...
This diff is collapsed.
Click to expand it.
tests/test-diff-ignore-whitespace.t
+
13
−
0
View file @
3774e145
...
...
@@ -442,3 +442,16 @@
New
line
not
noticed
when
space
change
ignored:
$
hg
ndiff
--
ignore
-
blank
-
lines
--
ignore
-
all
-
space
Do
not
ignore
all
newlines
,
only
blank
lines
$
printf
'
hello \nworld\ngoodbye world\n
'
>
foo
$
hg
ndiff
--
ignore
-
blank
-
lines
diff
-
r
540
c40a65b78
foo
---
a
/
foo
+++
b
/
foo
@@
-
1
,
2
+
1
,
3
@@
-
hello
world
+
hello
+
world
goodbye
world
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment