Create account / Log in

Moving on with deployment and build handling

Discussion area for the development team.

Moderators: uckelman, Tim M

Re: Moving on with deployment and build handling

Postby Cattlesquat » July 22nd, 2020, 12:53 am

Oh man, I missed the best part of this thread when I needed it most!

Yan should I try "squashing" my other PR's where I guess I rebased them wrong? If you have any suggestions for what the best way to do that is, let me know. I was thinking of pulling one down, checking it out, and trying:
git reset --soft HEAD~20 &&
git commit

Or something like that. But maybe that's a bad idea?
User avatar
Cattlesquat
 
Posts: 953
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Moving on with deployment and build handling

Postby Cattlesquat » July 22nd, 2020, 1:00 am

Okay my best "man-page" entry was the one that "approves all non-fucked commits" or something to that effect. COMPLETELY fitting for today! :D
User avatar
Cattlesquat
 
Posts: 953
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Moving on with deployment and build handling

Postby Flint1b » July 22nd, 2020, 1:13 am

I rewrote the history for all my unmerged PRs, I think that's the cleanest way after this multi-module change.

I suggest we go step by step and do this for one PR first, starting with this one: https://github.com/vassalengine/vassal/pull/34

First, do a backup, checkout that branch and create a new backup branch off of it.

Second, reset it back to where it was before your merged master, the "hard" way, with "git reset --hard a1804a3" (that's your last commit isn't it? double-check please, maybe I missed something)

Third, rebase this whole branch on master, i.e. make it appear as if this branch is branched off the latest commit in master. I use graphical tools for this but I think it's this on the command line, at least it's what my graphical git does underneath:
Code: Select all
git checkout master
git rebase HEAD HTMLChatter


Third B) Now would be a good time to reorder/squash/fixup commit, I squashed all my commits into one at this point, you can do that too with "git rebase interactive" (I really recommend a graphical client for this).

Fourth, check if everything looks good, if you added new files they might have ended up in the old structure under /src/main/java or /src/main/resources, in that case "git mv" them to /vassal-app/src/main/... and commit them. Do a "mvn clean test" just in case.

Fifth, force push them to github with "git push --force". Then check what it looks like on github, there should be only your commits in the PR.
User avatar
Flint1b
 
Posts: 461
Joined: May 19th, 2020, 12:27 am
Location: Colonia Agrippina

Re: Moving on with deployment and build handling

Postby Cattlesquat » July 22nd, 2020, 1:16 am

Just to make sure I know the right way, what's the best way to "create a new backup branch off it"?
git checkout [branch]
git checkout -b "some other branch name"?
User avatar
Cattlesquat
 
Posts: 953
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Moving on with deployment and build handling

Postby Cattlesquat » July 22nd, 2020, 1:27 am

