public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: David Watson <dwatson@mimvista•com>
To: Johannes Schindelin <Johannes.Schindelin@gmx•de>,
	Eric Wong <normalperson@yhbt•net>,
	git@vger•kernel.org
Subject: [PATCH] Test for git-svn dcommit clobbering changes
Date: Fri, 31 Aug 2007 20:25:01 -0400	[thread overview]
Message-ID: <20070901002501.GA11591@mimvista.com> (raw)
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:
> 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

  reply	other threads:[~2007-09-01  0:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-31 21:04 git svn dcommit not checking if up-to-date? Johannes Schindelin
2007-08-31 21:46 ` David Watson
2007-08-31 22:18 ` Eric Wong
2007-08-31 23:17   ` Johannes Schindelin
2007-08-31 23:48     ` David Watson
2007-09-01  0:25       ` David Watson [this message]
2007-09-01  1:16         ` [PATCH] git-svn: fix dcommit clobbering upstream when committing multiple changes Eric Wong
2007-09-01  1:32           ` Johannes Schindelin
2007-09-01  5:43           ` Karl Hasselström
2007-09-01  9:33             ` Eric Wong
2007-09-01 10:24               ` Karl Hasselström

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070901002501.GA11591@mimvista.com \
    --to=dwatson@mimvista$(echo .)com \
    --cc=Johannes.Schindelin@gmx$(echo .)de \
    --cc=git@vger$(echo .)kernel.org \
    --cc=normalperson@yhbt$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox