Short Version:

I wrote an awesome tool that replays Dojo's svn commits into a git repo
including branches and tags.

https://github.com/dojo-toolkit-mirror/dojo

Long Version:

For about a year, I've been using git for all my projects and manually
shoving Dojo into my repos. I got tired of that and about a month ago
started writing a Python script that will replay all Dojo commits into a
git repo that can be properly submoduled.

I have problems with the official Dojo mirror on GitHub. For starters,
it mirrors Dojo's trunk, which is not stable. It wasn't until last week
that Kris tagged some of the revs. Second, each project (dojo, dijit,
dojox, util, demos) repo in the official mirror are in their own
separate git repo. That's most likely because of the way git-svn works
and the way Dojo's svn repo is structured. When we bundle Dojo
releases, each of those projects are tied together and I think the repo
should reflect the same structure.

My tool will properly create branches and tags, though the tags are
somewhat pointless. It combines dojo, dijit, dojox, util, and demos
into a single repo.

I started at rev 15378, which is the commit used to cut Dojo 1.2. Why
1.2? Because it was the first release to include demos and is old
enough that if I can replay all commits from 1.2 to today, it should
handle all future Dojo 1.X commits. I'm hoping with Dojo 2.0 and the
AMD format that my tool becomes extinct.

The Python script works, but it's not perfect and the code is absolutely
crap, so if you love Python, brace yourself if you look at the code.
The only thing that bugs me is I didn't handle committers perfectly. It
shows that the committer as my server user, not the real committer.
Author works as expected though. Also, I tried my best to deal with
empty directories by adding a .gitignore file since git doesn't version
directories, but I think there are a couple scenarios where an empty
directory sneaks by.

I will be setting up a cron job on my server that will automatically
replay new commits. Inside the mirror's repo is a .svnrev file that is
used to track the rev. That file gets updated for each rev that is
replayed. This mirror is read only, except the replay commits.

The tool source can be found here:
https://github.com/dojo-toolkit-mirror/dojo-svn-2-git-tool

Fun facts... it took over 54 hours to siphon the 10,275 commits from svn
and create the git repo. The resulting git repo is 723MB in size.

I'm still testing to make sure this mirror is correct, but I figured
this might interest some other people too. Feedback is welcome!

-Chris

Search Discussions

  • Kris Zyp at Jun 28, 2011 at 8:57 pm
    Awesome, this is so much better than me manually tagging and branching!

    I will say though that I definitely prefer having each package be it's
    own repo. Logically we have agreed that dojo and dijit are their own
    packages as we move to a package-oriented approach, and having a repo
    per package is certainly the standard convention of JS projects.

    But still, this is awesome.
    Kris
    On 6/28/2011 5:23 PM, Chris Barber wrote:
    Short Version:

    I wrote an awesome tool that replays Dojo's svn commits into a git repo
    including branches and tags.

    https://github.com/dojo-toolkit-mirror/dojo

    Long Version:

    For about a year, I've been using git for all my projects and manually
    shoving Dojo into my repos. I got tired of that and about a month ago
    started writing a Python script that will replay all Dojo commits into a
    git repo that can be properly submoduled.

    I have problems with the official Dojo mirror on GitHub. For starters,
    it mirrors Dojo's trunk, which is not stable. It wasn't until last week
    that Kris tagged some of the revs. Second, each project (dojo, dijit,
    dojox, util, demos) repo in the official mirror are in their own
    separate git repo. That's most likely because of the way git-svn works
    and the way Dojo's svn repo is structured. When we bundle Dojo
    releases, each of those projects are tied together and I think the repo
    should reflect the same structure.

    My tool will properly create branches and tags, though the tags are
    somewhat pointless. It combines dojo, dijit, dojox, util, and demos
    into a single repo.

    I started at rev 15378, which is the commit used to cut Dojo 1.2. Why
    1.2? Because it was the first release to include demos and is old
    enough that if I can replay all commits from 1.2 to today, it should
    handle all future Dojo 1.X commits. I'm hoping with Dojo 2.0 and the
    AMD format that my tool becomes extinct.

    The Python script works, but it's not perfect and the code is absolutely
    crap, so if you love Python, brace yourself if you look at the code.
    The only thing that bugs me is I didn't handle committers perfectly. It
    shows that the committer as my server user, not the real committer.
    Author works as expected though. Also, I tried my best to deal with
    empty directories by adding a .gitignore file since git doesn't version
    directories, but I think there are a couple scenarios where an empty
    directory sneaks by.

    I will be setting up a cron job on my server that will automatically
    replay new commits. Inside the mirror's repo is a .svnrev file that is
    used to track the rev. That file gets updated for each rev that is
    replayed. This mirror is read only, except the replay commits.

    The tool source can be found here:
    https://github.com/dojo-toolkit-mirror/dojo-svn-2-git-tool

    Fun facts... it took over 54 hours to siphon the 10,275 commits from svn
    and create the git repo. The resulting git repo is 723MB in size.

    I'm still testing to make sure this mirror is correct, but I figured
    this might interest some other people too. Feedback is welcome!

    -Chris

    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
  • Chris Barber at Jun 28, 2011 at 11:34 pm
    Can you submodule a subdirectory in another repo? git-subtree? If so,
    then you could pull just dojo and dijit. My concerns with separate
    repos for project is A) you need to submodule multiple repos (meaning
    multiple pulls, extra management) and B) making it a bigger pain to keep
    each submodule in sync to the same Dojo version. By combining each
    project into a single repo, it's similar to bundled Dojo release and
    makes it so you can't easily have different Dojo versions of dojo,
    dijit, etc.

    -Chris

    On 6/28/11 7:57 PM, Kris Zyp wrote:
    Awesome, this is so much better than me manually tagging and branching!

    I will say though that I definitely prefer having each package be it's
    own repo. Logically we have agreed that dojo and dijit are their own
    packages as we move to a package-oriented approach, and having a repo
    per package is certainly the standard convention of JS projects.

    But still, this is awesome.
    Kris
    On 6/28/2011 5:23 PM, Chris Barber wrote:
    Short Version:

    I wrote an awesome tool that replays Dojo's svn commits into a git repo
    including branches and tags.

    https://github.com/dojo-toolkit-mirror/dojo

    Long Version:

    For about a year, I've been using git for all my projects and manually
    shoving Dojo into my repos. I got tired of that and about a month ago
    started writing a Python script that will replay all Dojo commits into a
    git repo that can be properly submoduled.

    I have problems with the official Dojo mirror on GitHub. For starters,
    it mirrors Dojo's trunk, which is not stable. It wasn't until last week
    that Kris tagged some of the revs. Second, each project (dojo, dijit,
    dojox, util, demos) repo in the official mirror are in their own
    separate git repo. That's most likely because of the way git-svn works
    and the way Dojo's svn repo is structured. When we bundle Dojo
    releases, each of those projects are tied together and I think the repo
    should reflect the same structure.

    My tool will properly create branches and tags, though the tags are
    somewhat pointless. It combines dojo, dijit, dojox, util, and demos
    into a single repo.

    I started at rev 15378, which is the commit used to cut Dojo 1.2. Why
    1.2? Because it was the first release to include demos and is old
    enough that if I can replay all commits from 1.2 to today, it should
    handle all future Dojo 1.X commits. I'm hoping with Dojo 2.0 and the
    AMD format that my tool becomes extinct.

    The Python script works, but it's not perfect and the code is absolutely
    crap, so if you love Python, brace yourself if you look at the code.
    The only thing that bugs me is I didn't handle committers perfectly. It
    shows that the committer as my server user, not the real committer.
    Author works as expected though. Also, I tried my best to deal with
    empty directories by adding a .gitignore file since git doesn't version
    directories, but I think there are a couple scenarios where an empty
    directory sneaks by.

    I will be setting up a cron job on my server that will automatically
    replay new commits. Inside the mirror's repo is a .svnrev file that is
    used to track the rev. That file gets updated for each rev that is
    replayed. This mirror is read only, except the replay commits.

    The tool source can be found here:
    https://github.com/dojo-toolkit-mirror/dojo-svn-2-git-tool

    Fun facts... it took over 54 hours to siphon the 10,275 commits from svn
    and create the git repo. The resulting git repo is 723MB in size.

    I'm still testing to make sure this mirror is correct, but I figured
    this might interest some other people too. Feedback is welcome!

    -Chris

    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
  • Peter Higgins at Jun 29, 2011 at 7:49 am
    I can see a tag being like it is today, where the "kitchen sink" from
    all repos is merged into a single point (src/branches/ and src/tags/
    follow this pattern) but as Kris stated, I'd like to see each of Dojo
    and Dijit with their own repository and each of the dojox projects
    broken out into individual projects. From Dojox only "sanctioned"
    projects end up in the tags. And by sanctioned I mean "CLA signed,
    inline docs working and wiki doc pages in house"

    ~phiggins

    On 6/28/11 11:34 PM, Chris Barber wrote:
    Can you submodule a subdirectory in another repo? git-subtree? If so,
    then you could pull just dojo and dijit. My concerns with separate
    repos for project is A) you need to submodule multiple repos (meaning
    multiple pulls, extra management) and B) making it a bigger pain to keep
    each submodule in sync to the same Dojo version. By combining each
    project into a single repo, it's similar to bundled Dojo release and
    makes it so you can't easily have different Dojo versions of dojo,
    dijit, etc.

    -Chris

    On 6/28/11 7:57 PM, Kris Zyp wrote:
    Awesome, this is so much better than me manually tagging and branching!

    I will say though that I definitely prefer having each package be it's
    own repo. Logically we have agreed that dojo and dijit are their own
    packages as we move to a package-oriented approach, and having a repo
    per package is certainly the standard convention of JS projects.

    But still, this is awesome.
    Kris
    On 6/28/2011 5:23 PM, Chris Barber wrote:
    Short Version:

    I wrote an awesome tool that replays Dojo's svn commits into a git repo
    including branches and tags.

    https://github.com/dojo-toolkit-mirror/dojo

    Long Version:

    For about a year, I've been using git for all my projects and manually
    shoving Dojo into my repos. I got tired of that and about a month ago
    started writing a Python script that will replay all Dojo commits into a
    git repo that can be properly submoduled.

    I have problems with the official Dojo mirror on GitHub. For starters,
    it mirrors Dojo's trunk, which is not stable. It wasn't until last week
    that Kris tagged some of the revs. Second, each project (dojo, dijit,
    dojox, util, demos) repo in the official mirror are in their own
    separate git repo. That's most likely because of the way git-svn works
    and the way Dojo's svn repo is structured. When we bundle Dojo
    releases, each of those projects are tied together and I think the repo
    should reflect the same structure.

    My tool will properly create branches and tags, though the tags are
    somewhat pointless. It combines dojo, dijit, dojox, util, and demos
    into a single repo.

    I started at rev 15378, which is the commit used to cut Dojo 1.2. Why
    1.2? Because it was the first release to include demos and is old
    enough that if I can replay all commits from 1.2 to today, it should
    handle all future Dojo 1.X commits. I'm hoping with Dojo 2.0 and the
    AMD format that my tool becomes extinct.

    The Python script works, but it's not perfect and the code is absolutely
    crap, so if you love Python, brace yourself if you look at the code.
    The only thing that bugs me is I didn't handle committers perfectly. It
    shows that the committer as my server user, not the real committer.
    Author works as expected though. Also, I tried my best to deal with
    empty directories by adding a .gitignore file since git doesn't version
    directories, but I think there are a couple scenarios where an empty
    directory sneaks by.

    I will be setting up a cron job on my server that will automatically
    replay new commits. Inside the mirror's repo is a .svnrev file that is
    used to track the rev. That file gets updated for each rev that is
    replayed. This mirror is read only, except the replay commits.

    The tool source can be found here:
    https://github.com/dojo-toolkit-mirror/dojo-svn-2-git-tool

    Fun facts... it took over 54 hours to siphon the 10,275 commits from svn
    and create the git repo. The resulting git repo is 723MB in size.

    I'm still testing to make sure this mirror is correct, but I figured
    this might interest some other people too. Feedback is welcome!

    -Chris

    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdojo-contributors @
categoriesdojo
postedJun 28, '11 at 7:23p
activeJun 29, '11 at 7:49a
posts4
users3
websitedojotoolkit.org

People

Translate

site design / logo © 2022 Grokbase