[Bioc-devel] Problem with the git mirror when committing to SVN

Jesper Gådin jesper.gadin at gmail.com
Tue Sep 29 18:03:03 CEST 2015


Hi Diego,

You were right, my previous example I sent before stopped working for me as
well, and I were thrown back in the git svn rebase conflict loop again.

I have just tried another solution, based on the idea that the local master
and the local devel branch got separated early in the bioc mirror git-svn
setup process (unclear how). And while rebasing actually works temporarily
within the devel branch, why not rebase the local master branch on top of
the local devel branch.

I tried these commands to explore if rebasing master on top of devel is the
way to go.

#first make sure that the devel branch is same as bioc/master
git reset --hard bioc/master

#checkout master
git checkout master

#pull the most recent changes from origin/master (github)
git pull

#rebase on top of devel
git rebase devel

#resolve all rebase cycles as before
-- 

#delete github repo
git push origin :master

#push the new rebased m
git push origin master

#go back to devel and see if we can do the rebase pain free
git checkout devel
git svn rebase

#Yes! at least for me it worked so now merge the changes in master
git merge master --log

#double commit (dcommit), the changes to svn.
 git svn dcommit --add-author-from

#while on devel branch check status in respect to bioc/master
git status
git pull
git status

#merge back into master
git checkout master
git merge devel --log

#see that there is no difference  (I see no difference)
git diff master..devel

#push commits to origin/master
git pull
git push

#From here it should be fine to continue. But no.. merging in the changes
to devel from master makes the cirkus go around again as soon as we execute
git svn dcommit --add-author-from.
git checkout devel
git svn rebase
git merge master --log
git svn dcommit --add-author-from

Committing to
https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/AllelicImbalance
...
M DESCRIPTION

ERROR from SVN:
Item is out of date: Item
'/trunk/madman/Rpacks/AllelicImbalance/DESCRIPTION' is out of date
No changes between eb7638df719ac9d97802ecf4f67bf9d0e3309bf1 and
refs/remotes/git-svn-devel
Resetting to the latest refs/remotes/git-svn-devel
ERROR: Not all changes have been committed into SVN, however the committed
ones (if any) seem to be successfully integrated into the working tree.
Please see the above messages for details.



Sad it did not work.. seemed so promising.. And it indeed gets worse every
time.


/Jesper

On Fri, Sep 18, 2015 at 10:39 AM, Diego Diez <diego10ruiz at gmail.com> wrote:

> Thanks Jesper for your reply.
>
> I am afraid however thats what I did before (see the details of my
> original message). The real problem is the file .Rbuildignore which
> causes a rebase that then finds the conflict in DESCRIPTION (and other
> files as I fix that one; I guess it is trying to go too far in the
> past). Whatever the reason is, it has happened to me several times now
> and it gets worse as the number of cycles of git rebase
> --continue/--skip increases. Last time it lead to me missing correctly
> editing one of the files which broke my package in svn.
>
> Diego
>
> On Fri, Sep 18, 2015 at 5:13 PM, Jesper Gådin <jesper.gadin at gmail.com>
> wrote:
> > Hi Diego,
> >
> > I had the same problem some days ago. Can't tell if this is the right
> way to
> > solve the problem, but it worked, and this is what I did,
> > 1) modified the file under conflict, in your case DESCRIPTION.
> > 2) git rebase --continue
> > 3) git rebase --skip
> >
> > #This is the selected output from my bash history
> >  2192  git checkout devel
> >  2193  git svn rebase
> >  2194  git merge
> >  2195  git merge master --log
> >  2196  git svn dcommit --add-author-from
> >  2197  ls
> >  2198  git status
> >  2199  vim DESCRIPTION
> >  2200  git status
> >  2201  git add DESCRIPTION
> >  2202  git status
> >  2203  git commit -m"DESCRIPTION conflict change"
> >  2204  git status
> >  2205  git rebase --continue
> >  2206  git rebase --skip
> >  2207  git status
> >  2208  vim inst/CITATION
> >  2209  git status
> >  2210  vim DESCRIPTION
> >  2211  git status
> >  2212  git add *
> >  2213  git status
> >  2214  git rebase --continue
> >  2215  git rebase --skip
> >  2216  git status
> >  2217  git svn dcommit --add-author-from
> >  2218  git status
> >
> > /Jesper
> >
> > On Fri, Sep 18, 2015 at 9:46 AM, Diego Diez <diego10ruiz at gmail.com>
> wrote:
> >>
> >> Dear all,
> >>
> >> I am now having a similar issue (see bellow) with my other package
> >> rTRM and so would like to bring the attention to this thread again.
> >> Anyone using git mirrors experiencing something similar and/or knowing
> >> how to fix it? Thank you very much in advance.
> >>
> >> Best,
> >> Diego
> >>
> >> On Tue, Sep 8, 2015 at 3:08 PM, Diego Diez <diego10ruiz at gmail.com>
> wrote:
> >> > Dear all,
> >> >
> >> > I am having some problem with the git mirror and I would appreciate
> >> > some light into how could it be solved.
> >> >
> >> > I have forked my package "codelink" in github and work on a local copy
> >> > in my computer. I used the information in
> >> > http://www.bioconductor.org/developers/how-to/git-mirrors/ to set up
> >> > the remotes, currently (output of git remote -v):
> >> >
> >> > bioc https://github.com/Bioconductor-mirror/codelink.git (fetch)
> >> > bioc https://github.com/Bioconductor-mirror/codelink.git (push)
> >> > origin https://github.com/ddiez/codelink (fetch)
> >> > origin https://github.com/ddiez/codelink (push)
> >> >
> >> > Usually I follow this workflow:
> >> >
> >> > 1. Work on local/master.
> >> > 2. Push to origin/master when satisfied.
> >> > (Submit to SVN when ready)
> >> > 3. Checkout local/devel
> >> > 4. Update any changes in SVN (git svn rebase)
> >> > 5. Merge local/master
> >> > 6. Commit to SVN (git svn dcommit)
> >> > 7. Merge changes in devel (SVN commit) back to master (git checkout
> >> > master; git merge devel)
> >> >
> >> > Recently I have found an error during "git svn dcommit" then git tries
> >> > to do a rebase. Then is when some sort of nightmare begins where older
> >> > versions of files that I changed before begin to pop up. I go through
> >> > several cycles of git rebase --continue or --skip where I need to fix
> >> > the different conflicts. This process has messed up my recent commit
> >> > log. Anyway, on trying to learn from this I can confirm that if
> >> > instead of committing the changes through git I checkout a clean SVN
> >> > copy, move the altered files there and commit no error shows. Then the
> >> > mirror will synchronize and I can update master from devel and I am
> >> > all done. But this is of course not optimal. I have tried now to
> >> > submit changes to two files (NEWS and DESCRIPTION) and got the same
> >> > problem (show the error message below-- seems to be related to
> >> > .Rbuildignore already in SVN- after this I did git rebase --abort). My
> >> > questions:
> >> >
> >> > How can I fix this without going through the fruitless git rebase
> >> > --continue/--skip as I did before?
> >> >
> >> > Why this happened and how can I prevent it to happen again?
> >> >
> >> > Thank you very much for any help.
> >> >
> >> > Diego
> >> >
> >> > $ git svn dcommit --add-author-from
> >> > Committing to
> >> > https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/codelink
> >> > ...
> >> >
> >> > ERROR from SVN:
> >> > RA layer file already exists: File '.Rbuildignore' already exists
> >> > W: de6ada9e216e1e0f0829855b4c22b533131cd162 and
> >> > refs/remotes/git-svn-devel differ, using rebase:
> >> > :100644 100644 2ea5d2ac8a7f79a4133b1151c399f8900cf0f0fd
> >> > 47b488122aa8a9f9bc71d6e31f87809afce6131d M DESCRIPTION
> >> > :040000 040000 899c7951d0d3e88ee0b73f54506a6f85ea710e92
> >> > 50f453b70afb84a5fac5d01875c70652352f368f M inst
> >> > First, rewinding head to replay your work on top of it...
> >> > Applying: Added project files.
> >> > Using index info to reconstruct a base tree...
> >> > Falling back to patching base and 3-way merge...
> >> > No changes -- Patch already applied.
> >> > Applying: - added URL and BugReports information.
> >> > Using index info to reconstruct a base tree...
> >> > M DESCRIPTION
> >> > <stdin>:11: trailing whitespace.
> >> > BugReports: https://github.com/ddiez/codelink/issues
> >> > warning: 1 line adds whitespace errors.
> >> > Falling back to patching base and 3-way merge...
> >> > Auto-merging DESCRIPTION
> >> > CONFLICT (content): Merge conflict in DESCRIPTION
> >> > Failed to merge in the changes.
> >> > Patch failed at 0002 - added URL and BugReports information.
> >> > The copy of the patch that failed is found in:
> >> >    /Users/diez/projects/R/codelink/codelink/.git/rebase-apply/patch
> >> >
> >> > When you have resolved this problem, run "git rebase --continue".
> >> > If you prefer to skip this patch, run "git rebase --skip" instead.
> >> > To check out the original branch and stop rebasing, run "git rebase
> >> > --abort".
> >> >
> >> > rebase refs/remotes/git-svn-devel: command returned error: 1
> >>
> >> _______________________________________________
> >> Bioc-devel at r-project.org mailing list
> >> https://stat.ethz.ch/mailman/listinfo/bioc-devel
> >
> >
>

	[[alternative HTML version deleted]]



More information about the Bioc-devel mailing list