Bug 327931

Summary: JJ: creating new projects with git as VCS fails when no name is configured in git
Product: [Applications] kdevelop Reporter: Sven Brauch <mail>
Component: generalAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: minor CC: bluescreenavenger, mikhail.krutov, shubham.chaudhary
Priority: NOR Keywords: junior-jobs
Version: git master   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 1.6.1
Sentry Crash Report:

Description Sven Brauch 2013-11-22 09:49:47 UTC
If you haven't configured your name (with git config --global) creating a new project fails with an error message. Just the toolview with the git output tells you what's wrong. Maybe this could be handled more gracefully. 

Reproducible: Always
Comment 1 bluescreenavenger 2014-01-04 22:49:02 UTC
I can confirm, this happens to me too
Comment 2 Mike Krutov 2014-01-22 14:04:58 UTC
Even more, if user.name/user.email is not set and user is trying to commit something into existing/imported project - no error is shown etc.
Comment 3 Mike Krutov 2014-01-22 14:06:00 UTC
(In reply to comment #2)
> Even more, if user.name/user.email is not set and user is trying to commit
> something into existing/imported project - no error is shown etc.

e.g. commit will silently fail and user won't be aware of that.
Comment 4 Shubham Chaudhary 2014-03-02 11:30:17 UTC
Proposed a patch here https://git.reviewboard.kde.org/r/116530
Comment 5 Shubham Chaudhary 2014-03-06 18:18:15 UTC
Git commit 8ba587c392af6b2b0960aa38770012b1659e2b9c by Shubham Chaudhary.
Committed on 06/03/2014 at 18:06.
Pushed by chaudhary into branch 'master'.

Handle VCS errors when VCSJob is unsuccessful

Main problem descibed in bug report was the case when the name and email
of author is not defined using git config --global. Due to this several
operations like init via 'new from template' option or just simple
commit failed without reporting error.

Changes:
* Set proper errorText for vcs jobs
* New slot jobFinished in vcsdiffpatchsources
* Shows detailed failure information through vcsError function when initialization fails.
* Checks  the status of commit job, if unsuccessful shows a error KMessageBox.
* Several whitespace fixes slipped in shamelessly by vim
REVIEW: 116530
FIXED-IN: 1.6.1

M  +9    -4    plugins/appwizard/appwizardplugin.cpp
M  +15   -13   vcs/dvcs/dvcsjob.cpp
M  +19   -3    vcs/widgets/vcsdiffpatchsources.cpp
M  +17   -15   vcs/widgets/vcsdiffpatchsources.h

http://commits.kde.org/kdevplatform/8ba587c392af6b2b0960aa38770012b1659e2b9c
Comment 6 Shubham Chaudhary 2014-03-06 18:22:14 UTC
Git commit ccd013526d4caffd672897eecf16ba5c3f899c7b by Shubham Chaudhary.
Committed on 06/03/2014 at 18:06.
Pushed by chaudhary into branch '1.6'.

Handle VCS errors when VCSJob is unsuccessful

Main problem descibed in bug report was the case when the name and email
of author is not defined using git config --global. Due to this several
operations like init via 'new from template' option or just simple
commit failed without reporting error.

Changes:
* Set proper errorText for vcs jobs
* New slot jobFinished in vcsdiffpatchsources
* Shows detailed failure information through vcsError function when initialization fails.
* Checks  the status of commit job, if unsuccessful shows a error KMessageBox.
* Several whitespace fixes slipped in shamelessly by vim
REVIEW: 116530
FIXED-IN: 1.6.1

M  +9    -4    plugins/appwizard/appwizardplugin.cpp
M  +15   -13   vcs/dvcs/dvcsjob.cpp
M  +19   -3    vcs/widgets/vcsdiffpatchsources.cpp
M  +17   -15   vcs/widgets/vcsdiffpatchsources.h

http://commits.kde.org/kdevplatform/ccd013526d4caffd672897eecf16ba5c3f899c7b