Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SourceTree and GitHub Leader needed


Dan Cole

Recommended Posts

What's the github address of your project?

 

 

@@altoid   Steve...I'll post it here but you have to promise not to laugh.   

 

Do you promise?

 

https://github.com/MOPS-DanCole/oscommerce2

 

Dan

Link to comment
Share on other sites

  • Replies 106
  • Created
  • Last Reply

@@altoid

 

Opps...almost forgot...thanks for the comments about those features or lack thereof Steve.   At least I know it's not just me.  :)

 

Dan

Link to comment
Share on other sites

@@Dan Cole  

 

That's one of the nicest forks I've ever seen.  I'm so impressed that not only did I watch it, but I gave it a star.  Keep up the good work!

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

@@altoid  Yeah right.  I must admit it is clean though but I'm sure I'll mess that up shortly. 

 

I'm receiving notices of pull requests for oscommerce2 so I think everything is working as it should and it's probably time for me to jump in and see if I can change one of the files in my branch and push to GitHub.  Does that seem like the next step to you?

 

Assuming it is I'm just going to try to change my README.md file and push it up.  If possible could you let me know if you receive a notice about it and if so what you see etc.   Hopefully Gary won't end up with it.  (w00t)

 

Dan 

Link to comment
Share on other sites

I'll keep an eye out for changes.  Make sure your change is on a branch.  I've done that by making sure I am on a branch in Sourcetree, then applied the changes.  Before committing, double check via file compare.  If you haven't figured it out yet, you can set a default file compare utility right in sourcetree.

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

I think I got it to send but I think I sent it to the whole team.  I guess that is what you mean when you said make sure I'm on a branch...arrgghhhhh. 

 

I'm going back to see how I mucked that up.

 

Dan

Link to comment
Share on other sites

It looks to me like that all happened within your branch, so I think you're good on that.  The original isn't affected.

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

@@Dan Cole  Check your repo branch.  There's a pull request from me to merge from mybranch into Code-Update

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

It looks to me like that all happened within your branch, so I think you're good on that.  The original isn't affected.

 

Wiping sweat from my brow.... :sweating:

 

The reason I thought that is that I received a message of congratulations from @@Gergely.  Could he be following my fork perhaps?

 

Dan

Link to comment
Share on other sites

@@altoid

 

@@Dan Cole  Check your repo branch.  There's a pull request from me to merge from mybranch into Code-Update

 

I see it Steve but have no idea what to do with it....it's not very obvious...I expected to see a merge button or something but I'm not seeing anything like that.  I'm going to have a look at it in SourceTree...I think you said that you pretty well do everything from there.

 

Dan

Link to comment
Share on other sites

@@altoid

 

I pushed, pulled, fetched and refreshed but I'm not seeing any of your pull requests in SourceTree Steve...any idea what I'm doing wrong or step that I'm missing?  I'm feeling pretty dumb... :huh:

Dan

Link to comment
Share on other sites

@@Dan Cole That I have not done in Sourcetree, so I don't know if it's possible.  If it is, someone more experienced might be able to help.

 

This is one occasion I'd be using github instead.  In your repo, on the right you should see pull requests, with the number 1 next to it.  That's my pull request.  Click that there and see of it walks you through that.

 

In Github, you should get to a window that shows your fork and branch (Code-Update) on the left side of the window

and then my fork with my branch on the right side (mybranch)

 

You should have an option to just close the pull request without doing anything. If so, try that, there's probably a place to leave a comment too.  Closing pull requests is something you'll want to do along they way anyway.  Gary does it all the time.   (w00t)

 

If that works I'll do another pull request and we'll try to get through that.

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

@@altoid

 

This is one occasion I'd be using github instead.  In your repo, on the right you should see pull requests, with the number 1 next to it.  That's my pull request.  Click that there and see of it walks you through that.

 

I see this and when I click on the pull request I get this....

 

post-182953-0-53936600-1428687120_thumb.jpg

 

If I open your branch I then see this...

 

post-182953-0-52767600-1428687162_thumb.jpg

 

It doesn't sound very much like what you described but if I scroll and I guess I never did that before, I see a Merge Pull Request button.   Since we're just messing about I hit the merge button...not sure what I did yet but I seem to be a bit further along.  

 

I'll have a look around and post back.  Thanks for the nudge...

 

Dan

 

Link to comment
Share on other sites

@@Dan Cole    I don't know what you did but the US and Canada just completely merged their countries saying it was a pull request that could not be denied.

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

@@altoid

 

I don't know what you did but the US and Canada just completely merged their countries saying it was a pull request that could not be denied.

 

We could certainly use a merger on currency and border issues.  We'll have to use our pull on those issues.. :)

 

And just to complete the cycle here is what I'm now seeing in SourceTree...

 

post-182953-0-14773800-1428688840_thumb.jpg

 

Dan

Link to comment
Share on other sites

OK, simples. If I want a change in the core code, and I'm confident it should be accepted, I can see how it works.

 

But the big picture's a bit more complicated. Leaving aside the question of where to fork from at the beginning, there's still addons and custom code to fit in. I assume that (effectively or actually) I'll have a branch of my fork with the code of my project that's never intended to be merged back into the master.

 

I suppose in an ideal world, addons would have their own github forks, with a branch for the actual modifications. I could then fork that, and sourcetree would get me a clone to my desktop - pretty much the same as downloading from oscommerce addons.

 

If it's a complicated add-on, is it worth creating a separate fork for it myself, rather than just plugging the changes into my development branch? Will I get anything that helps impact analysis when the core or add-on changes, or am I just adding a layer of complexity and making extra work?

 

Or... do I just need another level? Should I 

a. fork whichever master - this is where I keep track of changes to the core

b. fork my fork - this allows me to pull the differences to the core that I want to have in my project implementation, from...

c. make a branch of the forked fork for each add-on (getting the code either from github or addons.osc), or each bit of custom development and then use the features to manage conflicts within my project

 

or am I overthinking this (again)?

 

I have signally failed to find a useful resource on how to manage on github projects that are never expected to merge back to the master but have permanent variant/divergent streams. If anyone has a link to such, I'd be grateful.

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

I thought I'd share this morning's small success. There may be better ways of doing this; if so, please add them!
 
I wanted to look at the modular product info work from Gary's Upcoming Changes thread. @@mattjt83 sent me a link to find the pull request for them:

https://github.com/gburton/Responsive-osCommerce/pulls

 

I've already got a fork of that repository, but I think that will only see changes that have already been accepted into the main master - a way of getting stuff from one fork into another might be useful if anyone knows how.

 

But, if you only want to look at the stuff that's there and not make any changes to feed back (or any changes for your store that you want to do impact analysis on), you don't need a fork; you can clone the main one straight to your desktop:

In sourcetree, click on clone/new. There's a choice here of creating a clone or a working copy - I used clone. I don't know if the working copy would have given access to pull requests.

Then I sorted out the local paths and names and put in the url of Gary's repo.

I'm assuming (hoping?) that as I have no access to that, I can't do any damage! I'm also hoping it doesn't send him lots of annoying messages.

 

At this point I applied a hack to the .git/config file that I read about in a conversation that applied to a different tool. This may not have been necessary in Sourcetree, there may be an option somewhere to do it, I don't know. I added a line to the remote origin section to tell it to fetch pull requests too, so there are now two fetch lines:

[remote "origin"]
	url = https://github.com/gburton/Responsive-osCommerce.git
	fetch = +refs/heads/*:refs/remotes/origin/*
     fetch = +refs/pull/*/head:refs/remotes/origin/pr/*

Then I did another fetch and I could see all the pull requests in the tree picture, and I could use the menu to checkout a local copy of the pull request which applied the changes to my local filestore. I'm assuming that if there were change conflicts here, something nasty might have happened, but that doesn't appear to be the case.

 

I've now got a copy of the master with the change in the pull request applied to play with, and hope I've not done any damage.

 

If there's a better way of doing this, please let me know!

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

@@BrockleyJohn

 

Well done John....I won't pretend to have understood very much of what you did but I appreciate you posting about your progress. 

 

From my point of view (I tend to learn by doing) I think we just need a little project that those who are interested in could work on and learn a bit about SourceTree and Github along the way.  Anyone want to work on a little test project to get your feet wet? We'll try not to drown you.  If you'd like to do that and have a little development project you've been working on why don't you propose it here and we'll select one and use it for our test project. 

 

For my part I would propose adding a FAQ to the content modules.   I have one worked up already but it would be nice to clean it up a bit and perhaps have it read from a database table rather than it being hard coded as I have it at the moment.  I'm sure there are other things we could do with it as well. 

 

Do you have any interest in this idea?  Do you have a project you'd like to suggest?

 

Dan

Link to comment
Share on other sites

For my part I would propose adding a FAQ to the content modules.   I have one worked up already but it would be nice to clean it up a bit and perhaps have it read from a database table rather than it being hard coded as I have it at the moment.  I'm sure there are other things we could do with it as well. 

 

Do you have any interest in this idea?  Do you have a project you'd like to suggest?

 

@@Dan Cole, I'm always interested in ideas and love little projects. At the moment, I don't know where one should end up, so I'm not sure where to start it and how to get there.

 

To clarify; a fix to the core code should end up as a pull request back to osc2 on github but as I understand it addons - even extra content modules - are beyond the scope of that repo unless adopted into core. Maybe we'd be working with your own author repository, or something else again, I'm not at all sure.

 

That said, if someone can point a finger in the right general direction we can probably find our way, we'll manage without a satnav!

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

@@BrockleyJohn

 

Hi John.

 

I think I saw a pull request from your earlier today so I assume you figured that part of it out.  Hopefully you intended to sent it. :)

 

In regards to addons, yes I think you'll need to host those on your own repository since they won't be of any interest to Gary.  Just for fun I added a repo to my GitHub for osC-Contributions and uploaded a simple test text file. If you want to subscribe to it and try sending a pull request or anything you'll find it at...

 

https://github.com/MOPS-DanCole/osC-Contributions

 

If that works for you let me know and I'll pull those FAQ files together and add those to my repo.   If you have a contribution you'd like to work on you might want to set up a contributions repo too.  I'll subscribe to it and try sending a pull request so we both can get a feel for how that who process works.

 

Dan

Link to comment
Share on other sites

@@Dan Cole - so you saw I've been experimenting. Yes, the pull request was deliberate. It may not be the solution for a release but it's what I had to do to get the osc2 code to run on my hosting; it showed a catalog page once and then collapsed in an unsightly mess (config caching issue).

 

I cloned your repo, had a look at what I got and raised an issue! If everything worked, you should already know this. Did you forget to commit or did I misunderstand the brief you gave yourself? IMO updating the readme doesn't count as adding a text file  :P

 

My current thinking is that I'm going to put addons each in their own separate branch of my osc2 fork repo (never to be merged). Then have a separate repo for each implementation... so I now have:

My fork of osc2: https://github.com/BrockleyJohn/oscommerce2 this has an extra branch I created for the core change I wanted to make it run on my hosting

First project: https://github.com/BrockleyJohn/oscommerce2-client1

The project one is created as a new repo, then I added my osc2 fork as a remote (effectively a fork of a fork, without the ability to submit pull requests upstream, if I understood the concepts and the jargon). I fetched in both the master and my extra branch, and have just gone through a rather painful process to merge the branch into the master locally. Having done a local commit in Sourcetree, I now find that my local master is rather worryingly 2391 somethings ahead of my remote master when I was expecting 1 or 2. Anyway, I digress, what I was going to tell you is:

 

Sourcetree tells you about the differences between the files, but it won't do anything about them. When it comes to 'resolving conflicts' - this appears to be a grand term for making changes at a lower level than adding/removing files - you'll need an external tool. I chose DiffMerge but either I didn't have it set up properly or it's crap. Although I could see the exact changes highlighted in the file, I couldn't find a way of applying them line by line or group by group like in Winmerge, I had to choose the whole file. Maybe I should have looked in the help...

 

Anyway, I think we could use some recommendations for good tools in SourceTree for showing and merging differences.

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

I think a separate branch per add on is the correct way to go. That way in sourcetree you can select and work on just that brand/add-on exclusively.

 

With sourcetree I have winmerge set up view the differences and with ctrl+d it works quite well.

 

As Gary noted elsewhere, it's best not to mess with the original files,  and do your work only within a branch.  While in the branch you may see so many behind or ahead, but when you switch back to the master branch, those should go away.

 

Here's someone working actively working on an interesting repo for bootstrap osc:  https://github.com/newburns

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

@@altoid  Morning Steve.

 

I think a separate branch per add on is the correct way to go. That way in sourcetree you can select and work on just that brand/add-on exclusively.

 

I was thinking the same thing Steve and added my test FAQ addon to a separate branch and then pushed it to the Git.  Unfortunately when in arrived it allow me to merge it and I ended up with it in my master branch.   No big deal but something to watch for.  At this point I have an FAQ branch with the files in it and a master that if I add to it will contain all my addons.  Maybe it won't be a bad thing.

 

With sourcetree I have winmerge set up view the differences and with ctrl+d it works quite well.

 

I like this idea and must see if I can get it to work with Beyond Compare.

 

Dan

Link to comment
Share on other sites

@@BrockleyJohn   Morning John...at least it morning here.

 

I cloned your repo, had a look at what I got and raised an issue! If everything worked, you should already know this. Did you forget to commit or did I misunderstand the brief you gave yourself? IMO updating the readme doesn't count as adding a text file  :P

 

Baby steps eh?  And I did see your issue.   :thumbsup:   I added some real files for you to look at this time but you probably already know that. :D

 

My current thinking is that I'm going to put addons each in their own separate branch of my osc2 fork repo (never to be merged). Then have a separate repo for each implementation... so I now have:

 

I thought the same thing and took that approach too.  I just wish I had seen your note "never to be merged" before I did that though.  :x  As it turns out I was doing this in my separate repo so if I continue to merge them into that master I should just end up with a master that contains all the addons that I've added.  Maybe that wouldn't be a bad thing. 

 

Anyway, I think we could use some recommendations for good tools in SourceTree for showing and merging differences.

 

Steve is using WinMerge as you would have seen in his note above...I just added Beyond Compare so I'll see how that goes and let you know in do course.

 

Dan

Link to comment
Share on other sites

@@Dan Cole , I'm having a quick look while on lunchbreak from bricklaying. I can see you've been busy. As your addons repo isn't a fork of an osc one, I don't think it's going to matter that you merged your faq branch with the master... at least not if they're all going to be proper content modules. If you want to use the repo to share the addon, it's probably worth giving it its own repo anyway, to save confusion.

 

Anyway, as I said before I didn't fork your repo but cloned it directly. Within sourcetree I now have the attached display, but when I fetch, it doesn't get any of the new files. I guess from the display I have to Pull them.

post-220375-0-23338500-1429449526_thumb.jpg

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...