Moving to Git

3 views
Skip to first unread message

Henry Conceição

unread,
Jan 26, 2010, 4:53:52 PM1/26/10
to castle-pro...@googlegroups.com
Hi guys,

Now that our main projects are released, I think that is a good time
to bring this subject back to the table. Is there someone working on
this?

Cheers,
Henry Conceição

Ayende Rahien

unread,
Jan 26, 2010, 5:06:40 PM1/26/10
to castle-pro...@googlegroups.com
Henry,
Can you provide a dump of the SVN repository?
Trying to do a git-svn import via HTTP takes way too long.

2010/1/26 Henry Conceição <henry.c...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Castle Project Development List" group.
To post to this group, send email to castle-pro...@googlegroups.com.
To unsubscribe from this group, send email to castle-project-d...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/castle-project-devel?hl=en.


Mauricio Scheffer

unread,
Jan 26, 2010, 5:12:10 PM1/26/10
to Castle Project Development List
Yup, I'm on it. Unfortunately I've been quite busy lately and haven't
touched it for some time, sorry.

I already have git-svn repositories for all projects. What I need to
do now is rebase the history after the split to the history before the
split, for every project. Then upload them to github.

Henry Conceição

unread,
Jan 26, 2010, 5:31:13 PM1/26/10
to castle-pro...@googlegroups.com
@ayende: the dump: http://www.castleproject.org/files/castle.rar

@mauricio: what can I do to help you?


Cheers,
Henry Conceição

Mauricio Scheffer

unread,
Jan 26, 2010, 5:55:13 PM1/26/10
to Castle Project Development List
We could split this rebase process among several people, each one
would handle one or more projects.

I'll update my github repos with the latest svn commits, then upload
the base history somewhere.

Mauricio Scheffer

unread,
Jan 27, 2010, 12:52:25 AM1/27/10
to Castle Project Development List
All git repos are updated. Ex svn trunk with all common history is at
http://github.com/mausch/castle.

I'll describe the process to stitch the history tomorrow, using grafts
and filter-branch.


On Jan 26, 7:55 pm, Mauricio Scheffer <mauricioschef...@gmail.com>
wrote:

Mauricio Scheffer

unread,
Jan 27, 2010, 8:18:43 PM1/27/10
to Castle Project Development List
Here's the process for each project:

Fork/clone the project, e.g. git://github.com/mausch/Castle.ActiveRecord.git
Fork/clone the trunk: git://github.com/mausch/castle.git
From the trunk repo:
Add a remote to the project's repo and fetch it. They don't have any
common commits, that's ok.
Let P be the SHA1 of the last commit in trunk before the project got
moved to its own repo.
Let R be the SHA1 of the first commit in the project's repo.
Create .git/info/grafts with these SHA1s R P (e.g.
"cd0f4f795cc8800661d5221b0b59f18129b2bacc
750b420d6db1b6096a821aa9acdfbfcfac18e7c4")
Check with gitk that both repos are now stitched together.
Let A,B,C,... be the heads (local branches and tags) of the project's
repo.
Run git filter-branch -- P..A P..B P..C ...
Check with gitk that everything's ok.
Remove the original heads: rm -Rf .git/refs/original
Add the buildscripts submodule: git submodule add
git://github.com/mausch/Castle.Buildscripts.git buildscripts (this
should be easily relocatable later)
Commit and push with tags to the project's (not the trunk's) github

Sample result: http://github.com/mausch/Castle.Components.Binder

Hope it's clear!


On Jan 27, 2:52 am, Mauricio Scheffer <mauricioschef...@gmail.com>
wrote:
> All git repos are updated. Ex svn trunk with all common history is athttp://github.com/mausch/castle.

John Simons

unread,
Jan 27, 2010, 9:35:02 PM1/27/10
to castle-pro...@googlegroups.com


From: Mauricio Scheffer <mauricio...@gmail.com>
To: Castle Project Development List <castle-pro...@googlegroups.com>
Sent: Thu, 28 January, 2010 12:18:43 PM
Subject: Re: Moving to Git
> > > > To unsubscribe from this group, send email to castle-project-devel+unsub...@googlegroups.com.

> > > > For more options, visit this group athttp://groups.google.com/group/castle-project-devel?hl=en.

--
You received this message because you are subscribed to the Google Groups "Castle Project Development List" group.
To post to this group, send email to castle-pro...@googlegroups.com.
To unsubscribe from this group, send email to castle-project-devel+unsub...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/castle-project-devel?hl=en.



Yahoo!7: Catch-up on your favourite Channel 7 TV shows easily, legally, and for free at PLUS7. Check it out.

Mauricio Scheffer

unread,
Jan 28, 2010, 7:09:18 AM1/28/10
to Castle Project Development List
It doesn't make any difference, since git is distributed the repo can
be anywhere.
Of course when the migration is done, the official repo will be at
github.com/castleproject.

On Jan 27, 11:35 pm, John Simons <johnsimons...@yahoo.com.au> wrote:
> Why is the git url git://github.com/mausch/Castle.ActiveRecord.git?
> Shouldn't it be git://github.com/castleproject/Castle.ActiveRecord.git
>
> ________________________________

> From: Mauricio Scheffer <mauricioschef...@gmail.com>

> > > > > To unsubscribe from this group, send email to castle-project-d...@googlegroups.com.


> > > > > For more options, visit this group athttp://groups.google.com/group/castle-project-devel?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "Castle Project Development List" group.
> To post to this group, send email to castle-pro...@googlegroups.com.

> To unsubscribe from this group, send email to castle-project-d...@googlegroups.com.


> For more options, visit this group athttp://groups.google.com/group/castle-project-devel?hl=en.
>

>       ___________________________________________________________________________ _______
> Yahoo!7: Catch-up on your favourite Channel 7 TV shows easily, legally, and for free at PLUS7.www.tv.yahoo.com.au/plus7

Roelof Blom

unread,
Jan 28, 2010, 7:41:26 AM1/28/10
to castle-pro...@googlegroups.com
Can we not fork to github.com/castleproject right away?

Mauricio Scheffer

unread,
Jan 28, 2010, 7:49:29 AM1/28/10
to Castle Project Development List
Sure!

> > castle-project-d...@googlegroups.com<castle-project-devel%2Bun subs...@googlegroups.com>


> > .
> > > > > > > For more options, visit this group athttp://
> > groups.google.com/group/castle-project-devel?hl=en.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > "Castle Project Development List" group.
> > > To post to this group, send email to
> > castle-pro...@googlegroups.com.
> > > To unsubscribe from this group, send email to

> > castle-project-d...@googlegroups.com<castle-project-devel%2Bun subs...@googlegroups.com>


> > .
> > > For more options, visit this group athttp://
> > groups.google.com/group/castle-project-devel?hl=en.
>

> > ___________________________________________________________________________
> > _______
> > > Yahoo!7: Catch-up on your favourite Channel 7 TV shows easily, legally,
> > and for free at PLUS7.www.tv.yahoo.com.au/plus7
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Castle Project Development List" group.
> > To post to this group, send email to castle-pro...@googlegroups.com
> > .

> > To unsubscribe from this group, send email to

> > castle-project-d...@googlegroups.com<castle-project-devel%2Bun subs...@googlegroups.com>

Roelof Blom

unread,
Jan 28, 2010, 11:43:52 AM1/28/10
to castle-pro...@googlegroups.com
Hi,

All projects have been forked to github.com/castleproject. The following github accounts were added to the projects as 'collaborators', meaning you can clone/push to them:
ayende 
cneuwirt 
jonorossi 
hammett 
kenegozi 
kkozmic 
mausch 
mzywitza 
rbellamy 
roelofb

Tuna, I couldn't find you on Github. Please let us know your account name. If I missed anyone else, please speak up.

-- Roelof.

To unsubscribe from this group, send email to castle-project-d...@googlegroups.com.

Roelof Blom

unread,
Jan 28, 2010, 11:59:58 AM1/28/10
to castle-pro...@googlegroups.com
Hi again,

This means you can directly clone the repositories and uses Mauricio's rebase process from this step
[...]
Let P be the SHA1 of the last commit in trunk before the project got
moved to its own repo.

[...]

-- Roelof.

Tuna Toksoz

unread,
Jan 28, 2010, 1:21:07 PM1/28/10
to castle-pro...@googlegroups.com
Hi Roelof,

It is tunatoksoz for github.

Thank you.





Tuna Toksöz
Eternal sunshine of the open source mind.

http://devlicio.us/blogs/tuna_toksoz
http://tunatoksoz.com
http://twitter.com/tehlike

Roelof Blom

unread,
Jan 28, 2010, 1:45:31 PM1/28/10
to castle-pro...@googlegroups.com
So that's why searching for 'tehlike' was bound to fail...

Tuna Toksoz

unread,
Jan 28, 2010, 1:47:38 PM1/28/10
to castle-pro...@googlegroups.com
Yes, I have chosen an unordinary path this time :)

Roelof Blom

unread,
Jan 28, 2010, 2:01:55 PM1/28/10
to castle-pro...@googlegroups.com
You can clone/push all projects now.

John Simons

unread,
Jan 28, 2010, 3:19:54 PM1/28/10
to castle-pro...@googlegroups.com
My github account is johnsimons


From: Roelof Blom <roelo...@gmail.com>
To: castle-pro...@googlegroups.com
Sent: Fri, 29 January, 2010 3:43:52 AM


Yahoo!7: Catch-up on your favourite Channel 7 TV shows easily, legally, and for free at PLUS7. Check it out.

Henry Conceição

unread,
Jan 28, 2010, 3:22:53 PM1/28/10
to castle-pro...@googlegroups.com
Mine is hconceicao

Cheers,
Henry Conceição

James Curran

unread,
Jan 28, 2010, 3:36:57 PM1/28/10
to castle-pro...@googlegroups.com
Are we adding everyone or just committers? (if the former, i'm jamescurran)
Truth,
James

2010/1/28 Henry Conceição <henry.c...@gmail.com>:
> Mine is hconceicao

Roelof Blom

unread,
Jan 28, 2010, 5:19:17 PM1/28/10
to castle-pro...@googlegroups.com
Just committers.


--

Roelof Blom

unread,
Jan 28, 2010, 5:22:31 PM1/28/10
to castle-pro...@googlegroups.com
Added

Roelof Blom

unread,
Jan 28, 2010, 5:22:54 PM1/28/10
to castle-pro...@googlegroups.com
Added.

2010/1/28 Henry Conceição <henry.c...@gmail.com>

Ayende Rahien

unread,
Jan 28, 2010, 5:52:11 PM1/28/10
to castle-pro...@googlegroups.com
Slightly confused, is the SVN migration completed or not by now?

Mauricio Scheffer

unread,
Jan 28, 2010, 6:33:38 PM1/28/10
to Castle Project Development List
Short answer: no.
Long answer: git-svn migration has been complete for a couple of
months now, what we're doing now is re-attaching history to each
project. If anyone forks it as it is right now, he would have to
rebase everything he commits after we finish re-attaching history.


On Jan 28, 7:52 pm, Ayende Rahien <aye...@ayende.com> wrote:
> Slightly confused, is the SVN migration completed or not by now?
>
>
>
> On Fri, Jan 29, 2010 at 12:22 AM, Roelof Blom <roelof.b...@gmail.com> wrote:
> > Added.
>

> > 2010/1/28 Henry Conceição <henry.concei...@gmail.com>


>
> >> Mine is hconceicao
>
> >> Cheers,
> >> Henry Conceição
>
> >>  --
> > You received this message because you are subscribed to the Google Groups
> > "Castle Project Development List" group.
> > To post to this group, send email to castle-pro...@googlegroups.com
> > .
> > To unsubscribe from this group, send email to

> > castle-project-d...@googlegroups.com<castle-project-devel%2Bun subs...@googlegroups.com>

Mauricio Scheffer

unread,
Jan 28, 2010, 7:58:18 PM1/28/10
to Castle Project Development List
http://github.com/castleproject/Castle.Components.Binder is done.
Please everyone check if this is ok. If it is, we could point Teamcity
there. Git has to be installed on the build agents, to get the current
head sha1.

Which brings up another issue: how do we build AssemblyInfo files now?
AFAIK there is no clean way to embed the sha1 in the assembly version.
I suggest we use something like Daniel shows in
http://www.tigraine.at/2009/10/27/simplifying-releases-through-git/ ,
but we would also use the "number of commits after tag" part.


On Jan 28, 8:33 pm, Mauricio Scheffer <mauricioschef...@gmail.com>
wrote:

John Simons

unread,
Jan 28, 2010, 10:16:13 PM1/28/10
to castle-pro...@googlegroups.com
How about patches, does git support patch files?
I'm asking because that is how all our users are used to contribute, and also how the website instructions describes the process.

Cheers John

2010/1/28 Henry Conceição <henry.concei...@gmail.com>

Mine is hconceicao

Cheers,
Henry Conceição

To unsubscribe from this group, send email to castle-project-d...@googlegroups.com.


For more options, visit this group at http://groups.google.com/group/castle-project-devel?hl=en.


__________________________________________________________________________________
Yahoo!7: Catch-up on your favourite Channel 7 TV shows easily, legally, and for free at PLUS7. www.tv.yahoo.com.au/plus7

G. Richard Bellamy

unread,
Jan 29, 2010, 1:52:50 AM1/29/10
to castle-pro...@googlegroups.com
I will have some time this weekend to take a look at this.

Mauricio, thanks for taking care of this!

-rb

-----Original Message-----
From: castle-pro...@googlegroups.com
[mailto:castle-pro...@googlegroups.com] On Behalf Of Mauricio
Scheffer
Sent: Thursday, January 28, 2010 4:58 PM
To: Castle Project Development List
Subject: Re: Moving to Git

castle-project-d...@googlegroups.com.

G. Richard Bellamy

unread,
Jan 29, 2010, 1:59:18 AM1/29/10
to castle-pro...@googlegroups.com
Absolutely. See git-diff, git-apply, git-format-patch, git-am, etc.

-rb

-----Original Message-----
From: castle-pro...@googlegroups.com
[mailto:castle-pro...@googlegroups.com] On Behalf Of John Simons
Sent: Thursday, January 28, 2010 7:16 PM
To: castle-pro...@googlegroups.com
Subject: Re: Moving to Git

Ayende Rahien

unread,
Jan 29, 2010, 3:12:58 AM1/29/10
to castle-pro...@googlegroups.com
Yes, it does.
In a better format than SVN.
And there are pull requests, which are significantly better.

Andre Loker

unread,
Jan 29, 2010, 9:45:27 AM1/29/10
to Castle Project Development List
On 29 Jan., 01:58, Mauricio Scheffer <mauricioschef...@gmail.com>
wrote:

> Which brings up another issue: how do we build AssemblyInfo files now?
> AFAIK there is no clean way to embed the sha1 in the assembly version.
> I suggest we use something like Daniel shows inhttp://www.tigraine.at/2009/10/27/simplifying-releases-through-git/,
> but we would also use the "number of commits after tag" part.

Personally, I build my version numbers as follows:

AssemblyVersion: major.minor.revision.commit_count
Example: AssemblyVersion("1.0.1.27")

AssemblyInformationalVersion: major.minor.revision.commit_count/
shorthash-branch build_number
Example: AssemblyInformationalVersion("1.0.1.27/1dd3-master build 6")


Where
major.minor.revision are set manually
commit_count is the total number of commits on the current branch,
which can be determined by: git rev-list HEAD | wc -l
shorthash are the first 4 characters of the commit hash
build_number is the sequential build number as provided by e.g. CCNet

See my rake buildscript for details: http://github.com/aloker/dotnet-raketools


Andre Loker

unread,
Jan 29, 2010, 9:50:34 AM1/29/10
to Castle Project Development List
On 29 Jan., 15:45, Andre Loker <lo...@gmx.de> wrote:
> > I suggest we use something like Daniel shows inhttp://www.tigraine.at/2009/10/27/simplifying-releases-through-git/,
> > but we would also use the "number of commits after tag" part.
Oh, I didn't realize there was git describe. That's also cool of
course :-)

Mauricio Scheffer

unread,
Jan 29, 2010, 10:59:46 AM1/29/10
to Castle Project Development List
+1. This currently throws a warning "Assembly generation -- The
version '1.0.1.27/1dd3-master build 6' specified for the 'product
version' is not in the normal 'major.minor.build.revision' format" but
it seems that the warning is removed in .net 4.0: http://bit.ly/aWIYeX

Andre Loker

unread,
Jan 29, 2010, 11:46:48 AM1/29/10
to Castle Project Development List
On 29 Jan., 16:59, Mauricio Scheffer <mauricioschef...@gmail.com>
wrote:

> +1. This currently throws a warning "Assembly generation -- The
> version '1.0.1.27/1dd3-master build 6' specified for the 'product
> version' is not in the normal 'major.minor.build.revision' format" but
> it seems that the warning is removed in .net 4.0:http://bit.ly/aWIYeX

You can safely ignore/disable the warning:

"You can ignore this warning if you encounter it when you create a
AssemblyInformationalVersionAttribute. The informational version is a
string that attaches additional version information to an assembly;
this information is not used at run time. Although you can specify any
text, a warning message appears on compilation if the string is not in
the format that is used by the assembly version number, or if it is in
that format but contains wildcard characters. This warning is
harmless."

http://msdn.microsoft.com/en-us/library/4a0640cd.aspx

Cristian Prieto

unread,
Jan 29, 2010, 6:29:13 PM1/29/10
to castle-pro...@googlegroups.com
Git was designing with patching in mind... so, don't worry at all ;)
--
Cristian Prieto
Microsoft ASP.NET MVP
MCPD ASP.NET Web Development Applications 3.5
MCTS Workflow Foundation 3.5
MCTS ADO.NET Development 3.5

Mauricio Scheffer

unread,
Jan 30, 2010, 3:53:46 PM1/30/10
to Castle Project Development List
Only problem with this is that not all projects have tags yet, so git
describe would fail there. Some sort of fallback has to be devised for
these cases.

BTW it would be great if you could fork http://github.com/castleproject/Castle.Buildscripts
and implement this :-)

Daniel Hölbling

unread,
Jan 31, 2010, 4:31:57 AM1/31/10
to castle-pro...@googlegroups.com
As you already pointed out, it is rather simple to use git-describe to generate assemblyinfos. Ayende also used some compiler directive to suppress the warning when adding the SHA1 to the Output in Rhino.Mocks, a road I didn't want to go down. 

As for the tags, if we use git-describe it should be pretty easy to create a tag for the latest released version on the appropriate repositories.

Pathing and Git:
I haven't exactly had the best of luck with exporting patches and then applying them. I tried a few times while learning how to do handle git correctly and usually I couldn't apply the patch later. But I know this works, I just didn't figure it out right away. If anyone has seen a good article on that please shoot me an email.
As for pull requests: I think this will revolutionize the way we handle patches.

greetings Daniel

--
You received this message because you are subscribed to the Google Groups "Castle Project Development List" group.
To post to this group, send email to castle-pro...@googlegroups.com.
To unsubscribe from this group, send email to castle-project-d...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages