diff --git a/.travis.yml b/.travis.yml
index f54b68d..16e81fc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,15 +1,29 @@
 language: go
+dist: xenial
 
 go:
   - 1.6.x
   - 1.7.x
   - 1.8.x
   - 1.9.x
+  - 1.10.x
+  - 1.11.x
+  - 1.12.x
   - master
 
 before_script:
   - git version
   - svn --version
+  # Need a more up to date verion of mercurial to handle TLS with
+  # bitbucket properly. Also need python greater than 2.7.9.
+  - pyenv versions && pyenv rehash && pyenv versions
+  - pyenv global 2.7.15
+  - openssl ciphers -v | awk '{print $2}' | sort | uniq
+  - sudo pip install mercurial --upgrade
+  # The below is a complete hack to have hg use the pyenv version of python
+  - sudo sed -i '1s/.*/\#\!\/usr\/bin\/env\ python/' /usr/local/bin/hg
+  - hg --version
+
 
 # Setting sudo access to false will let Travis CI use containers rather than
 # VMs to run the tests. For more details see:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ff0f828..3a4a5e2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,24 @@
 # Changelog
 
+## 1.13.1 (2019-07-09)
+
+### Fixed
+
+- #101: Updated bitbucket API call as previous API was removed
+- #97: Fixed travis ci building
+- #95: Fixed "git clean" invocation for submodule
+
+## 1.13.0 (2019-02-27)
+
+### Changed
+
+- #92: Allow non-200 remote lookup responses for Go style redirects
+
+### Fixed
+
+- #91: For Mercurial/Hg return an error if Version() called and Hg prints to stderr
+- #87 and #93: Fix CI issues
+
 ## 1.12.0 (2017-09-11)
 
 ### Changed
diff --git a/git.go b/git.go
index 4094e0d..8248350 100644
--- a/git.go
+++ b/git.go
@@ -181,7 +181,7 @@ func (s *GitRepo) defendAgainstSubmodules() error {
 		return NewLocalError("Unexpected error while defensively cleaning up after possible derelict submodule directories", err, string(out))
 	}
 	// Then, repeat just in case there are any nested submodules that went away.
-	out, err = s.RunFromDir("git", "submodule", "foreach", "--recursive", "git", "clean", "-x", "-d", "-f", "-f")
+	out, err = s.RunFromDir("git", "submodule", "foreach", "--recursive", "git clean -x -d -f -f")
 	if err != nil {
 		return NewLocalError("Unexpected error while defensively cleaning up after possible derelict nested submodule directories", err, string(out))
 	}
