Add to GitHub folder #115

Closed
opened 2017-08-30 23:00:33 +00:00 by mwweb · 7 comments
mwweb commented 2017-08-30 23:00:33 +00:00 (Migrated from github.com)

I'm trying to understand a bit more about HOW to use the custom github folder for multiple projects.

I have JCB option set for Git Folder Path, and JCB does create the component folder and populate it with the component, which works great for a single project.

However, if I have more than one, it doesn't work great, because if I clone my existing repo to that folder, so they are linked, JCB deletes everything in that folder before copying files.

What I found from doing some tests...

I use BitBucket for my repo, and have used them for several years. BitBucket gives 2 options: GIT or Mercurial.

If GIT is selected for the repo, it creates a .git folder. The .git folder is preserved during compile and population of the git folder.

However, if the repo is Mercurial, then it creates a .hg folder. The .hg folder gets deleted during compile and population of the git folder.

In a quick scan, it looks like helpers/componentbuilder.php function starting at 111 would need to be extended to keep .git and .hg then it would be more cross-"git" compatible.

I'm trying to understand a bit more about HOW to use the custom github folder for multiple projects. I have JCB option set for Git Folder Path, and JCB does create the component folder and populate it with the component, which works great for a single project. However, if I have more than one, it doesn't work great, because if I clone my existing repo to that folder, so they are linked, JCB deletes everything in that folder before copying files. What I found from doing some tests... I use BitBucket for my repo, and have used them for several years. BitBucket gives 2 options: GIT or Mercurial. If GIT is selected for the repo, it creates a .git folder. The .git folder is preserved during compile and population of the git folder. However, if the repo is Mercurial, then it creates a .hg folder. The .hg folder gets deleted during compile and population of the git folder. In a quick scan, it looks like helpers/componentbuilder.php function starting at 111 would need to be extended to keep .git and .hg then it would be more cross-"git" compatible.

You will see that each component has its own system name, this is what is used to build the git folder name.

So that is firstly how you great various projects.

Then if you would like to have changes in the same project, lets say you want to try something but not lose all the changes made in the main branch, then simply checkout a new branch and then compile the component and it will place all the changes in the new branch and not change the main branch.

So you will need to know how to work with git.

JCB does not remove the .git folder.

You will see that each component has its own system name, this is what is used to build the git folder name. So that is firstly how you great various projects. Then if you would like to have changes in the same project, lets say you want to try something but not lose all the changes made in the main branch, then simply checkout a new branch and then compile the component and it will place all the changes in the new branch and not change the main branch. So you will need to know how to work with git. JCB does not remove the .git folder.

ha sorry did not read to the end... hmmm okay so you would like to also include the .hg folder

ha sorry did not read to the end... hmmm okay so you would like to also include the .hg folder

Well, maybe we should add a place where you can tell JCB what not to remove during compilation. This way we can server any concept in the future. Where do you think will this best work. Globally or per project.

Well, maybe we should add a place where you can tell JCB what not to remove during compilation. This way we can server any concept in the future. Where do you think will this best work. Globally or per project.
mwweb commented 2017-08-30 23:22:17 +00:00 (Migrated from github.com)

Yes it's the .hg folder, since the repo I originally setup is Mercurial, and I don't want to lose all my change logs in changing to git.

I think, perhaps, having a way of excluding files to delete might be good. I've never used it before, but I think subversion is another format that might be used, and I believe it creates a .svn folder.

I think having global would be the easiest, but on a per project basis it would be more flexible. The could be differences between the different projects.

Yes it's the .hg folder, since the repo I originally setup is Mercurial, and I don't want to lose all my change logs in changing to git. I think, perhaps, having a way of excluding files to delete might be good. I've never used it before, but I think subversion is another format that might be used, and I believe it creates a .svn folder. I think having global would be the easiest, but on a per project basis it would be more flexible. The could be differences between the different projects.

Still not sure I understand

However, if I have more than one, it doesn't work great, because if I clone my existing repo to that folder, so they are linked, JCB deletes everything in that folder before copying files.

Do you mean clone from the remote repo? if so why would you clone from the remote repo, unless you are more then one developer on the project.

If that is the case, then you should instead share a JCB package in a REPO. This way if you make a change in JCB, then you export the JCB package, and push the change package to the repo, since it is encrypted, only your contributors can download and update their version, make changes and again push up to the REPO their changes.

Reality is yes you can't both work on the Project at the same time, unless in different areas. It gets little complex... but you can make it work this way. Root and I did that with JCB for a short time, yet we are out of sync at this time... still working on a way to merge the two JCB versions of the project... but this it the direction I think we should go... instead of only the code on github, to use JCB packages to do joined development. I mean JCB writes the code... so to work on the code will cause us to move out of JCB and this is not the idea. To do shared development in JCB yet not on the same Joomla website.

There is an idea to link JCB's with eachother over a trusted handshake, and then move changes dynamicly between the two or how many joined JCB's like setting up your own in house development home where many developers can work on one project at the same time, just like they can work on one Joomla website at the same time, just not being on the same Joomla website.

So I have started working on a project called sync portal that sync Joomla website database tables with each other. The project is about 70% finished... but it is going the direction of keeping two websites in sync... big idea, and many hours later I can see this is not easy task... but I am working on it.

Still not sure I understand > However, if I have more than one, it doesn't work great, because if I clone my existing repo to that folder, so they are linked, JCB deletes everything in that folder before copying files. Do you mean clone from the remote repo? if so why would you clone from the remote repo, unless you are more then one developer on the project. If that is the case, then you should instead share a JCB package in a REPO. This way if you make a change in JCB, then you export the JCB package, and push the change package to the repo, since it is encrypted, only your contributors can download and update their version, make changes and again push up to the REPO their changes. Reality is yes you can't both work on the Project at the same time, unless in different areas. It gets little complex... but you can make it work this way. Root and I did that with JCB for a short time, yet we are out of sync at this time... still working on a way to merge the two JCB versions of the project... but this it the direction I think we should go... instead of only the code on github, to use JCB packages to do joined development. I mean JCB writes the code... so to work on the code will cause us to move out of JCB and this is not the idea. To do shared development in JCB yet not on the same Joomla website. There is an idea to link JCB's with eachother over a trusted handshake, and then move changes dynamicly between the two or how many joined JCB's like setting up your own in house development home where many developers can work on one project at the same time, just like they can work on one Joomla website at the same time, just not being on the same Joomla website. So I have started working on a project called sync portal that sync Joomla website database tables with each other. The project is about 70% finished... but it is going the direction of keeping two websites in sync... big idea, and many hours later I can see this is not easy task... but I am working on it.

My first application for this, is running Joomla "off line" in a office on intranet, and then keeping that instance in sync with an "on line" website hosted in the cloud. Or only some of its tables...

Joomla can be used to build almost any kind of data manipulation concept, for small businesses. Anyway I am just thinking... typing out loud... I suppose we have this issue resolved.

I will add a dynamic area for this in the Joomla Component view... we can take it from there.

My first application for this, is running Joomla "off line" in a office on intranet, and then keeping that instance in sync with an "on line" website hosted in the cloud. Or only some of its tables... Joomla can be used to build almost any kind of data manipulation concept, for small businesses. Anyway I am just thinking... typing out loud... I suppose we have this issue resolved. I will add a dynamic area for this in the Joomla Component view... we can take it from there.
mwweb commented 2017-08-30 23:40:35 +00:00 (Migrated from github.com)

I did sync from remote, just just recently. I moved my dev environment off of an external SD drive to my local SSD for speed improvements. I downloaded the repo after I moved everything and I setup the git folder. That is when I noticed that JCB was deleting the .hg folder. Then I did the testing before posting this which is where I found that JCB was deleting any non-.git folder.

The copy to git is nice. Before I moved it, I would compile, then extract to a repo folder, then commit and push. Having JCB copy the files to the repo is a huge time saved, and ensures that the repo folder contains the most recent build.

Adding the dynamic area would be great.

I did sync from remote, just just recently. I moved my dev environment off of an external SD drive to my local SSD for speed improvements. I downloaded the repo after I moved everything and I setup the git folder. That is when I noticed that JCB was deleting the .hg folder. Then I did the testing before posting this which is where I found that JCB was deleting any non-.git folder. The copy to git is nice. Before I moved it, I would compile, then extract to a repo folder, then commit and push. Having JCB copy the files to the repo is a huge time saved, and ensures that the repo folder contains the most recent build. Adding the dynamic area would be great.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#115
No description provided.