1

Today i have encountered a weird problem when "dcommitting" my master HEAD to google code svn repository. Below an extract of what I did. I'd almost say that I do have uuid clash but i consider that to be unlikely. I'm getting more and more experienced with git but sometimes i'm still puzzled...

Some changes in my presentation branch...

jerry [~/dev/myproject]$git checkout master
Switched to branch 'master'
jerry [~/dev/myproject]$git merge presentation
Updating c5e5816..f5a376c
Fast-forward
 js/iPath.js        |    5 +----
 presentation/paper.html |    6 ++++--
 2 files changed, 5 insertions(+), 6 deletions(-)

Changes are now in master

jerry [~/dev/myproject]$git status
# On branch master
# Untracked files:
#   presentation/.#paper.html
nothing added to commit but untracked files present (use "git add" to track)

Now I'm dcommitting to svn.

jerry [~/dev/myproject]$git svn fetch
jerry [~/dev/myproject]$git svn dcommit
Committing to https://myproject.googlecode.com/svn/trunk ...
No changes
8e67cdc7e8bad816e402c1b9c72b5e84c492e907~1 == 8e67cdc7e8bad816e402c1b9c72b5e84c492e907
No changes between current HEAD and refs/remotes/trunk
Resetting to the latest refs/remotes/trunk
Unstaged changes after reset:
M   js/iPath.js
M   presentation/paper.html
Unable to extract revision information  from commit f5a376ca4a10a4807abbbea131b94b828ee88269~1

svn trunk is unmodified and my latest checkin (merge from presentation) is unstaged:

jerry [~/dev/project]$git status
# On branch master
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   js/iPath.js
#   modified:   presentation/paper.html
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   presentation/.#paper.html

Last commit is also removed from git log. What is going on?

1
  • git svn rebase did do some magic. Commented Aug 24, 2011 at 13:38

1 Answer 1

2

you cannot dcommit "git-merges", because subversion does not have the same concept of merges as git (and any other dvcs: parent tracking) has. recent versions try to emulate it with svn:merge-info property, but it's not the same.

if you want to dcommit your dev branch changes to subversion, you have to rebase them first on master:

git rebase master dev

then you should be able to dcommit.

Sign up to request clarification or add additional context in comments.

1 Comment

I learned this the hard way as well. As good a job as git-svn does at insulating you from dealing with svn-isms, it can't do everything. I found that using rebase is the more compatible choice when dealing with a subversion back-end. There are a few question/answers on stackoverflow that I found particularly helpful. I'll add links to those.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.