Combined Protocol Custom Build

More
22 Jul 2015 20:15 #35808 by greenfly
Combined Protocol Custom Build was created by greenfly
With a number of protocols pending to be moved into the nightly build, I thought it might be useful to learn how to build a custom *combined* version that merges in the changes from one or more of those protocols. I began with mwm's tutorial on how to contribute to the project and now have...

  • Full development environment (Windows)
  • An account on bitbucket
  • Forked the deviation repo into my personal repo
  • Cloned my deviation repo to my local workspace in my environment
  • Tested building a target and it worked fine.

Now I am stuck.
Do I do a pull from the repo that has the protocol code I a want to include? For example:

hg pull -b hontai https://bitbucket.org/hexfet/deviation

Or do I also have to fork the repo I want to pull changes from first?

Please Log in or Create an account to join the conversation.

More
22 Jul 2015 20:32 #35811 by hexfet
Replied by hexfet on topic Combined Protocol Custom Build
You can pull the branch directly from the repo. I think you'll need to enter your bitbucket name/password.

Once you've pulled the various branches they should merge cleanly. I like to make a separate branch to merge everything so default stays the same as the main repo..

Please Log in or Create an account to join the conversation.

More
22 Jul 2015 22:20 - 22 Jul 2015 22:21 #35815 by greenfly
Replied by greenfly on topic Combined Protocol Custom Build

hexfet wrote: I like to make a separate branch to merge everything so default stays the same as the main repo..


I'd like to do this also. So I am guessing this would be my next step. I've gone to bitbucket and added a branch to my deviation repo. On my local dev machine, I had to "Check for incoming changes" for it to pick up the new branch that I had created. Then I updated the working directory to the new branch that I had created...



hexfet wrote: Once you've pulled the various branches they should merge cleanly.


Will each pull command generate an equivalent branch in my repo? Then is there a specific command to merge that branch into another branch? I'm getting myself mixed up between the website and the local machine.
Attachments:
Last edit: 22 Jul 2015 22:21 by greenfly.

Please Log in or Create an account to join the conversation.

More
22 Jul 2015 22:49 #35816 by hexfet
Replied by hexfet on topic Combined Protocol Custom Build
That's the right next step. You could have also created the ComboProto branch on your local machine and then push it to bitbucket. Or also merge everything to that branch on your local machine and make builds without ever updating bitbucket. Or do all that and then push all the changes to bitbucket at once. Some things you can't do on the web page - I haven't found a way to pull a branch from another repo on bitbucket.

Yes, pulling a branch will bring in all the changesets in that branch up to the closest common parent. I'm not sure how the Windows client works. On Linux pulling the branch does not automatically update to that branch, so if the working directory is the ComboProto branch then after the pull comes
hg merge -r <branch name>
hg commit -m "Merged <branch name>"
. A commit must follow a merge before any other repo updates can be made.

Please Log in or Create an account to join the conversation.

More
22 Jul 2015 23:35 #35820 by mwm
Replied by mwm on topic Combined Protocol Custom Build
Two comments:

While things should merge cleanly, they don't always. Watch for warnings about conflicts. Or really strange compilation errors :-). The "hg resolve command" will fix this.

You can edit .hg/hgrc in the top directory of your clone, and add things like:

team = ssh://hg@bitbucket.org/deviationTx/deviation
hexfet = ssh://hg@bitbucket.org/hexfet/deviation

You can then use the names "team" and "hexfet" instead of the full URLs in pull requests for those repos. I typically never pull from my bitbucket repo any more, but instead pull from team and push to it.

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

Please Log in or Create an account to join the conversation.

More
23 Jul 2015 02:34 #35827 by greenfly
Replied by greenfly on topic Combined Protocol Custom Build
OK, I think I have a good build with two protocols (hontai & bayang) pulled in. The merge/commit commands did find a couple of trivial conflicts between the two, but they were easy to resolve (once I figured out how to use kdiff3). Adding new protocols seems to follow a well defined pattern so the merge went smoothly.

Thanks hexfet & mwm for all your help...

Please Log in or Create an account to join the conversation.

More
24 Jul 2015 17:25 #35920 by greenfly
Replied by greenfly on topic Combined Protocol Custom Build
I have just noticed a bunch of pull requests have been merged into the build. Will these changes appear in the next nightly?

How do I update my local repo with the changes to the main deviation repo? I left my default branch in my repo alone so that I could sync up with the main deviation code when I needed too.

Thanks,

Please Log in or Create an account to join the conversation.

More
24 Jul 2015 18:20 #35922 by mwm
Replied by mwm on topic Combined Protocol Custom Build
Yes, those changes should show up in the next nightly build. It has the hontai protocol, but not the baysang (there was no pull request for that).

To update your repository, do
hg pull ssh://hg@bitbucket.org/deviationTx/deviation

As noted, you can add the line
team = ssh://hg@bitbucket.org/deviationTx/deviation

to the paths section of .hg/hgrc in the top level directory, and then just do
hg pull team

to update your repository.

Doing a pull does not change your repository. You'll have to do an "hg update" in order to do that.

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

Please Log in or Create an account to join the conversation.

More
24 Jul 2015 23:37 #35932 by hexfet
Replied by hexfet on topic Combined Protocol Custom Build
I think you need to add ssh keys to your account to use those urls. Go to manage account, and then ssh keys on the left side.

Please Log in or Create an account to join the conversation.

Time to create page: 0.063 seconds
Powered by Kunena Forum