git svn dcommit errors all no-yet-commited changes are left squashed/uncommited?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I've done some changes to "local" trunk, dcomitted them to svn server,
then cherry-picked those changes to "local" branch and tried to
dcommit them to svn.
Several changes where successfully dcommited, but then I got an error.

Two problems:
1. after the error I'm left with changes not sent to svn server as
unstaged changes
2. git-svn errors if someone commits something to svn during my commit
even if there is no conflict

Even if the second problem is intentional (which I'm not sure is a
good idea), the first problem means it's not possible to continue
after the error (which is not really an error but should be a warning,
even if it stops the dcommit).


Full story:

The log looked like this:

[... this is the end of older commit, which succeeded ...]
W: -empty_dir: cptests/branches/a_branch/src/file
r23939 = 400e84221ca15be3976ba4dcd6d7a2eb1464b00e (refs/remotes/a_branch)
No changes between current HEAD and refs/remotes/a_branch
Resetting to the latest refs/remotes/a_branch
Unstaged changes after reset:
M	src/file
[... next commit preparation and commit ...]
	R	src/file
Committed r23941
	M	etc/file.xml
r23940 = 420c7b2c8f155563a4f4c8e5421857846bf3ebe5 (refs/remotes/a_branch)
	D	src/file
[...]
r23941 = 010c5b3883c473dd236de1a146fad1e90bd323fd (refs/remotes/a_branch)
W: bfb909cb21e26930364331660460ccd7be355a2e and refs/remotes/a_branch
differ, using rebase:
:040000 040000 5df0982b1cf277dd7d915d32a9ff145554fb9c94
a662095f06bd349c1a458d52697561ba9d005bac M	etc
Cannot rebase: You have unstaged changes.
Please commit or stash them.
rebase refs/remotes/a_branch: command returned error: 1

Now I was left with all the remaining changes "squashed" - git status
showed a list of unstaged changes. So all changes not yet commited
were in fact lost as commits and left in the working tree as one bit
not-yet-added change.

I believe the reason for this was that while I was dcommiting my
changes someone changed the "etc/file.xml"

So my previous dcommit was r23939 (src/*). Then someone else checked
into svn r23940 (etc/file.xml). Then (or earlier) git svn dcommited
r23941 (src/*). After that dcommit stopped with error.


In this case I have just reset --hard and cherry-picked changes that
were not commited, and it worked this time, but I wonder what should I
do next time.
What if those are not cherry-picked changes, but normal changes? Will
I have to use reflog to get back in time?

Also, I think in this case svn might continue with dcommit. It already
commited one revision after the other-person commit. The other commit
changed a completely different directory.

Even if this is left as error, it should be possible to continue
dcommit in an easy way. Not-commited changes should not be deleted and
left as unstaged changes.

Also, the "you have unstaged changes" error is not very helpful. I
thought it meant it commited a change partially, or maybe some other
weird thing happened.


Thanks,

-- 
Piotr Krukowiecki
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]