mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
patch: inline only field usage
This commit is contained in:
@@ -53,7 +53,7 @@ public class PatchReader {
|
||||
@NonNls private static final Pattern ourUnifiedHunkStartPattern = Pattern.compile("@@ -(\\d+)(,(\\d+))? \\+(\\d+)(,(\\d+))? @@.*");
|
||||
@NonNls private static final Pattern ourContextBeforeHunkStartPattern = Pattern.compile("\\*\\*\\* (\\d+),(\\d+) \\*\\*\\*\\*");
|
||||
@NonNls private static final Pattern ourContextAfterHunkStartPattern = Pattern.compile("--- (\\d+),(\\d+) ----");
|
||||
@NonNls private static final Pattern EMPTY_REVISION_INFO_PATTERN = Pattern.compile(TextPatchBuilder.getEmptyRevisionPattern());
|
||||
@NonNls private static final Pattern ourEmptyRevisionInfoPattern = Pattern.compile("\\(\\s*revision\\s*\\)");
|
||||
|
||||
public PatchReader(CharSequence patchContent) {
|
||||
this(patchContent, true);
|
||||
@@ -570,7 +570,7 @@ public class PatchReader {
|
||||
if (pos >= 0) {
|
||||
String versionId = fileName.substring(pos).trim();
|
||||
fileName = fileName.substring(0, pos);
|
||||
if (versionId.length() > 0 && !EMPTY_REVISION_INFO_PATTERN.matcher(versionId).matches()) {
|
||||
if (versionId.length() > 0 && !ourEmptyRevisionInfoPattern.matcher(versionId).matches()) {
|
||||
if (before) {
|
||||
patch.setBeforeVersionId(versionId);
|
||||
}
|
||||
|
||||
-6
@@ -43,7 +43,6 @@ public class TextPatchBuilder {
|
||||
private static final int CONTEXT_LINES = 3;
|
||||
@NonNls private static final String REVISION_NAME_TEMPLATE = "(revision {0})";
|
||||
@NonNls private static final String DATE_NAME_TEMPLATE = "(date {0})";
|
||||
@NonNls private static final String EMPTY_REVISION_INFO = "\\(\\s*revision\\s*\\)";
|
||||
|
||||
@NotNull private final String myBasePath;
|
||||
private final boolean myIsReversePath;
|
||||
@@ -65,11 +64,6 @@ public class TextPatchBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static String getEmptyRevisionPattern() {
|
||||
return EMPTY_REVISION_INFO;
|
||||
}
|
||||
|
||||
public static List<FilePatch> buildPatch(final Collection<BeforeAfter<AirContentRevision>> changes, @NotNull final String basePath,
|
||||
final boolean reversePatch,
|
||||
final boolean isCaseSensitive,
|
||||
|
||||
Reference in New Issue
Block a user