I resynchronized the fetch and bare repositories to the main svn
repository.

On my local platform I checked out a different branch and then checked
out the test branch to ensure that I got the correct files. I made
sure to do a

git pull --rebase --all

The files were then fully synchronized. I then made a change in an svn
working directory to file README.txt and checked it in to the svn
repository. I *did not* update the fetching git repository as I wanted
to test what would happen if someone updated via git and git svn in
between runs of the cron job.

svn ci -m "svn change to README.txt"

I then made a different change (in a nonconflicting area of the file)
to README.txt

git commit -a -m "git change to README.txt"

After the git commit, git status shows that my local is ahead of the
origin by 1 commit.

Both changes added a comment line to the file.

git update-ref refs/remotes/testbranch refs/remotes/origin/testbranch
git svn dcommit --verbose

Committing to https://svnrepo/MyProject/branches/testbranch ...
Merge conflict during commit: File or directory 'README.txt' is out of
date: try updating: The version resource does not correspond to the
resource within the transaction. Either the requested version resource
is out of date (needs to be updated), or the requested version
resource is newer than the transaction root (restart the commit). at /
usr/local/libexec/git-core/git-svn line 574

Note this is running git version 1.7.3.4 which was compiled and
installed by hand  on Ubuntu 10.04 which installs version 1.7.0.4 via
apt-get

On the git server, in the fetching repository

git svn rebase --all
git push origin --mirror


On the local platform

git pull --rebase --all

Fetching origin

Unpacking objects: ...
>From git-server:/opt/git/MyProject
 .....

warning: refname 'testbranch' is ambiguous.
First: rewinding head ...
Applying: Check in git change
Using index info to reconstruct a base tree...
Falling back to patching and 3-way merge...
Auto-merging README.txt
CONFLICT (content): Merge conflict in README.txt
Failed to merge in the changes.
Patch failed at 0001 Check in git change

When you have resolved this conflict ...

I ran "git mergetool" and it automatically resolved the conflict by
accepting the two lines that had been entered. I then ran "git rebase
--continue" and the pull rebase finished successfully.

I then deleted README.txt.orig which was a nontracked file found by
"git status"

git update-ref ...
git svn dcommit --verbose

completed successfully and is now visible via "svn up" in the svn
workspace.

Apparently, "git svn dcommit" must be set up to trigger a rebase in
the fetch directory with a 'push --mirror' from the fetch repo to bare
repo. Otherwise, this problem could happen whenever we are attempting
to dcommit to the svn repo.


--
       Sabba     -          סבא הלל        -     Hillel
Hillel (Sabba) Markowitz | Said the fox to the fish, "Join me ashore"
 sabbahil...@gmail.com | The fish are the Jews, Torah is our water
http://sabbahillel.blogspot.com

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to