Well, first try at rebasing didn't go so well. Ended up with some merge conflict and I still haven't quite gotten the sequence of commands for getting going again after resolving conflicts (or maybe I didn't resolve conflicts to its satisfaction).

Returned to the ship, nuked the site from orbit, and trying again...
User avatar
Cattlesquat
 
Posts: 953
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Moving on with deployment and build handling

Postby Cattlesquat » July 22nd, 2020, 1:31 am

On second try, after the rebase command (and conflict appears), I type:
git mergetool (and fix the conflict)
git add ......the long path to the Chatter.java file
git rebase --continue

And then I get the following spew of problems:
[detached HEAD cd716d1f] HTML Chatter w/ security & compatibility improvements
Author: Cattlesquat <brian@brianreynolds.net>
1 file changed, 497 deletions(-)
delete mode 100644 vassal-app/src/main/java/VASSAL/build/module/Chatter.java
error: could not apply d53096f4... Fixups from yanlyub's code review
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply d53096f4... Fixups from yanlyub's code review
CONFLICT (modify/delete): src/VASSAL/build/module/Chatter.java deleted in HEAD and modified in d53096f4... Fixups from yanlyub's code review. Version d53096f4... Fixups from yanlyub's code review of src/VASSAL/build/module/Chatter.java left in tree.


I do (I think) have a backup branch I made. Also I haven't pushed anything since I did the "hard" rewind thing, so I can also nuke the site from orbit again and try again with different commands if you want?
User avatar
Cattlesquat
 
Posts: 953
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Moving on with deployment and build handling

Postby Flint1b » July 22nd, 2020, 1:37 am

I have to see the problem, I will try it myself.
User avatar
Flint1b
 
Posts: 461
Joined: May 19th, 2020, 12:27 am
Location: Colonia Agrippina

Re: Moving on with deployment and build handling

Postby Flint1b » July 22nd, 2020, 2:04 am

There was a whole bunch of merge conflicts, basically a set of merge conflicts in Chatter.java for each of your commits in that branch. I resolved them (hopefully the right way..), squashed this whole branch into one commit, and pushed to my repo at https://github.com/yanlyub/vassal/tree/HTMLChatter-fix.
User avatar
Flint1b
 
Posts: 461
Joined: May 19th, 2020, 12:27 am
Location: Colonia Agrippina

Re: Moving on with deployment and build handling

Postby Cattlesquat » July 22nd, 2020, 2:05 am

What is my method for pull that into the PR?

Also my local master is screwed up now, I can't seem to get it back to "normal". How do I tell it to forget everything locally and on Cattlesquat?
User avatar
Cattlesquat
 
Posts: 953
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Moving on with deployment and build handling

Postby Flint1b » July 22nd, 2020, 2:15 am

Good question..

Rename the local branch HTMLChatter to something else like HTMLChatter-old, then create a new branch with the exact name "HTMLChatter" off current master, then merge my branch into that one, then force push.. This should replace the whole PR with that one single commit.

Just make sure it works and is what you intended to change before you push, I didn't even try to compile it, there were some deletions in the merge conflicts and if I understood correctly you deleted an inner class "UI".
User avatar
Flint1b
 
Posts: 461
Joined: May 19th, 2020, 12:27 am
Location: Colonia Agrippina

Re: Moving on with deployment and build handling

Postby Flint1b » July 22nd, 2020, 2:18 am

Cattlesquat wrote:Also my local master is screwed up now, I can't seem to get it back to "normal". How do I tell it to forget everything locally and on Cattlesquat?


Your github repo's master says "This branch is even with vassalengine:master.". Find out where your local master diverges from that, "reset --hard <commitid>" to that commit, then merge upstream:master or origin:master into it.
User avatar
Flint1b
 
Posts: 461
Joined: May 19th, 2020, 12:27 am
Location: Colonia Agrippina

Re: Moving on with deployment and build handling

Postby Cattlesquat » July 22nd, 2020, 2:21 am

Oh, it's actually a "worse" problem -- somehow Eclipse doesn't think Chatter is part of the project any more, so I boot it up and it deletes the file, and so git is asking me if I want to check in the deletion of the file. So then I "git restore" the file and git says I'm okay, but then Eclipse adds some weird "untracked" version of Chatter with a different name in the same directory, and it adds another one every time.
User avatar
Cattlesquat
 
Posts: 953
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Moving on with deployment and build handling

Postby Flint1b » July 22nd, 2020, 2:26 am

Cattlesquat wrote:it deletes the file

It deletes files just like that?! Take revenge -- delete Eclipse :D
User avatar
Flint1b
 
Posts: 461
Joined: May 19th, 2020, 12:27 am
Location: Colonia Agrippina

Re: Moving on with deployment and build handling

Postby Cattlesquat » July 22nd, 2020, 2:28 am

Well now I've deleted the whole project from Eclipse again, and told it to "delete the files" and so forth.

But now I can't seem to pull master down again with git -- or rather it says "I'm up to date" but I have this huge list of red files to be deleted or something.
User avatar
Cattlesquat
 
Posts: 953
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Moving on with deployment and build handling

Postby Cattlesquat » July 22nd, 2020, 2:29 am

I do have deleting eclipse on my schedule, but I want it to be far enough in the future that I don't have to maintain my 3.2.17 custom code any more.

It won't let me "git restore *" all the red files because "permission denied"
User avatar
Cattlesquat
 
Posts: 953
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

PreviousNext

Return to Developers

Who is online

Users browsing this forum: No registered users and 1 guest

cron