Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split patches #37

Merged
merged 1 commit into from
Dec 29, 2017
Merged

Split patches #37

merged 1 commit into from
Dec 29, 2017

Conversation

kevinlawler
Copy link
Contributor

@kevinlawler kevinlawler commented Dec 16, 2017

// When splitting one large diff into a per-file diff, there are a few ways
// you can go about it. Because different files can have the same name
// (by being located in different directories), you need to avoid collisions.
// Mirroring the directory structure seems undesirable.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that it is undesirable. I think we should either mimic the actual directory structure or make the directory part of the file name (net/base/network_delegate.cc -> net-base-network_delegate.cc)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the reason is that if I'm searching for a particular patch file, I want an easy way to identify it without looking at the actual contents

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way it currently works is net/base/network_delegate.cc -> net.base.network_delegate.cc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(We can make it do dashes by changing desiredReplacementString)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, misread it. Yea, let's use - instead

}

if (replacingBackslashes) {
revised = revised.replace(/\\/g, desiredReplacementString)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git always uses forward slashes, right?

@bridiver
Copy link
Contributor

this looks good, but we should probably do an antimuon PR as well to actually split them

Copy link
Contributor

@bridiver bridiver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

console.log('updatePatches wrote ' + (1 + i) + '/' + n + ': ' + filename)
}

// finish off by creating one big patch for deleted files
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can probably leave this out. I can't think of any reason why we would need to delete a file vs patching a build script to leave it out

kevinlawler referenced this pull request in brave/brave-core Dec 29, 2017
and one big file for Deleted files
for issue brave/brave-browser-snap#36

fixes from pr comments:
use '-' as separator
only need to replace '/' not '\\'

standardize diff prefixes to a/ and b/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants