Author Topic: A Git Repository for Code::Blocks (ONLY trunk)  (Read 38228 times)

Offline billyonthemountain

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: A Git Repository for Code::Blocks (ONLY trunk)
« Reply #15 on: April 17, 2011, 08:54:51 pm »
is there also something similar like kdesvn ?
I'd suggest qgit... based on QT4
(ASM, C/C++)||(VISION&AI)||(EMBEDDED SYSTEMS)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: A Git Repository for Code::Blocks (ONLY trunk)
« Reply #16 on: August 29, 2011, 07:17:30 am »
Are there any update git repos I can use?
Is it possible to setup a read-only git repo in the berliOS?
I'm working on Windows, and TortoiseGit + msysgit combination works quite well. (I use git to handle GDB source, it works quite well)
The only thing I hate svn is that when I try to find the code changes between some old revisions, I need to wait the svn to fetch those revisions files from the internet, that was extremely slow, it always take several seconds or event more seconds.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline daniloz

  • Regular
  • ***
  • Posts: 268
Re: A Git Repository for Code::Blocks (ONLY trunk)
« Reply #17 on: November 02, 2011, 04:20:08 pm »
Sorry to hijack an old thread, but I really think this belongs here and not somewhere else... ;-)

I started yesterday using GIT here and I'm already loving it... Local branching is so cool...

I have "imported" the SVN from codeblocks into a local GIT repo. I have made some changes and committed them to my local GIT.

My question is now: How can I see the differences between my local copy and codeblocks' SVN HEAD?

Thx,

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: A Git Repository for Code::Blocks (ONLY trunk)
« Reply #18 on: November 02, 2011, 05:08:24 pm »
I guess it depends on the method you use to get the svn repo in git.
Depending on this you should read the correct manual, I guess there you'll find something about this.
As far as I know you should do rebase if you want to get the changes in the svn repo.
And if you do rebase I guess the changes from the first commit to the last are your changes.
But I may be wrong. I've used git-svn once long time ago and I didn't import the whole repo in git.

How long does it take to import the whole repo with the history?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline daniloz

  • Regular
  • ***
  • Posts: 268
Re: A Git Repository for Code::Blocks (ONLY trunk)
« Reply #19 on: November 02, 2011, 05:17:24 pm »
I guess it depends on the method you use to get the svn repo in git.
Depending on this you should read the correct manual, I guess there you'll find something about this.
What I did was
Code
git svn clone -s http://svn.berlios.de/svnroot/repos/codeblocks local_dir
and yes, I got the complete history. I can got back to the "big bang" of codeblocks...  8)
But I haven't found anything in the git-svn manual about this...

How long does it take to import the whole repo with the history?
Hmmm.... I was in a meeting, so quite not sure, but in the range of one to two hours.

As far as I know you should do rebase if you want to get the changes in the svn repo.
Yes, I read that as well, I can rebase to get the svn updated (like an svn update). Haven't tried yet, because there are no new changes on the svn, but will report on that as soon as possible.

And if you do rebase I guess the changes from the first commit to the last are your changes.
Sorry, I couldn't follow you here. You mean from my first commit to the local GIT repo to my last commit?


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: A Git Repository for Code::Blocks (ONLY trunk)
« Reply #20 on: November 02, 2011, 06:37:11 pm »
Sorry, I couldn't follow you here. You mean from my first commit to the local GIT repo to my last commit?
Yes, something like that. As far as I know rebasing means that all your commits are reverted the commits from svn are applied and then your commits are applied again.
So, I guess this are the steps needed. Btw it is possible to convert all commits to patches with a single command.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline daniloz

  • Regular
  • ***
  • Posts: 268
Re: A Git Repository for Code::Blocks (ONLY trunk)
« Reply #21 on: November 02, 2011, 08:16:13 pm »
So, I guess this are the steps needed. Btw it is possible to convert all commits to patches with a single command.
And the command would be? :-)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: A Git Repository for Code::Blocks (ONLY trunk)
« Reply #22 on: November 02, 2011, 08:17:52 pm »
RTFM, I don't remember...  :P
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: A Git Repository for Code::Blocks (ONLY trunk)
« Reply #23 on: November 02, 2011, 10:03:26 pm »
I just started to use git-svn since some weeks and it works fine for me.

