From: Piotr Krukowiecki <piotr.krukowiecki@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: git svn dcommit errors all no-yet-commited changes are left squashed/uncommited?
Date: Mon, 11 Apr 2011 16:32:55 +0200 [thread overview]
Message-ID: <BANLkTim9KwBSjmZO0G7BHM=q7Jdy9=K=4w@mail.gmail.com> (raw)
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
reply other threads:[~2011-04-11 14:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='BANLkTim9KwBSjmZO0G7BHM=q7Jdy9=K=4w@mail.gmail.com' \
--to=piotr.krukowiecki@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).