Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Building git repo

<< < (2/4) > >>

thomas:
The issue is that you are trying to build a non-supported source tree, if you ask me.

The autorevision tool does nothing but call subversion to find out the current revision of the checked out sources. It then places the value as an integer literal and as a character constant into a file. If you can figure out correctly what svn revision your checked out copy refers to, you can edit that file by hand and put in the respective number.

The reason for the existence of this tool is that once upon a time there was the desire to have the revision number prominently displayed, since whenever someone reported a problem and was asked what revision they used, the answer was uniformly: "Uh, what? I have no idea... where can I see this?"

Now the thing is, git doesn't have revisions (or does it, in the mean time?), so it's kind of hard for subversion to find it the current revision. 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.

ollydbg:
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.

oBFusCATed:
This is how we do it for the autotools revision number:

--- Code: ---elif git log --max-count=1 >/dev/null 2>&1; then
        echo "Using 'git log --graph' to get the revision"
        REV=`git log --graph | grep 'git-svn-id' | head -n 1 | grep -o -e "@\([0-9]*\)" | tr -d '@ '`
        LCD=`git log --date=iso --max-count=1 | grep -o -e "Date: \(.*\)" | cut -d ' ' -f 2- | sed 's/^ *//' | cut -f -2 -d ' '`
else

--- End code ---

What this does is to find the last svn commit and extract the svn rev from its commit message.
Probably, it can be done the same way in the autoversion tool, too.

BlueHazzard:
Hi.
i have found a possible speed up for this problem. If i use  "git svn find-rev" instead of "git svn log" then i have a speed up of 6000% ;)

patch is attached

there is only a different date format if you use the git version, because i can't modify the git date output to look like the svn output...

greetings

ps. this is again a git patch...
pss. Am i really the only one with the speed problems of "git svn log" ? git version 1.8.4.msysgit.0  (it doesn't work from msys as from the cmd)

[edit] The patch had a view bugs...

ollydbg:

--- Quote from: BlueHazzard on December 09, 2013, 11:48:58 pm ---Hi.
i have found a possible speed up for this problem. If i use  "git svn find-rev" instead of "git svn log" then i have a speed up of 6000% ;)

patch is attached

there is only a different date format if you use the git version, because i can't modify the git date output to look like the svn output...

greetings

ps. this is again a git patch...
pss. Am i really the only one with the speed problems of "git svn log" ? git version 1.8.4.msysgit.0  (it doesn't work from msys as from the cmd)

[edit] The patch had a view bugs...

--- End quote ---

Follow the instructions of README.portable file under PortableGit-1.8.5.2-preview20131230
I simply add the folder: E:\code\msys\PortableGit-1.8.5.2-preview20131230\cmd to the PATH. (there is a file named git.exe in this folder)

I'm using a git-svn mirror(I use git-svn to checkout C::B svn about half year ago, not the full svn revision), I found the trunk code of autorevision.cpp works fine, it can detect the correct svn revision number my local git branch based, but with your patch, I get the svn revision number 0.

I don't see much time difference before and after your patch.




Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version