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

Lite Repo Merge Strategy Flawed #118

Open
jaswrks opened this issue Jun 18, 2016 · 7 comments
Open

Lite Repo Merge Strategy Flawed #118

jaswrks opened this issue Jun 18, 2016 · 7 comments
Labels

Comments

@jaswrks
Copy link
Contributor

jaswrks commented Jun 18, 2016

The problem is explained here. It has to do with us currently depending only on --strategy-option=theirs, which doesn't deal with deleted files as one would expect it to.

A possible solution is to use git reset 000000-dev and work from there.

$ git checkout master
$ git reset 000000-dev

Or maybe to detect a non-zero exit status when attempting the merge with --strategy-option=theirs. If that fails and git status --porcelain shows 'deleted by them' as the only problem (should be the only problem), we can iterate deletion conflicts and remove them automatically. Inspired by: http://stackoverflow.com/a/20846795/1219741

@jaswrks jaswrks added the bug label Jun 18, 2016
@raamdev
Copy link
Contributor

raamdev commented Jun 18, 2016

Also noting these steps that I followed to get around this issue while releasing Comment Mail v160618:

$ git checkout master
$ git reset 000000-dev
$ git add --all
$ git commit -m 'Manually pushing 000000-dev into master'
$ git merge -m 'Merge remote-tracking branch 'refs/remotes/origin/master'
$ git push

UPDATE 2016-06-18 20:52:52 EDT:

The above ↑ commands may not have worked. It could've been an error on my part (e.g., I forgot t reproduce a Phing step prior to running those commands), but what I ended up with on the remote GitHub repo was just an old copy of master, i.e., not updated. However, I suspect that this was because I did not first update 000000-dev with the updated files generated by Phing before doing the git reset 000000-dev.

In any case, care should be taken before assuming the above steps "just work".

@raamdev
Copy link
Contributor

raamdev commented Nov 18, 2016

Noting that one common reason for master to get behind dev, at least on the Lite repo, is that publishing an RC release via the Phing build system does not update the master branch, but does update the dev branch.

@jaswrks
Copy link
Contributor Author

jaswrks commented Dec 21, 2016

@raamdev Just checking in here. Any additional thoughts on this issue? Has this been an ongoing problem for you? Anything come to mind that we could do to avoid this?

@jaswrks
Copy link
Contributor Author

jaswrks commented Dec 21, 2016

Sorry, I'm not asking you to solve this. I'm just looking for some inspiration here. I'm not exactly sure what needs to change on this yet, because I haven't personally run into this just yet.

@raamdev
Copy link
Contributor

raamdev commented Dec 22, 2016

@jaswsinc Yes, this is still an issue I deal with during every release (as you can see from all of the GitHub issues linked to this issue above). Or at least I should say that it's an issue I still account for during every release.

I have the following step in my release plan template to ensure that I don't run into this problem during a release:

2016-12-22_11-31-55

Following those steps above before doing a final phing release, I never run into any issues.

@jaswrks
Copy link
Contributor Author

jaswrks commented Dec 22, 2016

I see. So if I understand correctly, this is not an issue you've run into again yet because you've been running through those steps to ensure it doesn't happen to you again.

I'm just looking back over my original comments following our original conversation about this, where I noted that:

The problem is explained here. It has to do with us currently depending only on --strategy-option=theirs, which doesn't deal with deleted files as one would expect it to.

I'm beginning to remember how this occurred now. It only happens when the master branch has deletions, and those deletions are still present in the dev branch (e.g., files added back in). In such a case, even using --strategy-option=theirs doesn't allow Git to automatically resolve conflicts.

@raamdev
Copy link
Contributor

raamdev commented Dec 22, 2016

It only happens when the master branch has deletions, and those deletions are still present in the dev branch (e.g., files added back in).

That sounds right, yes. Its been awhile since this issue occurred to me and I can't recall details about what caused it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants