yysun's space

Kudos to codeplex for supporting git. They switched my two projects, git source control provider and git web access shortly after I requested.

Using the steps below, the github repo was pushed to codeplex.

  1. git remote add codeplex https://yysun@git01.codplex.com/gitweb
  2. git fetch codeplex master:codeplex
  3. git merge codeplex
  4. (delete files from codeplex, then amend last commit)
  5. git push codeplex master




Dragon is a simplified ORM tool. It has similar syntax to Matrix.Data.Database, but maps to static types not dynamic. E.g.

Database database = Database.Open("Users");
var users = database.Query<TestUser>("select UserId, Email from UserProfile where UserId=@UserId", new { UserId = 2 }).ToList();
Assert.AreEqual(2, users[0].UserId);
Assert.AreEqual("user@company.com", users[0].Email);

Database Methods

The Database Class has methods Open, Execute QueryValue and Query.

  • Open, opens database connection, the parameter can be a connection string, or a connection string name in app.config file or a registry path to a connection string.
  • Execute, creates a command and runs ExecuteNonQuery.
  • QueryValue, creates a command and runs ExecuteScalar.
  • Query, creates a command with SQL statement(s) or stored procedure name and creates objects. The Query method supports up to 3 multiple record sets. The result objects are returned in a Tuple, E.g.

Database database = Database.Open("Users");
var users = database.Query<TestUser, TestMemberShip, TestUserRole>(
    @"select * from dbo.UserProfile
        select * from dbo.webpages_Membership
        select * from dbo.webpages_Roles");

Assert.AreEqual(1, users.Item1.ToList()[0].UserId);
Assert.AreEqual(0, users.Item2.Count());
Assert.AreEqual("Sysadmin", users.Item3.ToList()[0].RoleName);

Source Code


One feature I liked of iOS objective-c is nil-eats-messages. Basically it does a NO-OP if sending messages (invoking methods) on a nil (null) object.

If had it in C#, we would have less crashes because of the NullReferenceException.

It was a totally surprise to myself that GitScc is able to use Chinese in comments and branch names.


In the real world I would not use this feature, because none of git bash, git extensions or tortoise git could work like this. But it is cool!

[UPDATE]:  At the beginning gitscc uses ngit (a jgit port) at the beginning, which works well with utf-8 file names. But it does handle autocrlf flag and not triggering hooks. Gitsscc has to use Git for Windows (msysgit) instead. It then went into some issues related to non-ascii file names with msysgit.

Good news is that it looks like msysgit will soon have utf-8 support.

This is only relevant if you used non-ASCII file names with previous Git
for Windows versions (V1.7.6 and earlier).

Previous Git for Windows versions stored file names in the default
encoding of the originating Windows system, making these repositories
incompatible with other Windows language-versions and other Git versions (including Cygwin-git and JGit / EGit on Windows).

The Unicode-enabled Git for Windows stores file names UTF-8 encoded.

[UPDATE 2 (5/28/2012)]:  Since 1.7.10, Git for Windows supports UTF-8 encoding internally. Non-ascii file names are now shown up in GitScc correctly again. 

Tags: ,

I am glad to announce that I successfully created a new type of graphic view of Git repository in the gitscc project.


It displays commits horizontally with heads, tags and remotes annotations.

Other Git programs, such as Gitk, Git Extensions, TortoiseGit usually show git logs vertically. But Git documentations, books and tutorials usually use horizontal view to illustrate the structure of the Git repository. E.g the one from git-merge help page.


And the one from  Pro Git Book.


I believe horizontal view is easier to understand. A lot of documents that explain the concept of branching and merging use horizontal view. They even have traces back to SVN and CVS.

Anyway, What’s new in gitscc’s view besides being horizontal?

The view has simplified (or condensed) mode, which omits commits that are less important. It only shows commits that have refs (heads, tags and remotes) or have multiple parents/children. E.g. There are 5 commits in the following picture.


Using the simplified (or condensed) mode, it becomes like below.


The simplified view has huge benefits. It highlights the structure of the git repository with less tiny details. The first picture of this post is a simplified view of gitscc repository. 10+ commits between 0.7.0 and V0.8.0 are omitted.

It solves a concern of the idea of commit often. The concern was too many smaller commit crowd the log view. With the simplified view this is no longer an issue. Smaller commits won’t show up.

I am planning add more interactive actions to this new Git History View. E.g, I can drag the ‘master’ head and drop it on the ‘develop’ head. It triggers a merge of these two branches ……

Stay tuned. It will come in gitscc V0.9.

Tags: ,

After replaced GitSharp with ngit, the Pending Changes Tool Window in GitScc is moving forward, even with a diff view.


A preview (version as 0.6.8) has been released. Final version (0.7.0) will be release ready soon I hope. But UI like this has many tedious details. Any help is welcome,  please fork the source at github.

[UPDATE #1] The screenshot above shows that I use gitscc in developing gitscc. I noticed that with this new pending changes window, the recent commits I made are more organized, tidy and meaningful. This is truly a result of a convenient tool can provide.

[UPDATE #2] TFS gets the concept of “local”. Although it has only local workspace (working directory) and no local history yet, it is still a good news. It has not the instant diff view. But the its web page like pending changes display is interesting …

The NuGet Manager Console is a PowerShell console. It works with posh-git.


It has tab completion on commands and even on remotes and branch names. It does not show current branch name in prompt. That’s OK to me. But it cannot push to guthub through https. It hangs and does not show a prompt/dialogue to collect password. This seems to be a problem to me, because I only use https.


  • None
  • Pk: The horizontal view is a pleasure to use! Good thinking
  • randyburden: A valiant and commendable effort. Your use of Tuple is a little weird but it offers a feature that most other microORMs don't. Your use of a static Gu
  • reav: great work done on Rabbit Framework. just started to learning it, and by now i think it will solve all my problems and questions, that i had in webpag