You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported by Christopher Tate <ctate@google.com> on Fri Apr 10 11:29:10 PDT 2009
Source: JIRA REPO-22
Here's the situation I was in that I had to recover from:
0. I was working in a topic branch called "oldbranch", and in one package I
had made some edits that had not yet been committed.
1. From the top level, I typed "repo start newbranch"
2. The branch was successfully started and made current in fifty-ish packages,
but then when it got to the package in which I had uncommitted edits, branch
creation failed and repo errored out.
At this point, the repo was in a badly mixed state: newbranch had been
created and made current in half the repository, but oldbranch was still
current in the other half. The desired final state here was that newbranch be
created and made current in the entire repo. Here's what I did to recover:
3. cd to the package in which I had uncommitted edits, "git commit -a" to
commit them.
4. cd back to the top of the repo, and reran "repo start newbranch". This
errored out immediately, saying that the branch already existed.
5. I typed "repo abandon newbranch" to blow away the new branch in all the
packages in which it had been successfully created
6. I then typed "repo start newbranch" again, which finally set up the new
branch everywhere.
IMHO the biggest problem here was that Step 4 failed; I don't see why it
should be an error to attempt to (create and make current) a branch that
happens to already exist in some packages. At worst this might be a noop,
right? And the rest of the time, it would do exactly what I was attempting:
taking a partial-branch-existence state and making it more universal.
Original issue reported on code.google.com by code-rev...@gtempaccount.com on 24 Sep 2009 at 9:10
The text was updated successfully, but these errors were encountered:
Comment by Shawn Pearce <sop@google.com> on Fri Apr 10 11:34:18 PDT 2009
Actually, two things should be fixed:
- #1 should have errored out if the switch wouldn't go cleanly anyway in at
least one project. This mirrors with behavior in "git checkout -b".
- As you state, #4 shouldn't have errored out.
Fixing #4 is easier than #1.
Original comment by code-rev...@gtempaccount.com on 24 Sep 2009 at 9:10
Original issue reported on code.google.com by
code-rev...@gtempaccount.com
on 24 Sep 2009 at 9:10The text was updated successfully, but these errors were encountered: