Guest?
 
  • Showing issue #? of ? found
Back to Search
Project
SubGit
Priority
Show-stopper
Type
Bug
State
Fixed
Assignee
Dmitry Pavlenko
Subsystem
Translator Core
Affected versions
Miai EAP5 (build 1096)
Fix versions
1.0.0 (build 1696), Miai EAP6 (build 1381)
Fixed in build
No Fixed in build
  • Created by   JDM Software
    13 months ago (18 Apr 2012 00:43)
  • Updated by   Semyon Vadishev
    13 months ago (20 Apr 2012 15:11)
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
You don't have permissions to view 1 more attachment to this issue
Because the translation from svn:externals to git submodules is a work in progress, I added a git submodule myself to represent the svn external. But when this is pushed, subgit errors out with the following error:

[error]
    file = E:/SVNRepos/main/subgit/subgit-sync-20120418-001747.zip
    date = Wednesday, April 18, 2012 12:17:47 AM CEST
    description = Cannot parse tree b5d195931bf2cf42d19ffb6ffdc81e0fb16270fc\n\
Missing tree b5d195931bf2cf42d19ffb6ffdc81e0fb16270fc\n\

    git = true
    svn = false

The b5d195931bf2cf42d19ffb6ffdc81e0fb16270fc hash is the git tree link to the submodule.
Non of the git commits are then synced to the svn repository anymore after this commit.
Comments (7)
 
History
 
Linked Issues (?)
 
Semyon Vadishev
  Semyon Vadishev
18 Apr 2012 17:59
13 months ago
Hello,

Thank you for reporting this issue.

Apparently, SubGit tries to find the object which is missing in the local Git repository. We have already fixed this problem and will prepare an interim build with the fix soon.
JDM Software
  JDM Software
19 Apr 2012 11:04
13 months ago
Thanks very much! I'll try it out as soon as it appears. And thanks for this great product!
Semyon Vadishev
  Semyon Vadishev
19 Apr 2012 17:03
13 months ago
We have prepared an interim build with the fix I mentioned. Please download it from http://subgit.com/interim/

Note that in this build we don't ignore .gitmodules file added by `git submodule add $URL foo` command. When you add this file into Git repository, it appears in SVN repository as well. Most probably we will fix that, so SubGit'd ignore such files.
JDM Software
  JDM Software
20 Apr 2012 00:02
13 months ago
I can confirm that it is fixed! And that indeed a .gitmodules file exist in the svn repo, which is not so bad :) Thanks again!
Semyon Vadishev
  Semyon Vadishev
20 Apr 2012 08:32
13 months ago
So, I mark this issue as fixed. SubGit build #1270, SGK trunk@2864.

Regarding .gitmodules file — there is a chance that svn user modifies this file, then on git side a lot of problem appear, since properly registered submodule gets deleted. In that case git exits with error, something like "No submodule mapping found in .gitmodules for path 'path/to/submodule'"

Another point is that in SubGit 2.0 we're going to introduce externals support, and we mostly figured out how to convert git submodules into svn:externals and vice versa. Keeping .gitmodules file in svn may cause certain problems with the mechanism we're going to support.

Thank you for the great feedback.
Related Changes
Resolved Date
13 months ago (20 Apr 2012 08:32)
State
OpenFixed
guest
  guest
20 Apr 2012 14:03
13 months ago
Ok I understand.
In what version did you plan to have the .gitmodules file ignored by SVN?

And just out of curiosity, how were you planning to implement the externals <-> submodule conversion anyway? Because it might not be possible to convert the e extern svn repository by subgit, and visa versa...
Semyon Vadishev
  Semyon Vadishev
20 Apr 2012 15:11
13 months ago
Regarding .gitmodules file — we're working on this right now, next week we're going to publish EAP build with this modification.

Regarding .gitmodules <=> svn:externals conversion — extremely rough overview:

Assuming repositories A & B,

A:
/trunk/
/trunk/a/file.txt
/branches/
/tags

B:
/trunk/
/trunk/b/file.txt
/branches/
/tags

There is a case when SubGit will automatically convert svn:externals into git submodules and vice versa:

  • SubGit is installed into B and A's SubGit installation has necessary credentials for read-only access to B;
  • Externals of A refer to a certain branch of project B:

svn propset svn:externals "b -rN $B/trunk" on some directory at A will result into addition of git submodule corresponding to commit mapped as "rN $B/trunk" at B.

When SubGit is not installed into B or externals refer to some file or subdirectory of any branch in A, e.g.:

svn propset svn:externals "b -rN $B/trunk/b"
svn propset svn:externals "b/file.txt -rN $B/trunk/b/file.txt"

SubGit will generate a special file '.gitsvnextmodules' with all the information necessary to get corresponding files from svn, most probably these files will be ignored after the conversion.

The only client nowadays which supports this .gitsvnextmodules file is SmartGit, made by Syntevo company. So, if one clones a repository with such file using SmartGit, it will automatically clone Git repository from remote Subversion server.

Note that it's a very early draft of what we're going to implement, resp. some parts may change later.
Apply Command

Command Preview: