threads / discuss / 13529

git-svn condenses history when dcommit is interrupted

Subject: git-svn condenses history when dcommit is interrupted

## tl;dr

2 messages between May 15, 2008 and May 17, 2008.

replies: 1people: 2as markdown or json

João Abecasis· May 15, 2008, 09:06 UTC · lore
Hi,

I hope this is the right list for reporting git-svn issues, if it isn't, please direct me to a more appropriate place. Thanks!

When a git-svn dcommit is interrupted after a commit is submitted to the subversion server, but before the local history is reconciled, that commit is lost from the history. Instead, changes are condensed into the next commit git-svn sees on the server.

Given my current flakey internet connection, unfortunately, I've been given the chance to see this happen a couple of times, already. Some output I gathered the last time this occured can be found below. In case it matters, this was on Mac OS X 10.5.2.

[ The versions ]
$ git --version
git version 1.5.5
$ svn --version
svn, version 1.4.4 (r25188)
   compiled Nov 25 2007, 08:20:33

Copyright (C) 2000-2006 CollabNet. Subversion is open source software, see http://subversion.tigris.org/ This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:
* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

[ The issue: I had 2 pending commits on my tree. Something happens halfway through the first commit, after it has been registered with the server ]

$ git svn dcommit
Committing to https://svn.cct.lsu.edu/repos/saga/trunk ...
	M	external/boost/plugin/boost/plugin/config.hpp
Committed r1731
	M	external/boost/plugin/boost/plugin/config.hpp
RA layer request failed: PROPFIND request failed on '/repos/saga':
PROPFIND of '/repos/saga': SSL negotiation failed: Secure connection
truncated (https://svn.cct.lsu.edu) at /usr/local/git/bin/git-svn line
2475

$ git svn dcommit Committing to https://svn.cct.lsu.edu/repos/saga/trunk ... Merge conflict during commit: Your file or directory 'external/boost/plugin/boost/plugin/config.hpp' is probably out-of-date: 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/git/bin/git-svn line 453

$ git svn fetch
W: Ignoring error from SVN, path probably does not exist: (175002): RA
layer request failed: PROPFIND request failed on '/repos/saga':
PROPFIND of '/repos/saga': Could not read status line: SSL error:
sslv3 alert bad record mac (https://svn.cct.lsu.edu)
W: Do not be alarmed at the above message git-svn is just searching
aggressively for old history.
This may take a while on large repositories
Path '' was probably deleted:
RA layer request failed: PROPFIND request failed on '/repos/saga':
PROPFIND of '/repos/saga': Could not read status line: SSL error:
sslv3 alert bad record mac (https://svn.cct.lsu.edu)
Will attempt to follow revisions r1730 .. r1731 committed before the deletion
r1730 .. r1730 OK
$ git svn fetch
$

[ At this point, git-svn wouldn't commit the second patch, nor would it fetch the one it had committed earlier. I resorted to committing the second patch using plain svn. After that... ]

$ git svn fetch
Index mismatch: 0948c9dd98f0b0578aa151c5a074a89268ae5470 !=
c22e958474fbfe55c807068cd230b550a23cab3c
rereading 0b7d73659df689e9baf585e117e6fec7d6b2c81e
	M	external/boost/plugin/boost/plugin/config.hpp
	M	bindings/saga/C/engine/saga_c_export_declarations.h
r1732 = dabf31cc720d31b75f6070490156a8165ec6c3b4 (trunk)
$

[ r1732 was actually a change to saga_c_export_declarations.h alone, but now it shows up merged with r1731 :-/ ]

Is there any further info I can provide that could help?

Did I do something wrong? Are there any steps I can take after dcommit breaks to avoid this issue? The last time this happened, I ended up cloning the svn repository afresh and have a backup available, but would rather find a better way to fix this.

Any help appreciated. Thanks!
João
Imran M Yousuf· May 17, 2008, 04:35 UTC · lore

Re: git-svn condenses history when dcommit is interrupted

>> Whenever my commit is not completed successfully I can thus easily
>> reset, rebase and follow the command sequence again. This way I have
I forgot to mention 'git svn fetch' if the commit succeeds and the update fails
> But that doesn't help with the problem I have faced, which is when
> dcommit fails *after* some change has already been committed to the
> subversion repository. At that point, the local copy of the subversion
Did you try 'git svn fetch' at this point
Show 7 quoted lines
> history is broken since git thinks it has got the fetched the
> committed revision but it's not in the history.
> ....
> I think this is a bug with git-svn that should be fixed and I will
> gladly help fix it in any way I can. Do you think I should be more
> explicit and focus on the broken history instead of the "condensed
> merges"?

It could be a bug but I am not sure, what I am sure of is that I faced a *similar* (not sure identical) problem and 'git reset' and 'git svn fetch' followed by rebase, merge and dcommit was successful in my case.

Best regards,
-- 
Imran M Yousuf
Email: imran@smartitengineering.com
Mobile: +880-1711402557

← back to recent threads