[Insight-developers] can't push to gerrit

David Cole david.cole at kitware.com
Tue Mar 1 17:03:08 EST 2011


What is the output of running "ssh -v user at review.source.kitware.com"?

(Where "user" is your gerrit user name...)


On Tue, Mar 1, 2011 at 4:51 PM, Mark Roden <mmroden at gmail.com> wrote:

> Gotcha.
>
> OK, I've reset the master branch to origin/master with --hard, then
> switched to the new branch.
>
> git gerrit-push
> still produces
> ^Cfatal: Failed to run 'sh -c "git push gerrit
> HEAD:refs/for/master/$(git symbolic-ref HEAD | sed -e
> 's|^refs/heads/||')"' when expanding alias 'gerrit-push'
>
> when broken, and seems to freeze otherwise.
>
> On Tue, Mar 1, 2011 at 1:44 PM, David Cole <david.cole at kitware.com> wrote:
> > Does "git log -1" report the same commit on each branch?
> >
> > git checkout master
> > git log -1
> >
> > git checkout GDCMHiddenFunctionWarnings
> > git log -1
> >
> > If you do a "gitk" does "master" and "GDCMHiddenFunctionWarnings" point
> to
> > the same commit?
> >
> > If so, then you're safe.
> >
> > The "ahead by 1 commit" message means that you have (locally) one more
> > commit than the branch you're tracking. (master compared to
> "origin/master",
> > NOT master compared to your topic branch...)
> >
> >
> > HTH,
> > David
> >
> >
> > On Tue, Mar 1, 2011 at 4:37 PM, Mark Roden <mmroden at gmail.com> wrote:
> >>
> >> The new branch does not contain the commit, that's what I'm saying.
> >> The master branch remains ahead by 1 commit.  Git status on the new
> >> branch returns:
> >> # On branch GDCMHiddenFunctionWarnings
> >> # Untracked files:
> >> #   (use "git add <file>..." to include in what will be committed)
> >> #
> >> #       .DS_Store
> >> #       ITK_Osirix_Test_Data/
> >> nothing added to commit but untracked files present (use "git add" to
> >> track)
> >>
> >> So I'd rather not reset the master until the commit is safe.
> >>
> >> On Tue, Mar 1, 2011 at 1:33 PM, David Cole <david.cole at kitware.com>
> wrote:
> >> > After you have the new branch, containing the commit, it's safe to do:
> >> >
> >> > git checkout master
> >> > git reset --hard origin/master
> >> >
> >> > That will put your local master back to the same state as what's on
> >> > origin,
> >> > and then your commit will "only" be on the topic branch.
> >> >
> >> > Commits may be "reached" from many different branches with git.
> >> >
> >> >
> >> > On Tue, Mar 1, 2011 at 4:30 PM, Mark Roden <mmroden at gmail.com> wrote:
> >> >>
> >> >> Hi Marcus,
> >> >>
> >> >> git checkout -b my-topic is making a new branch, but the commit
> >> >> remains in the master branch.  Is this a git version thing, possibly?
> >> >>
> >> >> Mark
> >> >>
> >> >> On Tue, Mar 1, 2011 at 1:16 PM, Marcus D. Hanwell
> >> >> <marcus.hanwell at kitware.com> wrote:
> >> >> > If you are on your master, you can simply do a,
> >> >> >
> >> >> > git checkout -b my-topic
> >> >> >
> >> >> > That will give you a new topic branch with the commits from your
> >> >> > local
> >> >> > master. At some point you will want to reset your local master,
> >> >> > warning - if you don't make a topic branch as described above you
> >> >> > could lose some commits.
> >> >> >
> >> >> > git checkout master
> >> >> > git reset --hard origin/master
> >> >> >
> >> >> > The wiki page for developers,
> http://www.itk.org/Wiki/ITK/Git/Develop
> >> >> > will give more details. If you are having trouble with the push
> then
> >> >> > you can test authentication using the SetupForDevelopment.sh
> script.
> >> >> > A
> >> >> > quick 'ssh -v review.source.kitware.com' would test
> >> >> > authentication/firewall issues - it should print out a message
> >> >> > telling
> >> >> > you how to clone if you authenticated.
> >> >> >
> >> >> > Hope that helps,
> >> >> >
> >> >> > Marcus
> >> >> >
> >> >> > On Tue, Mar 1, 2011 at 4:11 PM, Mark Roden <mmroden at gmail.com>
> wrote:
> >> >> >> Ah, so I have to be on a branch now to do this?
> >> >> >>
> >> >> >> That should probably be part of the hooks then, because I was able
> >> >> >> to
> >> >> >> do it from master before (and was doing it from master before).
> >> >> >>
> >> >> >> How can I move my commit from master to some other branch to do
> the
> >> >> >> checkin?
> >> >> >>
> >> >> >> On Tue, Mar 1, 2011 at 1:04 PM, David Cole <
> david.cole at kitware.com>
> >> >> >> wrote:
> >> >> >>> The HEAD:refs/for/master/MyCommitMessage is supposed to reference
> a
> >> >> >>> topic branch name...
> >> >> >>>
> >> >> >>> What is the name of your current branch?
> >> >> >>>
> >> >> >>> git branch
> >> >> >>>
> >> >> >>> (branch name with the * next to it is current...)
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>> On Tue, Mar 1, 2011 at 3:55 PM, David Cole <
> david.cole at kitware.com>
> >> >> >>> wrote:
> >> >> >>>> Do you get the same result with the simpler?
> >> >> >>>>
> >> >> >>>>  git gerrit-push
> >> >> >>>>
> >> >> >>>>
> >> >> >>>> On Tue, Mar 1, 2011 at 3:52 PM, Mark Roden <mmroden at gmail.com>
> >> >> >>>> wrote:
> >> >> >>>>> Hi all,
> >> >> >>>>>
> >> >> >>>>> So I think I've solved some of the gdcm warnings, but can't
> push
> >> >> >>>>> to
> >> >> >>>>> gerrit.  What's changed here?
> >> >> >>>>>
> >> >> >>>>> I've followed the ./Utilities/Setup etc script.
> >> >> >>>>>
> >> >> >>>>> I do
> >> >> >>>>> git commit -a -m "COMP: My Commit Message"
> >> >> >>>>> then
> >> >> >>>>> git push gerrit HEAD:refs/for/master/MyCommitMessage
> >> >> >>>>>
> >> >> >>>>> And nothing happens, the command line just freezes.  My id is
> set
> >> >> >>>>> to
> >> >> >>>>> mmroden at gmail.com, and my ssh key is in gerrit, and I can log
> in
> >> >> >>>>> to
> >> >> >>>>> the gerrit website.
> >> >> >>>>>
> >> >> >>>>> I was following the instructions here:
> >> >> >>>>> http://www.visualizationtoolkit.org/Wiki/ITK/Gerrit
> >> >> >>>>>
> >> >> >>>>> Please help,
> >> >> >>>>> Mark
> >> >> >>>>> _______________________________________________
> >> >> >>>>> Powered by www.kitware.com
> >> >> >>>>>
> >> >> >>>>> Visit other Kitware open-source projects at
> >> >> >>>>> http://www.kitware.com/opensource/opensource.html
> >> >> >>>>>
> >> >> >>>>> Kitware offers ITK Training Courses, for more information
> visit:
> >> >> >>>>> http://kitware.com/products/protraining.html
> >> >> >>>>>
> >> >> >>>>> Please keep messages on-topic and check the ITK FAQ at:
> >> >> >>>>> http://www.itk.org/Wiki/ITK_FAQ
> >> >> >>>>>
> >> >> >>>>> Follow this link to subscribe/unsubscribe:
> >> >> >>>>> http://www.itk.org/mailman/listinfo/insight-developers
> >> >> >>>>>
> >> >> >>>>
> >> >> >>>
> >> >> >> _______________________________________________
> >> >> >> Powered by www.kitware.com
> >> >> >>
> >> >> >> Visit other Kitware open-source projects at
> >> >> >> http://www.kitware.com/opensource/opensource.html
> >> >> >>
> >> >> >> Kitware offers ITK Training Courses, for more information visit:
> >> >> >> http://kitware.com/products/protraining.html
> >> >> >>
> >> >> >> Please keep messages on-topic and check the ITK FAQ at:
> >> >> >> http://www.itk.org/Wiki/ITK_FAQ
> >> >> >>
> >> >> >> Follow this link to subscribe/unsubscribe:
> >> >> >> http://www.itk.org/mailman/listinfo/insight-developers
> >> >> >>
> >> >> >
> >> >
> >> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110301/65ffb0ac/attachment.htm>


More information about the Insight-developers mailing list