Author Topic: Building git repo  (Read 13944 times)

Offline EnterTheNameHere

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Building git repo
« Reply #15 on: January 23, 2014, 12:33:20 pm »
Hi,
every time i build c::b from a git repo (https://github.com/obfuscated/codeblocks_sf/tree/no_ui_sdk) i get
Code
svn: E155007: '[...]\src' is not a working copy
and autorevision starts a huge tree of git/perl executables. I don't know what exactly they are doing but this operation is taking a huge amount of time, every time i build c::b (and this is are a lot of times lately)

I use git-svn (portablemsysgit+tortoisegit under Windows)for half a year, I don't have such issue. But obviously I don't put the bin folder of msysgit in PATH, so my build C::B always show a "0" in the revision dialog. :)

Basically, the msysgit command can only be used in a bash shell (in msys prompt), not the normal Windows command line.

I'm building Alpha's cc_interface git branch and this issue appears there too. I found out from autorevision.cpp that the command "git svn info" (line 160) causes this long operation, or maybe even infinite operation, I terminated autorevision.exe after 20 minutes. I tested it in msys prompt too, but it's the same behavior.

As a quick fix I just removed the pre-build command from sdk build and provided custom autorevision.h with "const unsigned int svn_revision = 0;" etc. Can this cause any issues for Code::Blocks and it's plugins, or is the svn revision only used to display it/create changelog?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Building git repo
« Reply #16 on: January 23, 2014, 09:22:27 pm »
As a quick fix I just removed the pre-build command from sdk build and provided custom autorevision.h with "const unsigned int svn_revision = 0;" etc. Can this cause any issues for Code::Blocks and it's plugins, or is the svn revision only used to display it/create changelog?
No, but it should stay away from official svn trunk:)
(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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5930
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Building git repo
« Reply #17 on: January 24, 2014, 07:58:21 am »
@ EnterTheNameHere
It works fine here, you can read this post: http://forums.codeblocks.org/index.php/topic,18635.msg128345.html#msg128345
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 jondo

  • Single posting newcomer
  • *
  • Posts: 2
Re: Building git repo
« Reply #18 on: December 12, 2014, 02:51:33 pm »
[...]
I don't see how you could patch the tool in a meaningful way either because not only is a git commit .... what is it called, checksum (?) like  773dea65156909838fa6c22825cafe090ff8030 not valid, and unwieldy, and it also probably won't play well with the layout on the start page.

It is usual to abbreviate this Git commit hash to the first e.g. 6 characters: "773dea". This carries enough info to identify the revision and is short enough to replace any SVN version.
To reduce the effect that such commit hashes do not carry any time information, it makes sense to increase the version number more often (e.g. via semantic versioning) and to display a build date.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Building git repo
« Reply #19 on: December 12, 2014, 08:59:23 pm »
Patches welcome. But keep in mind that the official VCS is still SVN!
(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!]