@@ -366,20 +366,20 @@ func (s *GitRepo) Ping() bool {
 
 // EscapePathSeparator escapes the path separator by replacing it with several.
 // Note: this is harmless on Unix, and needed on Windows.
-func EscapePathSeparator(path string) (string) {
+func EscapePathSeparator(path string) string {
 	switch runtime.GOOS {
 	case `windows`:
 		// On Windows, triple all path separators.
 		// Needed to escape backslash(s) preceding doublequotes,
 		// because of how Windows strings treats backslash+doublequote combo,
 		// and Go seems to be implicitly passing around a doublequoted string on Windows,
-		// so we cannnot use default string instead.
+		// so we cannot use default string instead.
 		// See: https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/
 		// e.g., C:\foo\bar\ -> C:\\\foo\\\bar\\\
 		// used with --prefix, like this: --prefix=C:\foo\bar\ -> --prefix=C:\\\foo\\\bar\\\
 		return strings.Replace(path,
 			string(os.PathSeparator),
-			string(os.PathSeparator) + string(os.PathSeparator) + string(os.PathSeparator),
+			string(os.PathSeparator)+string(os.PathSeparator)+string(os.PathSeparator),
 			-1)
 	default:
 		return path
@@ -404,7 +404,7 @@ func (s *GitRepo) ExportDir(dir string) error {
 		return NewLocalError("Unable to create directory", err, "")
 	}
 
-	path = EscapePathSeparator( dir )
+	path = EscapePathSeparator(dir)
 	out, err := s.RunFromDir("git", "checkout-index", "-f", "-a", "--prefix="+path)
 	s.log(out)
 	if err != nil {
@@ -412,7 +412,7 @@ func (s *GitRepo) ExportDir(dir string) error {
 	}
 
 	// and now, the horror of submodules
-	path = EscapePathSeparator( dir + "$path" + string(os.PathSeparator) )
+	path = EscapePathSeparator(dir + "$path" + string(os.PathSeparator))
 	out, err = s.RunFromDir("git", "submodule", "foreach", "--recursive", "git checkout-index -f -a --prefix="+path)
 	s.log(out)
 	if err != nil {
diff --git a/git_test.go b/git_test.go
index b58c2c2..b7b9a24 100644
--- a/git_test.go
+++ b/git_test.go
@@ -559,7 +559,6 @@ func TestGitSubmoduleHandling2(t *testing.T) {
 		t.Errorf("Current failed to detect Git on tip of master. Got version: %s", v)
 	}
 
-
 	tempDir2, err := ioutil.TempDir("", "go-vcs-git-tests-export")
 	if err != nil {
 		t.Fatalf("Error creating temp directory: %s", err)
@@ -583,7 +582,7 @@ func TestGitSubmoduleHandling2(t *testing.T) {
 		t.Errorf("Error checking exported file in Git: %s", err)
 	}
 
-	_, err = os.Stat(filepath.Join( filepath.Join(exportDir, "definitions"), "README.md"))
+	_, err = os.Stat(filepath.Join(filepath.Join(exportDir, "definitions"), "README.md"))
 	if err != nil {
 		t.Errorf("Error checking exported file in Git: %s", err)
 	}
diff --git a/hg.go b/hg.go
index 5000a6d..ee3e0d9 100644
--- a/hg.go
+++ b/hg.go
@@ -1,7 +1,9 @@
 package vcs
 
 import (
+	"bytes"
 	"encoding/xml"
+	"errors"
 	"os"
 	"os/exec"
 	"regexp"
@@ -110,12 +112,20 @@ func (s *HgRepo) UpdateVersion(version string) error {
 
 // Version retrieves the current version.
 func (s *HgRepo) Version() (string, error) {
-	out, err := s.RunFromDir("hg", "--debug", "identify")
-	if err != nil {
-		return "", NewLocalError("Unable to retrieve checked out version", err, string(out))
-	}
-
-	parts := strings.SplitN(string(out), " ", 2)
+	c := s.CmdFromDir("hg", "--debug", "identify")
+	stdout, stderr := new(bytes.Buffer), new(bytes.Buffer)
+	c.Stdout = stdout
+	c.Stderr = stderr
+	if err := c.Run(); err != nil {
+		return "", NewLocalError("Unable to retrieve checked out version", err, stderr.String())
+	}
+	if stderr.Len() > 0 {
+		// "hg --debug identify" can print out errors before it actually prints
+		// the version.
+		// https://github.com/Masterminds/vcs/issues/90
+		return "", NewLocalError("Unable to retrieve checked out version", errors.New("Error output printed before identify"), stderr.String())
+	}
+	parts := strings.SplitN(stdout.String(), " ", 2)
 	sha := parts[0]
 	return strings.TrimSpace(sha), nil
 }
diff --git a/hg_test.go b/hg_test.go
index 6b19f72..2634aae 100644
--- a/hg_test.go
+++ b/hg_test.go
@@ -2,12 +2,11 @@ package vcs
 
 import (
 	"io/ioutil"
+	"os"
 	"path/filepath"
 	"strings"
-	"time"
-	//"log"
-	"os"
 	"testing"
+	"time"
 )
 
 // Canary test to ensure HgRepo implements the Repo interface.
diff --git a/vcs_remote_lookup.go b/vcs_remote_lookup.go
index 6689f95..35c2cd8 100644
--- a/vcs_remote_lookup.go
+++ b/vcs_remote_lookup.go
@@ -109,14 +109,6 @@ func detectVcsFromRemote(vcsURL string) (Type, string, error) {
 		return NoVCS, "", ErrCannotDetectVCS
 	}
 	defer resp.Body.Close()
-	if resp.StatusCode < 200 || resp.StatusCode >= 300 {
-		if resp.StatusCode == 404 {
-			return NoVCS, "", NewRemoteError(fmt.Sprintf("%s Not Found", vcsURL), nil, "")
-		} else if resp.StatusCode == 401 || resp.StatusCode == 403 {
-			return NoVCS, "", NewRemoteError(fmt.Sprintf("%s Access Denied", vcsURL), nil, "")
-		}
-		return NoVCS, "", ErrCannotDetectVCS
-	}
 
 	t, nu, err := parseImportFromBody(u, resp.Body)
 	if err != nil {
@@ -252,7 +244,7 @@ func checkBitbucket(i map[string]string, ul *url.URL) (Type, error) {
 		SCM Type `json:"scm"`
 	}
 
-	u := expand(i, "https://api.bitbucket.org/1.0/repositories/{name}")
+	u := expand(i, "https://api.bitbucket.org/2.0/repositories/{name}?fields=scm")
 	data, err := get(u)
 	if err != nil {
 		return "", err
diff --git a/vcs_remote_lookup_test.go b/vcs_remote_lookup_test.go
index 938cb0e..344790e 100644
--- a/vcs_remote_lookup_test.go
+++ b/vcs_remote_lookup_test.go
@@ -34,7 +34,6 @@ func TestVCSLookup(t *testing.T) {
 		"https://example.com/foo/bar/baz.hg":                               {work: true, t: Hg},
 		"https://gopkg.in/tomb.v1":                                         {work: true, t: Git},
 		"https://golang.org/x/net":                                         {work: true, t: Git},
-		"https://speter.net/go/exp/math/dec/inf":                           {work: true, t: Git},
 		"https://git.openstack.org/foo/bar":                                {work: true, t: Git},
 		"git@github.com:Masterminds/vcs.git":                               {work: true, t: Git},
 		"git@example.com:foo.git":                                          {work: true, t: Git},
@@ -111,27 +110,3 @@ func TestVCSFileLookup(t *testing.T) {
 		t.Errorf("Detected wrong type from file:// path. Found type %v", ty)
 	}
 }
-
-func TestNotFound(t *testing.T) {
-	_, _, err := detectVcsFromRemote("https://mattfarina.com/notfound")
-	if err == nil || !strings.HasSuffix(err.Error(), " Not Found") {
-		t.Errorf("Failed to find not found repo")
-	}
-
-	_, err = NewRepo("https://mattfarina.com/notfound", "")
-	if err == nil || !strings.HasSuffix(err.Error(), " Not Found") {
-		t.Errorf("Failed to find not found repo")
-	}
-}
-
-func TestAccessDenied(t *testing.T) {
-	_, _, err := detectVcsFromRemote("https://bitbucket.org/mattfarina/private-repo-for-vcs-testing")
-	if err == nil || err.Error() != "Access Denied" {
-		t.Errorf("Failed to detect access denied")
-	}
-
-	_, err = NewRepo("https://bitbucket.org/mattfarina/private-repo-for-vcs-testing", "")
-	if err == nil || err.Error() != "Access Denied" {
-		t.Errorf("Failed to detect access denied")
-	}
-}