To create a diff on the commandline, you can use:

Code
git diff-tree -m -p --pretty <commit>
where <commit> is the id of the commit, you can get it with git log .

There are many other options, look into git help diff-tree .

The diffs are not usable by tortoise svn, but there is a a python-script, that can convert it on https://www.seegrid.csiro.au/wiki/Infosrvices/GeoserverGit

On linux I suggest using gitk or gitg and of course git gui .

zabzonk

  • Guest
Re: A Git Repository for Code::Blocks (ONLY trunk)
« Reply #24 on: November 02, 2011, 10:54:46 pm »
If you want to play with git-svn, but can't face downloading the whole CB history, you can just clone a particular SVN revision, which will give you something you can work on inside a few minutes as opposed to a few hours for the whole shebang. For example:

Code
git svn clone -r7548 svn://svn.berlios.de/codeblocks/trunk

creates a local git repository containing the code for SVN revision 7548.


Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: A Git Repository for Code::Blocks (ONLY trunk)
« Reply #25 on: November 04, 2011, 06:12:47 pm »
You can use TortoiseGIT+msys-git combination. They are as good as TortoiseSVN.
That, Sir, is the biggest lie of the century. Nice try, though :)    (I can't believe I only saw that one today, hehehe.)

TortoiseSVN installs in around 10 seconds and works perfectly well even if you don't know a single thing about version control. If you can read English, and know how to hold a mouse, you're good to go.

With TortoiseGit, I run into annoyances and problems doing trivial things like committing or reverting almost every single time.

Furthermore, msys-git takes almost an hour to install and requires a truly ridiculous amount of harddisk space. Someone who distributes a "little commandline tool" that weights on the order of hundreds of megabytes got something seriously wrong.
« Last Edit: November 04, 2011, 06:15:27 pm by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

zabzonk

  • Guest
Re: A Git Repository for Code::Blocks (ONLY trunk)
« Reply #26 on: November 04, 2011, 06:30:26 pm »
@thomas I agree about tortoise-git - not a patch on  TortoiseSVN, and rather buggy. However:

> Furthermore, msys-git takes almost an hour to install

Say what? I've installed it a couple of times, and I'd say 10 minutes at the very, very outside. However, the bash shell that comes with it is  extremely slow unless you run it as administrator. But I've found its more or less impossible to do development work on Win7 unless you run as admin, so its not a big deal for me.

Offline daniloz

  • Regular
  • ***
  • Posts: 268
Re: A Git Repository for Code::Blocks (ONLY trunk)
« Reply #27 on: November 04, 2011, 07:06:58 pm »
@thomas Also agree that tortoiseGit + msysGit is quite buggy and not really ready for show time. I think that the whole git thing was developed for command line and it's rather difficult to put it in a GUI. I still think that using git gui & gitk in addition to command line git is way better than tortoiseGit, IMHO.

Even though I'm using git for not less than a week now, I'm already in love with its capabilities, mainly cheap local branching and local/distributed repositories.

Just my 2 cents... ;-)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: A Git Repository for Code::Blocks (ONLY trunk)
« Reply #28 on: November 04, 2011, 08:25:10 pm »
Furthermore, msys-git takes almost an hour to install and requires a truly ridiculous amount of harddisk space. Someone who distributes a "little commandline tool" that weights on the order of hundreds of megabytes got something seriously wrong.
I am using portable GIT (http://code.google.com/p/msysgit/downloads/detail?name=PortableGit-1.7.7.1-preview20111027.7z&can=2&q=) which you only need to decompress and then it works. In combination with SmartGIT (you guys know meanwhile I love their tools ;-)) it's quite powerful, even the SVN/GIT integration. It offers a very easy way to get a GIT repo out of a SVN repo.

But I have to agree with Thomas: I was really surprised how big GIT is - I was hoping to find at least a UI tool like the one shipping with Mercurial, but no luck. :)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

zabzonk

  • Guest
Re: A Git Repository for Code::Blocks (ONLY trunk)
« Reply #29 on: November 04, 2011, 08:32:53 pm »
> I was hoping to find at least a UI tool like the one shipping with Mercurial,

Mercurial does not ship with a GUI - TortoiseHg is a separate project. And in fact msys-git does ship with a (not very good) GUI try:

Code
git help gui

for details.