Skip to content

Commit fa7a29e

Browse files
authored
Merge pull request #40 from cscorley/issue-39-fix-context-diffs
Fix bug where context diffs would not parse
2 parents 503e5aa + 62ec16e commit fa7a29e

File tree

6 files changed

+821
-644
lines changed

6 files changed

+821
-644
lines changed

HISTORY.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# next
22

33
- PR #37 Replace nose with pytest (Thanks, @MeggyCal)
4+
- PR #39 Fix bug where context diffs would not parse (Thanks, @FallenSky2077)
45

56
# 1.0.0
67

@@ -18,15 +19,16 @@ Dev-only:
1819
# 0.0.6
1920

2021
- PR #13 Support for reverse patching (Thanks, @graingert)
21-
- This is a breaking change that converted the parsed tuples into
22-
namedtuples and added the hunk number to that tuple
22+
- This is a breaking change that converted the parsed tuples into namedtuples
23+
and added the hunk number to that tuple
2324
- PR #20 Support up to Python 3.7, drop support for 3.3 (Thanks, @graingert)
2425
- Issue #18 fix for empty file adds in git
2526

2627
# 0.0.5
2728

2829
- PR #6 Added better support for binary files. (Thanks, @ramusus)
29-
- PR #3 Added support for git index revision ids that have more than 7 characters (Thanks, @jopereria)
30+
- PR #3 Added support for git index revision ids that have more than 7
31+
characters (Thanks, @jopereria)
3032

3133
# 0.0.4
3234

@@ -51,5 +53,5 @@ Dev-only:
5153
# 0.0.1
5254

5355
- The very first release that included parsing support for patches in unified
54-
diff format, context diff format, ed diff format, git, bazaar, subversion,
55-
and cvs.
56+
diff format, context diff format, ed diff format, git, bazaar, subversion, and
57+
cvs.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
setup(
1313
name="whatthepatch",
14-
version="1.0.0",
14+
version="1.0.1",
1515
author="Christopher S. Corley",
1616
author_email="[email protected]",
1717
description="A patch parsing and application library.",
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
*** ../bash-4.2-patched/lib/glob/gmisc.c 2011-02-05 16:11:17.000000000 -0500
2+
--- lib/glob/gmisc.c 2011-02-18 23:53:42.000000000 -0500
3+
***************
4+
*** 295,300 ****
5+
{
6+
pat++;
7+
if (*pat == ']') /* right bracket can appear as equivalence class */
8+
! pat++;
9+
in_equiv = 1;
10+
}
11+
--- 331,340 ----
12+
{
13+
pat++;
14+
+ bracklen++;
15+
if (*pat == ']') /* right bracket can appear as equivalence class */
16+
! {
17+
! pat++;
18+
! bracklen++;
19+
! }
20+
in_equiv = 1;

tests/test_apply.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def setUp(self):
2626
self.lao = f.read().splitlines()
2727

2828
with open("tests/casefiles/tzu") as f:
29-
self.tzu = f.read().splitlines()
29+
self.tzu = f.read().splitlines()
3030

3131
def test_truth(self):
3232
self.assertEqual(type(self.lao), list)

0 commit comments

Comments
 (0)