Skip to content

handle deleted files in --new-pr#1853

Merged
boegel merged 13 commits intoeasybuilders:developfrom
Caylo:new_pr_delete
Aug 11, 2016
Merged

handle deleted files in --new-pr#1853
boegel merged 13 commits intoeasybuilders:developfrom
Caylo:new_pr_delete

Conversation

@Caylo
Copy link
Copy Markdown
Contributor

@Caylo Caylo commented Jul 25, 2016

usage: eb --new-pr [path to deleted file]
cfr #1674

includes #1867

@boegel boegel added this to the v2.9.0 milestone Aug 3, 2016
@boegel
Copy link
Copy Markdown
Member

boegel commented Aug 3, 2016

I would go with eb --new-pr :gzip1-6.eb (or eb --new-pr -gzip1-6.eb, and why not support both)

Comment thread easybuild/tools/github.py Outdated
from vsc.utils.missing import nub

from easybuild.framework.easyconfig.easyconfig import copy_easyconfigs
from easybuild.framework.easyconfig.easyconfig import copy_easyconfigs, process_easyconfig
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why import process_easyconfig if it's not being used?

@boegel
Copy link
Copy Markdown
Member

boegel commented Aug 5, 2016

@Caylo I made some changes to this, see Caylo#30

Comment thread easybuild/tools/github.py Outdated
if len(hits) == 1:
deleted_paths.append(hits[0])
else:
raise EasyBuildError("Path doesn't exist or deleted file isn't found in target branch: %s", fn)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

s/deleted file/file to delete/g

Comment thread easybuild/tools/github.py Outdated
main_title = ', '.join(names_and_versions)
else:
main_title = ', '.join(names_and_versions[:3] + ['...'])
if file_info['ecs'] and any(file_info['new']):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Caylo this should be all(file_info['new']), no? We only want to auto-guess the title if all easyconfigs are new?

Comment thread easybuild/tools/github.py Outdated
main_title = ', '.join(names_and_versions)
else:
main_title = ', '.join(names_and_versions[:3] + ['...'])
if file_info['ecs'] and all(file_info['new']):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

also add and not deleted_paths, i.e. enforce picking a custom title with easyconfigs are added/removed in a single go

@boegel
Copy link
Copy Markdown
Member

boegel commented Aug 11, 2016

Going in, thanks @Caylo!

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