* git svn dcommit errors all no-yet-commited changes are left squashed/uncommited?
@ 2011-04-11 14:32 Piotr Krukowiecki
0 siblings, 0 replies; only message in thread
From: Piotr Krukowiecki @ 2011-04-11 14:32 UTC (permalink / raw)
To: Git Mailing List
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-04-11 14:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-11 14:32 git svn dcommit errors all no-yet-commited changes are left squashed/uncommited? Piotr Krukowiecki
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).