git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Test for git-svn dcommit clobbering changes

From
DWDavid Watson <dwatson@mimvista.com>
Date
Sep 1, 2007, 00:25 UTC
Message-ID
<20070901002501.GA11591@mimvista.com>
In-Reply-To
<20070831234854.GA6451@mimvista.com>

If you make multiple commits, and a commit other than the first applies to the same file as a new change in the SVN repository, git-svn will blow away the other commit's changes.

---
On Fri, Aug 31, 2007 at 07:48:55PM -0400, David Watson wrote:
Show 14 quoted lines
> I just reproduced this one in a live repository. Here's what you do:
> 
> $ git checkout -b breakme trunk
> $ vi file1.txt
> $ git-commit -a -m 'first change'
> $ vi file2.txt
> $ git-commit -a -m 'second change'
> ..... Full moon, become a werewolf ......
> C:\svnrepo> edit file2.txt
> C:\svnrepo> svn commit -m 'this will be gone'
> ..... Become yourself again ....
> $ git svn fetch --all # (not sure if this is necessary)
> $ git svn dcommit
> $ git log -p
 t/t9106-git-svn-commit-diff-clobber.sh |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/t/t9106-git-svn-commit-diff-clobber.sh b/t/t9106-git-svn-commit-diff-clobber.sh
index 6f132f2..2706153 100755
--- a/t/t9106-git-svn-commit-diff-clobber.sh
+++ b/t/t9106-git-svn-commit-diff-clobber.sh
@@ -50,6 +50,9 @@ test_expect_failure 'dcommit fails to commit because of conflict' "
 	svn commit -m 'fourth line from svn' &&
 	cd .. &&
 	rm -rf t.svn &&
+	echo another file from git >> file2 &&
+	git add file2 &&
+	git commit -m 'another file here' &&
 	echo 'fourth line from git' >> file &&
 	git commit -a -m 'fourth line from git' &&
 	git-svn dcommit
-- 
1.5.3.rc4

Dave Watson
Previous: David WatsonNext: Eric Wong
Message 6 of 11 in “git svn dcommit not checking if up-to-date?”
  1. Johannes SchindelinAug 31, 2007
  2. David WatsonAug 31, 2007
  3. Eric WongAug 31, 2007
  4. Johannes SchindelinAug 31, 2007
  5. David WatsonAug 31, 2007
  6. Test for git-svn dcommit clobbering changesDavid Watson, Sep 1, 2007
  7. git-svn: fix dcommit clobbering upstream when committing multiple changesEric Wong, Sep 1, 2007
  8. Johannes SchindelinSep 1, 2007
  9. Karl HasselströmSep 1, 2007
  10. Eric WongSep 1, 2007
  11. Karl HasselströmSep 1, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.