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

Force update when local branch is ahead #849

Merged
merged 7 commits into from
Aug 7, 2016
Merged

Force update when local branch is ahead #849

merged 7 commits into from
Aug 7, 2016

Conversation

fernandog
Copy link
Contributor

@fernandog fernandog commented Aug 4, 2016

@pymedusa/developers

we recently had to remove one commit from develop which caused a "Local branch is ahead of develop. Automatic update not possible" to develop users

this will affect only develop and master branches.

@fernandog fernandog changed the title Force update when not develop and local branch is ahead Force update when local branch is ahead Aug 4, 2016
@ratoaq2
Copy link
Contributor

ratoaq2 commented Aug 4, 2016

Is there a reason to have it only for master and develop?

@fernandog
Copy link
Contributor Author

fernandog commented Aug 4, 2016

@ratoaq2 if someone is using a testing branch or working on another branch and haven't pushed yet, he will lose the commits if this force updated it not only for develop|master

@ratoaq2
Copy link
Contributor

ratoaq2 commented Aug 4, 2016

Valid scenario. But there's another valid one:

  • 1 'production' installation running a specific branch other than master or develop (for testing purposes, most of the time)
  • 1 local dev environment

The local dev environment should never reset and force update, but the 'production' installation should.

@fernandog fernandog force-pushed the fix_update branch 6 times, most recently from 9e9f3d3 to 47eddaf Compare August 5, 2016 01:19
@fernandog fernandog added the Needs testing Requires testing to make sure it's working as intended label Aug 5, 2016
@fernandog
Copy link
Contributor Author

@ratoaq2 can you test please?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.004%) to 28.878% when pulling 21df105 on fix_update into ccc5f4e on develop.

newest_text = "Local branch is ahead of " + self.branch + ". Automatic update not possible."

elif self._num_commits_behind > 0:
if self._num_commits_behind > 0 or (sickbeard.GIT_RESET and sickbeard.BRANCH in sickbeard.GIT_RESET_BRANCHES):
Copy link
Contributor

Choose a reason for hiding this comment

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

If there's no branches in the list, it should accept as well

or (sickbeard.GIT_RESET and (not sickbeard.GIT_RESET_BRANCHES or sickbeard.BRANCH in sickbeard.GIT_RESET_BRANCHES)) 

The same logic some lines below (probably a function would fit: def should_reset)

Copy link
Contributor Author

@fernandog fernandog Aug 5, 2016

Choose a reason for hiding this comment

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

@ratoaq2 Did you try the Ui? Use must select branches in a pre-populated select

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.001%) to 28.88% when pulling d4ea5af9171746e78121850eb79e20af260d0c97 on fix_update into 73678cd on develop.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.001%) to 28.88% when pulling d4ea5af9171746e78121850eb79e20af260d0c97 on fix_update into 73678cd on develop.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.001%) to 28.88% when pulling 136531050014412618012e23ea8549bd09a9cb07 on fix_update into 73678cd on develop.

@coveralls
Copy link

coveralls commented Aug 6, 2016

Coverage Status

Coverage decreased (-0.008%) to 28.873% when pulling 5998b82aa05442c0f397a60c4851b0c2b4086c83 on fix_update into 73678cd on develop.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.008%) to 28.873% when pulling a11b790be9df04a074203b6fc024d6c32322622f on fix_update into 73678cd on develop.

@ratoaq2 ratoaq2 removed Needs review Needs testing Requires testing to make sure it's working as intended labels Aug 7, 2016
@ratoaq2
Copy link
Contributor

ratoaq2 commented Aug 7, 2016

Approved

Approved with PullApprove

fernandog and others added 5 commits August 7, 2016 08:43
…update restart loop when local branch is ahead but reset is not allowed. Allow to define an empty 'reset branch list' which means 'any branch' could be reset
Like 'ALLOWED_EXTENSIONS' and other settings
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.001%) to 28.88% when pulling 67f260b on fix_update into f90f3d3 on develop.

@fernandog fernandog merged commit a33244e into develop Aug 7, 2016
@fernandog fernandog deleted the fix_update branch August 7, 2016 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants