Moving to GitHub and new file/folder structure

10 views
Skip to first unread message

cheeaun

unread,
Feb 5, 2009, 8:46:28 AM2/5/09
to MooEditable
Hi all,

First, I would like to announce that MooEditable SVN is now moved to
Git/GitHub at this url:
http://github.com/cheeaun/mooeditable/tree/master

There are few reasons why I move to Git/GitHub. One of them is
GitHub's fork feature. The only contributor to my MooEditable repo is
myself, no others. If you want to contribute, you'll need to fork my
repo as your own, under the url [your_username]/mooeditable. There are
two reason for forking a Git repo:

1. To contribute bug fixes and code. You fork my repo, commit changes
and ask me to 'Pull Request' so that I can pull your commits to my
repo. This way, I can control which commit I want to pull and which I
don't. So, please make sure your commits are as small/specific as
possible. Not one whole bunch of 100 lines of code changes.

2. To make your own flavor of the project. In other words, your own
special version of MooEditable which has nothing to do with me. Since
its your own repo, you'll maintain it yrself. People don't like my
flavor of MooEditable, they can explore other people's forks and
probably like your MooEditable better. This will keep everyone
happy :)

Here are the docs about forking:
- http://github.com/guides/keeping-a-git-fork-in-sync-with-the-forked-repo
- http://github.com/guides/fork-a-project-and-submit-your-modifications

I'm not sure if anyone of you (especially the devs) have any
experience in Git, so I encourage everyone to learn it. Google for
tutorials and guides.

Second, I have changed the file/folder structure to match exactly like
mootools-core (and mootools-more), like these:
- http://github.com/mootools/mootools-core/tree/master
- http://github.com/mootools/mootools-more/tree/master

As of now, the structure is as follows:
* Assets
* MooEditable
* Demos
* Docs
* assets
* MooEditable
* Source
* MooEditable
* Specs

Few notes:
- I have separated the images into a 'Tango' folder, obviously for
Tango icons. So if there are new icons, say FamFamFam Silk, just
create a new folder and another file called MooEditable.Silk.css
- The 'Demos' files are kinda messy now, I'll probably need to rename
the files.
- The are documentation files in 'Docs' folder, written in MarkDown.
Not complete, but will be in TODO list.
- 'Source' is where the source files are. Currently there's
MooEditable/MooEditable.js. Plugins will come in the form of
MooEditable/MooEditable.ResizableFrame.js, for example.
- 'Specs' folder is currently empty now. I'll be writing spec files
soon. Anyone's help would be appreciated and I'll be glad to pull
requests :)
- Note that everytime you create a new plugin file, say Source/
MooEditable/MooEditable.PluginName.js, please create the Docs and demo
files as well, with matching names (I hope).

By the way, it would be great to follow Aaron Newton's mootools-more
repo and look it up as reference as he is now in charge of mootools-
more and probably all MooTools plugins, like MooEditable (I hope),
soon:
http://github.com/anutron/mootools-more/tree

Cheers.

ryan

unread,
Feb 5, 2009, 11:29:32 AM2/5/09
to MooEditable
Thanks for the work in getting that going - its great.
I'm happy to help with the specs documents - what are you planning for
that?

Ryan

orefalo

unread,
Feb 5, 2009, 2:14:46 PM2/5/09
to MooEditable
Thank you !

Ryan, how do you plan on committing the changes we worked on ?
Seems like we may need a more granular sets of commits.

what do you think ?

-> First I need to understand how GIT works.... ;-/

ryan

unread,
Feb 5, 2009, 3:28:22 PM2/5/09
to MooEditable
I've been seperating them out into individual commits - will take me a
while, but I'll get there!

cheeaun

unread,
Feb 5, 2009, 8:06:34 PM2/5/09
to MooEditable
For the specs, I'm still planning it and probably will take some time.
The current mootools-core and mootools-more uses JSSpec
http://code.google.com/p/jsspec/ . However, JSSpec doesn't seem to be
a suitable test framework for a WYSIWYG editor which as explained by
Aaron Newton here:
http://www.clientcide.com/tools/the-clientcide-test-framework/
Aaron created a new test framework called 'Clientcide Test Framework'
which kinda ask user whether certain things work, if yes, pass, else
fail. I have yet to think which framework to use, or totally use a
different test framework.

So far, I've never seen a complete spec for a WYSIWYG editor (are
there any in TinyMCE?). The ones I found are pretty basic, and the
closest I found is Loki's unit tests (uses Crucible):
http://github.com/enaeseth/loki/tree/master
http://github.com/enaeseth/loki/tree/a10139c59120ffbdf8ebfc906f608df50f1cf82e/tests/loki

These are the references for now. I'll probably try JSSpec first and
see what it can do.

cheeaun

unread,
Feb 5, 2009, 8:35:37 PM2/5/09
to MooEditable
Yeap, I would give any help, if you need them :)

But, erafalo and Ryan, I'll tell you guys the 'correct' steps here:

1. Fork my repo and make it as your own under your account. @Ryan, you
don't have to rename the repo from 'mooeditable' to 'mooeditable-
changes' actually. It's an exact forked copy of my repo, it's not just
'changes'. Note that other people can fork your repo as well and so on
and on. When you rename that, you'll need to "git clone" your own repo
again as 'mooeditable', not 'mooeditable-changes'.

2. Do not just copy and paste code from your own version of
MooEditable. Please start writing from scratch. Update your own repo
all the time and make sure it's sync to my repo, by following some
commands here:
http://github.com/guides/keeping-a-git-fork-in-sync-with-the-forked-repo
@Ryan, I'm not sure what/how you commit, but if you read the diff of
your changes, it's a total mess, for example this commit:
- http://github.com/ryanmitchell/mooeditable-changes/commit/3dfbf7015ce2191d782ede4a88fee68188453f2d
What you need to do is probably start from scratch, and "git-reset --
hard" to the point where I committed, reference here:
- http://www.kernel.org/pub/software/scm/git/docs/git-reset.html
I can't really pull from a messy repo. However, this commit is
(almost) good:
- http://github.com/ryanmitchell/mooeditable-changes/commit/05d1cce74c32ef691bd275a64afe9175156c422d
At least, I can read what you've changed and probably suspect that you
did not read my last commit properly (see point 3 below)

3. The code for MooEditable now (latest commit) follows the Syntax and
Coding conventions used in MooTools:
- http://wiki.github.com/mootools/mootools-core/syntax-and-coding-style-conventions
If you've read Valerio Proietti's (founder of MooTools) commits on
mootools-core, he's especially very strict about it:
- http://github.com/kamicane/mootools-core/commits/
I myself will be practicing the conventions and be strict about it
too.

4. For now, please develop you 'enhancements' in separate files.
Testing should be done on your own repo, if it's unstable. My repo
will be sort of the 'most stable' version of MooEditable, so I won't
be pulling unstable code. Once your code is super stable (and clean),
I'll happily pull :)

Also, it doesn't mean that every time you commit, you have to ask me
to pull. You can commit a whole bunch of commits then only ask for a
pull. So, @Ryan, hold you horses! :)

I'm going to create a 'sample' MooEditable plugin to give a little
overview on the 'correct' way to extend MooEditable. Stay tuned.

Thanks guys.

ryan

unread,
Feb 6, 2009, 4:48:23 AM2/6/09
to MooEditable
Hello

Yeah i think the problem with the commits is I use dreamweaver on a
mac and it seems to be causing different line ending characters, so
github thinks the whole file has changed. I'll try a couple of
different editors and see which works best.

I've read through the guidelines and will try to stick to them, it may
take me a while to get it right so please be patient!

Ryan

On Feb 6, 1:35 am, cheeaun <chee...@gmail.com> wrote:
> On Feb 6, 3:14 am, orefalo <oref...@yahoo.com> wrote:
>
> > Thank you !
>
> > Ryan, how do you plan on committing the changes we worked on ?
> > Seems like we may need a more granular sets of commits.
>
> > what do you think ?
>
> > -> First I need to understand how GIT works.... ;-/
>
> Yeap, I would give any help, if you need them :)
>
> But, erafalo and Ryan, I'll tell you guys the 'correct' steps here:
>
> 1. Fork my repo and make it as your own under your account. @Ryan, you
> don't have to rename the repo from 'mooeditable' to 'mooeditable-
> changes' actually. It's an exact forked copy of my repo, it's not just
> 'changes'. Note that other people can fork your repo as well and so on
> and on. When you rename that, you'll need to "git clone" your own repo
> again as 'mooeditable', not 'mooeditable-changes'.
>
> 2. Do not just copy and paste code from your own version of
> MooEditable. Please start writing from scratch. Update your own repo
> all the time and make sure it's sync to my repo, by following some
> commands here:http://github.com/guides/keeping-a-git-fork-in-sync-with-the-forked-repo
> @Ryan, I'm not sure what/how you commit, but if you read the diff of
> your changes, it's a total mess, for example this commit:
> -http://github.com/ryanmitchell/mooeditable-changes/commit/3dfbf7015ce...
> What you need to do is probably start from scratch, and "git-reset --
> hard" to the point where I committed, reference here:
> -http://www.kernel.org/pub/software/scm/git/docs/git-reset.html
> I can't really pull from a messy repo. However, this commit is
> (almost) good:
> -http://github.com/ryanmitchell/mooeditable-changes/commit/05d1cce74c3...
> At least, I can read what you've changed and probably suspect that you
> did not read my last commit properly (see point 3 below)
>
> 3. The code for MooEditable now (latest commit) follows the Syntax and
> Coding conventions used in MooTools:
> -http://wiki.github.com/mootools/mootools-core/syntax-and-coding-style...
> If you've read Valerio Proietti's (founder of MooTools) commits on
> mootools-core, he's especially very strict about it:
> -http://github.com/kamicane/mootools-core/commits/

Lim Chee Aun

unread,
Feb 6, 2009, 6:13:17 AM2/6/09
to mooed...@googlegroups.com
On Fri, Feb 6, 2009 at 5:48 PM, ryan <rtnet...@gmail.com> wrote:

> Yeah i think the problem with the commits is I use dreamweaver on a
> mac and it seems to be causing different line ending characters, so
> github thinks the whole file has changed. I'll try a couple of
> different editors and see which works best.

Oh, that's weird...

> I've read through the guidelines and will try to stick to them, it may
> take me a while to get it right so please be patient!

No problem, I'm doing this slowly as well. :)

--
Lim Chee Aun - http://cheeaun.com/

orefalo

unread,
Feb 6, 2009, 9:27:46 AM2/6/09
to MooEditable
Well, technical features aside, using GIT is turning out as a
nightmare for me. Not only the learning curve is steep.
I can't use my preferred development environment Eclipse + Spket.
I guess I'll give it another try...


On Feb 6, 6:13 am, Lim Chee Aun <chee...@gmail.com> wrote:

orefalo

unread,
Feb 6, 2009, 11:23:50 AM2/6/09
to MooEditable
Can some one please explain how to retrieve the latest changes from
the master project ?

I tried to pull, but it complains that I don't have access to cheeaun
repository ?!

Steep baby, Steeeeep learning curve.

orefalo

unread,
Feb 6, 2009, 3:20:45 PM2/6/09
to MooEditable
Never mind, I wiped my fork and recreated a brand new fork. hope I
won't have to do that every time...

at this point, I don't know how to merge changes from the master, nor
did I figure how to get another branch say from Ryan.
I like GIT, but I believe its industry support is not there yet.
Besides... I don't find it so great, you still deal with a central
remote repository (github) - even if it's "distributed".
And it doesn't solve all the problems around branching/merging.

Anyway, enough bullshit about my frustration.

ryan

unread,
Feb 6, 2009, 4:12:52 PM2/6/09
to MooEditable
To get another branch, you just git clone the public url of it...

ryan

unread,
Feb 6, 2009, 4:17:38 PM2/6/09
to MooEditable
Let me know if there is anything i can do to help with the testing
framework - happy to do any work on it that you need done.

Lim Chee Aun

unread,
Feb 7, 2009, 3:52:10 AM2/7/09
to mooed...@googlegroups.com
On Sat, Feb 7, 2009 at 4:20 AM, orefalo <ore...@yahoo.com> wrote:
>
> Never mind, I wiped my fork and recreated a brand new fork. hope I
> won't have to do that every time...

:)

> at this point, I don't know how to merge changes from the master, nor
> did I figure how to get another branch say from Ryan.
> I like GIT, but I believe its industry support is not there yet.
> Besides... I don't find it so great, you still deal with a central
> remote repository (github) - even if it's "distributed".
> And it doesn't solve all the problems around branching/merging.

Ok, a little tutorial here:

1. To sync to newer commits from my repo, first make sure you've added
my repo as a 'remote' repo:

git remote add cheeaun git://github.com/cheeaun/mooeditable.git

From here, this command just add a remote repo. Basically your own
branch will be origin/master, but when you need to do anything with
mine, it will be cheeaun/master. So, to get newer commits from my
repo:

git checkout master
git pull cheeaun master

... which will then merge my repo with yours. If there are conflicts
(I'm sure there will), you'll have to fix them:

git merge-tool

I'm not sure what kind of complain you get, but I'll need more details on that.

And about Git being 'distributed', from my understanding, it's like
even when GitHub is down, you can still commit because the whole repo
and its log/commits/history/etc are on your machine, unlike SVN. If
I'm not mistaken, you could even set up your own Git server and let
other people clone your repo, without GitHub (I never tried that
before).

cheeaun

unread,
Feb 7, 2009, 4:01:11 AM2/7/09
to MooEditable
Oops, I miss the second point:

To 'get' commits from other fork repos, like Ryan's, you basically can
do the same thing as adding my repo as remote:

git remote add ryanmitchell git://github.com/ryanmitchell/mooeditable.git

Again, you'll need to pull from ryanmitchell/master and merge into
your own repo.

I've asked this question on GitHub google group:
http://groups.google.com/group/github/browse_thread/thread/a449390c76ee026c

I've also tried it myself, and found that after you merge, Ryan's
commits will be part of your repo as you might probably push to your
own origin/master. By that time, I'll be complicated as which repo
should I pull from since your repo and Ryan's repo have duplicated
commits.

But then actually, you can even fork Ryan's repo to, say, fix a
feature that Ryan added, and at the same time maintain your own repo
with additional features that Ryan did not implement. (I know this
gets complicated :P)

On Feb 7, 4:52 pm, Lim Chee Aun <chee...@gmail.com> wrote:

cheeaun

unread,
Feb 10, 2009, 12:03:12 AM2/10/09
to MooEditable
Here's a free course to Git and GitHub.
http://rubylearning.com/blog/2009/02/10/git-and-github-a-free-course/

Cheers.

On Feb 7, 5:01 pm, cheeaun <chee...@gmail.com> wrote:
> Oops, I miss the second point:
>
> To 'get' commits from other fork repos, like Ryan's, you basically can
> do the same thing as adding my repo as remote:
>
> git remote add ryanmitchell git://github.com/ryanmitchell/mooeditable.git
>
> Again, you'll need to pull from ryanmitchell/master and merge into
> your own repo.
>
> I've asked this question on GitHub google group:http://groups.google.com/group/github/browse_thread/thread/a449390c76...

orefalo

unread,
Feb 10, 2009, 9:17:40 AM2/10/09
to MooEditable
Thank you for your time, helpful link.

GIT is great and it's definitely much better than SVN when dealing
with developers. However I find the project kind of new and as a
consequence, there is little support for the Eclipse platform.
Eclipse has a git plugin but it's buggy and it has problems with
firewalls. -> Read with MY corp. firewall which is the whole point
here.

anyway, I dropped my repository from GIT because:

1. Ryan's branch has most of my changes
2. I am waiting on a command enhancement similar to Ryan's build(),
toggle() functions.
3. Last but not least, we need a standard way to apply Themes.

Our last working version can still be found at this URL
http://www.crionics.com/products/opensource/MooTools/mooEditable/

Cheers,
Olivier

On Feb 10, 12:03 am, cheeaun <chee...@gmail.com> wrote:
> Here's a free course to Git and GitHub.http://rubylearning.com/blog/2009/02/10/git-and-github-a-free-course/

cheeaun

unread,
Feb 16, 2009, 11:46:35 PM2/16/09
to MooEditable
Just a note here, especially to ryan and orefalo.

If things gone haywire in your repo (when your commits clash too much
with mine), there are two ways to solve it:

1. git-mergetool. Try your best to merge your repo changes with mine.
It's quite hard, but worth the practice :P

2. git reset --hard cheeaun/master (if you've added my remote repo as
'cheeaun')
Using this command, it'll reset your repo to match exactly like
mine, and will kill all your own previous commits (be careful), so
that you don't have to keep deleting and re-forking my repo.

Cheers.

On Feb 5, 9:46 pm, cheeaun <chee...@gmail.com> wrote:
> Hi all,
>
> First, I would like to announce that MooEditable SVN is now moved to
> Git/GitHub at this url:http://github.com/cheeaun/mooeditable/tree/master
>
> There are few reasons why I move to Git/GitHub. One of them is
> GitHub's fork feature. The only contributor to my MooEditable repo is
> myself, no others. If you want to contribute, you'll need to fork my
> repo as your own, under the url [your_username]/mooeditable. There are
> two reason for forking a Git repo:
>
> 1. To contribute bug fixes and code. You fork my repo, commit changes
> and ask me to 'Pull Request' so that I can pull your commits to my
> repo. This way, I can control which commit I want to pull and which I
> don't. So, please make sure your commits are as small/specific as
> possible. Not one whole bunch of 100 lines of code changes.
>
> 2. To make your own flavor of the project. In other words, your own
> special version of MooEditable which has nothing to do with me. Since
> its your own repo, you'll maintain it yrself. People don't like my
> flavor of MooEditable, they can explore other people's forks and
> probably like your MooEditable better. This will keep everyone
> happy :)
>
> Here are the docs about forking:
> -http://github.com/guides/keeping-a-git-fork-in-sync-with-the-forked-repo
> -http://github.com/guides/fork-a-project-and-submit-your-modifications
>
> I'm not sure if anyone of you (especially the devs) have any
> experience in Git, so I encourage everyone to learn it. Google for
> tutorials and guides.
>
> Second, I have changed the file/folder structure to match exactly like
> mootools-core (and mootools-more), like these:
> -http://github.com/mootools/mootools-core/tree/master
> -http://github.com/mootools/mootools-more/tree/master

ryan

unread,
Feb 17, 2009, 4:01:29 AM2/17/09
to MooEditable
Cool - thanks. I was just about to delete my repo and refork... git-
mergetool wasnt working, I still got merge errors after using it.

Lim Chee Aun

unread,
Feb 17, 2009, 4:05:00 AM2/17/09
to mooed...@googlegroups.com
On Tue, Feb 17, 2009 at 5:01 PM, ryan <rtnet...@gmail.com> wrote:
>
> Cool - thanks. I was just about to delete my repo and refork... git-
> mergetool wasnt working, I still got merge errors after using it.

Uh, what kind of errors? git-mergetool is used to merge one file at a time.

ryan

unread,
Feb 17, 2009, 4:29:28 AM2/17/09
to MooEditable
Yeah, i was able to use it ok, and it seemed to work, but then when i
tried to commit, or pull down your next changes it would give me a
fast-forward error.
Anyway, the reset --hard trick has worked.

On Feb 17, 9:05 am, Lim Chee Aun <chee...@gmail.com> wrote:

Lim Chee Aun

unread,
Feb 17, 2009, 4:46:06 AM2/17/09
to mooed...@googlegroups.com
On Tue, Feb 17, 2009 at 5:29 PM, ryan <rtnet...@gmail.com> wrote:
>
> Yeah, i was able to use it ok, and it seemed to work, but then when i
> tried to commit, or pull down your next changes it would give me a
> fast-forward error.

hmm, I never had that problem. probably try this:
http://blog.rajasekharan.com/2008/12/18/git-fast-forward/
Reply all
Reply to author
Forward
0 new messages