Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » Using Egit on svn repo
Using Egit on svn repo [message #644808] Tue, 14 December 2010 05:02 Go to next message
victoor.jelle is currently offline victoor.jelle
Messages: 4
Registered: December 2010
Junior Member
Hey,

i just started using git and I'm getting along with the command line tool. I want to be able to work out of my ide so i installed EGit.
I have 2 problems, I don't see any way to commit to svn, only my git repo. I looked in the documentation, but did not find anything to do a dcommit.

The 2nd problem is the support for subprojects and the .gitignore file. Every time I do a synchronize inside eclipse, it seems to totally ignore my .gitignore file.
I started out with using .git/info/exclude but then I read that EGit doesn't use that file. My .gitignore file contains this:
target/
.project
.classpath
.settings/
.springBeans
.gitignore/target

I want to define my .git ignore in my parent project and let my subprojects use that. Is that possible?
Re: Using Egit on svn repo [message #646606 is a reply to message #644808] Wed, 29 December 2010 01:28 Go to previous messageGo to next message
victoor.jelle is currently offline victoor.jelle
Messages: 4
Registered: December 2010
Junior Member
No one is using this feature of is wanting to use it?
Re: Using Egit on svn repo [message #661419 is a reply to message #646606] Thu, 24 March 2011 11:25 Go to previous messageGo to next message
Jack Gold is currently offline Jack Gold
Messages: 5
Registered: July 2010
Junior Member
I completely disagree. A lot of people are wanting the feature, but nobody is willing to step up and do the work to create it. Since git-svn is included in the git releases, it seems strange that you can say you fully support git without supporting git-svn. I realize it's a separate application, but as many other posters have said in the past, it is easier to transition to git from svn with the git-svn application. In addition, many development houses have large legacy code repositories in svn that they are not just going to migrate over to git. Those people would be very happy to see EGit support the git-svn application.
Re: Using Egit on svn repo [message #661493 is a reply to message #644808] Thu, 24 March 2011 18:37 Go to previous messageGo to next message
Manuel Doninger is currently offline Manuel Doninger
Messages: 119
Registered: October 2010
Senior Member
Well, as you said, nobody is willing to step up and do the work. The core committers have enough to do with the implementation of the most used git commands (there are still some commands missing in EGit and JGit, like stash), so contributors are always welcome.
Re: Using Egit on svn repo [message #689903 is a reply to message #661493] Tue, 28 June 2011 11:08 Go to previous messageGo to next message
R Shapiro is currently offline R Shapiro
Messages: 386
Registered: June 2011
Senior Member
I use egit on an Git/SVN bridge and as a workaround I found it fairly effective to to handle the standard operations with external launchers, which I commit as part of the project. Not ideal but works well enough for the standard operations: svn dcommit, svn fetch, svn rebase, diffs and logs of various kinds (eg log --stat ^master remotes/trunk to see changes fetched from svn but not yet applied), etc

Of course you need an external installation of real git to do this. But then you must have one of those already. For portability I would recommend using a Run/Debug String Substitution for the git executable, rather than wiring in a particular path.
Re: Using Egit on svn repo [message #749374 is a reply to message #689903] Tue, 25 October 2011 03:19 Go to previous messageGo to next message
Tal Weiss is currently offline Tal Weiss
Messages: 4
Registered: October 2011
Junior Member
R Shapiro -
Sounds great!
Could you please elaborate? Can you share the exact run configurations?
This sounds like it could be very useful (at least until EGIT add the SVN functionality...).

Thanks in advance!

Tal.
Re: Using Egit on svn repo [message #749880 is a reply to message #749374] Tue, 25 October 2011 09:49 Go to previous messageGo to next message
R Shapiro is currently offline R Shapiro
Messages: 386
Registered: June 2011
Senior Member
These are nothing very special, just simple external tool launchers that run command-line git. Here's a detailed example

Main section:

Location: ${git_exec}
Working directory: ${git_work_tree}
Arguments: svn fetch

I have a whole set of these checked in as part of the repository (see the Shared File option in the Common section). Most are for git svn operations: 'svn fetch' , 'svn dcommit', 'svn rebase' etc. Others are for other operations not yet supported by egit, for example 'stash', or for operations that are more efficiently done with command-line Git, for example 'log --stat ${git_branch} ^trunk'

The variables git_work_tree and git_branch are part of egit. On the other hand git_exec is my own String Substitution variable whose value is the location of the Git executable. I use a String Substitution variable rather than absolute path for the executable so that I can share these launchers with other team members who have Git installed in another location. For instance mine is defined as /usr/local/git/bin/git while other team members want C:\something\git
Re: Using Egit on svn repo [message #753343 is a reply to message #749880] Tue, 25 October 2011 16:40 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin Rosenberg
Messages: 317
Registered: July 2009
Senior Member
R Shapiro skrev 2011-10-25 15.49:
> These are nothing very special, just simple external tool launchers that run command-line git. Here's a detailed example
>
> Main section:
>
> Location: ${git_exec}
> Working directory: ${git_work_tree}
> Arguments: svn fetch
>
> I have a whole set of these checked in as part of the repository (see the Shared File option in the Common section). Most are for git svn operations: 'svn fetch' , 'svn
> dcommit', 'svn rebase' etc. Others are for other operations not yet supported by egit, for example 'stash', or for operations that are more efficiently done with
> command-line Git, for example 'log --stat ${git_branch} ^trunk'
>
> The variables git_work_tree and git_branch are part of egit. On the other hand git_exec is my own String Substitution variable whose value is the location of the Git
> executable. I use a String Substitution variable rather than absolute path for the executable so that I can share these launchers with other team members who have Git
> installed in another location. For instance mine is defined as /usr/local/git/bin/git while other team members want C:\something\git

Glad you found them. I added these variables for exactly these kind of things,
although it turns out I use them mostly for accessing a converted objects from
a Clearcase view :(

The full set of variables are:
git_branch
git_dir
git_work_tree
git_repo_relative_path

The last one is the variable that allows me to map to other tools. By default they relate
to the currently selected resource. Optionally you can add an explicit resource name after the
colon: e.g. ${git_dir:MyProject}

Adding git_exec might be an idea, since EGit actually tries to figure out where there is a command
line version. EGit wants to know since there is a system-level gitconfig file, that contains
important settings, especially on Windows. git_prefix might be a more appropriate name, and you'd then
use ${git_prefix}/bin/git for the command line.

-- robin
Re: Using Egit on svn repo [message #753510 is a reply to message #753343] Thu, 27 October 2011 10:17 Go to previous message
R Shapiro is currently offline R Shapiro
Messages: 386
Registered: June 2011
Senior Member
These variables are very handy. Somewhere I found this documentation, I forget where:

git_branch: Current HEAD in the Git repository that contains the selected or referenced resource.
git_dir: The path to the .git directory for the selected or named resource.
git_repo_relative_path: Path of the selected or named resource relative to the Git repository.
git_work_tree: Work tree root of the Git repository for the selected or referenced resource.

I like that they're based on the selected resource as I often have working directories from more than one repository in a single workspace.

Re: git_prefix, I agree that's better than git_exec, and it would be nice if this were part of egit, particularly if it's already looking for a command-line git on the PATH.
Maybe you can announce here if/when the nightly build of egit includes git_prefix.
Previous Topic:forum becoming unusable
Next Topic:Synchronize view hangs
Goto Forum:
  


Current Time: Tue Jul 29 00:46:57 EDT 2014

Powered by FUDForum. Page generated in 0.01842 seconds