Skip to content

ptl-tool: checkout branch after creation#18157

Merged
joscollin merged 1 commit intoceph:masterfrom
batrick:ptl-tool-branch-checkout
Oct 9, 2017
Merged

ptl-tool: checkout branch after creation#18157
joscollin merged 1 commit intoceph:masterfrom
batrick:ptl-tool-branch-checkout

Conversation

@batrick
Copy link
Member

@batrick batrick commented Oct 6, 2017

This PR addresses batrick#3

Signed-off-by: Patrick Donnelly pdonnell@redhat.com

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
@batrick
Copy link
Member Author

batrick commented Oct 6, 2017

@joscollin should address batrick#3

G.create_head(branch)
log.info("Created branch {branch}".format(branch=branch))
G.head.reference = G.create_head(branch, force=True)
log.info("Checked out new branch {branch}".format(branch=branch))
Copy link
Member

Choose a reason for hiding this comment

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

I think this change needs to be combined. I mean, if a test branch already exist, then use it. Don't create a new one. If it doesn't exist then create a new one.

Because when I test it, I saw that if I execute the below commands, to merge 18107 and 10108 separately,

$ src/script/ptl-tool.py --base master --label wip-jcollin-testing 18107
$ src/script/ptl-tool.py --base master --label wip-jcollin-testing 18108

The changes provided by 18107 gets overwritten by the second execution of ptl-tool.py !

Copy link
Member Author

Choose a reason for hiding this comment

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

That's intended. You should use --base-path heads/ --base wip-jcollin-testing --branch wip-jcollin-testing instead.

Copy link
Member

Choose a reason for hiding this comment

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

It gives me:

Detaching HEAD onto base: wip-jcollin-testing-20171007
Branch wip-jcollin-testing-20171007 does not exist!

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, use --base-path refs/heads/.

@joscollin
Copy link
Member

retest this please

Copy link
Member

@joscollin joscollin left a comment

Choose a reason for hiding this comment

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

This issue was very much annoying. Thanks for the Fix.

Merging this as the script is independent from Ceph.

@joscollin joscollin merged commit 2953986 into ceph:master Oct 9, 2017
@batrick batrick deleted the ptl-tool-branch-checkout branch December 14, 2017 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants