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

newt: Add external repos patches support #550

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

m-gorecki
Copy link
Contributor

Now if package that adds external repository contains directory patches/external_repo_name, newt will try to apply patches inside this directory to the external repo.

Copy link
Contributor

@kasjer kasjer left a comment

Choose a reason for hiding this comment

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

Tested OK.

Check fails because code tries to commit (apply patches) without settings git user.name user.email

Copy link
Contributor

@sjanc sjanc left a comment

Choose a reason for hiding this comment

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

I think we should use GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL to avoid requiring git configuration by user. Also this would allow us to have 'newt' as committer ie:
GIT_COMMITTER_NAME=newt
GIT_COMMITTER_EMAIL=dev@mynewt.apache.org

}
cmd = append(cmd, patches...)

_, err := executeGitCommand(repoDir, cmd, true)
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm should we even try to execute 'git am' if no patches were provided?

@kasjer
Copy link
Contributor

kasjer commented Apr 5, 2024

When patch fails affected git repository stays in state that git am --abort or git am --skip are required. Maybe newt could call git am --abort as not to leave git in the middle of git am session

Now if package that adds external repository contains directory
patches/*external_repo_name*, newt will try to apply patches
inside this directory to the external repo.
@m-gorecki
Copy link
Contributor Author

@kasjer Fix applied

@kasjer
Copy link
Contributor

kasjer commented Apr 5, 2024

Verified to work

@kasjer kasjer merged commit f95aa66 into apache:master Apr 5, 2024
59 checks passed
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.

3 participants