You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/12/19 22:09:31 UTC
[1/2] incubator-mynewt-newt git commit: newt - Fix for compatibility
check.
Repository: incubator-mynewt-newt
Updated Branches:
refs/heads/develop d4d54282e -> 856ea2f0f
newt - Fix for compatibility check.
Look for the "Not a valid commit name" error message. This indicates
that the required commit is not present.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/483b0a6f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/483b0a6f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/483b0a6f
Branch: refs/heads/develop
Commit: 483b0a6f7e2432fe8182ea79861725912ace0d65
Parents: d4d5428
Author: Christopher Collins <cc...@apache.org>
Authored: Mon Dec 19 14:08:22 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Mon Dec 19 14:08:22 2016 -0800
----------------------------------------------------------------------
newt/repo/repo.go | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/483b0a6f/newt/repo/repo.go
----------------------------------------------------------------------
diff --git a/newt/repo/repo.go b/newt/repo/repo.go
index 4151d11..099c1dd 100644
--- a/newt/repo/repo.go
+++ b/newt/repo/repo.go
@@ -583,7 +583,11 @@ func (r *Repo) HasMinCommit() (bool, error) {
}
mergeBase, err := util.ShellCommand(cmd, nil)
if err != nil {
- return false, util.ChildNewtError(err)
+ if strings.Contains(err.Error(), "Not a valid commit name") {
+ return false, nil
+ } else {
+ return false, util.ChildNewtError(err)
+ }
}
if len(mergeBase) == 0 {
// No output means the commit does not exist in the current branch.
[2/2] incubator-mynewt-newt git commit: Newt - Fix ChildNewtError()
panic.
Posted by cc...@apache.org.
Newt - Fix ChildNewtError() panic.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/856ea2f0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/856ea2f0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/856ea2f0
Branch: refs/heads/develop
Commit: 856ea2f0f25061b453dbe82b456a03a2353411ea
Parents: 483b0a6
Author: Christopher Collins <cc...@apache.org>
Authored: Mon Dec 19 14:09:14 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Mon Dec 19 14:09:14 2016 -0800
----------------------------------------------------------------------
newt/vendor/mynewt.apache.org/newt/util/util.go | 2 +-
util/util.go | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/856ea2f0/newt/vendor/mynewt.apache.org/newt/util/util.go
----------------------------------------------------------------------
diff --git a/newt/vendor/mynewt.apache.org/newt/util/util.go b/newt/vendor/mynewt.apache.org/newt/util/util.go
index d734174..e3ff437 100644
--- a/newt/vendor/mynewt.apache.org/newt/util/util.go
+++ b/newt/vendor/mynewt.apache.org/newt/util/util.go
@@ -92,7 +92,7 @@ func PreNewtError(err error, format string, args ...interface{}) *NewtError {
func ChildNewtError(parent error) *NewtError {
for {
newtErr, ok := parent.(*NewtError)
- if !ok {
+ if !ok || newtErr == nil || newtErr.Parent == nil {
break
}
parent = newtErr.Parent
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/856ea2f0/util/util.go
----------------------------------------------------------------------
diff --git a/util/util.go b/util/util.go
index d734174..e3ff437 100644
--- a/util/util.go
+++ b/util/util.go
@@ -92,7 +92,7 @@ func PreNewtError(err error, format string, args ...interface{}) *NewtError {
func ChildNewtError(parent error) *NewtError {
for {
newtErr, ok := parent.(*NewtError)
- if !ok {
+ if !ok || newtErr == nil || newtErr.Parent == nil {
break
}
parent = newtErr.Parent