Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Masterminds/vcs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.9.0
Choose a base ref
...
head repository: Masterminds/vcs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Dec 4, 2016

  1. Copy the full SHA
    cec96d1 View commit details
  2. Copy the full SHA
    05ae255 View commit details
  3. typos and such

    sdboyer committed Dec 4, 2016
    Copy the full SHA
    8e5ea52 View commit details
  4. Oh, cloning too

    sdboyer committed Dec 4, 2016
    Copy the full SHA
    3c78e16 View commit details

Commits on Dec 29, 2016

  1. Add submodule cleaning tests

    sdboyer committed Dec 29, 2016
    Copy the full SHA
    f0e30a8 View commit details

Commits on Jan 4, 2017

  1. Merge pull request #60 from sdboyer/submodules

    Defend against the waking nightmare that is git submodules
    mattfarina authored Jan 4, 2017
    Copy the full SHA
    6abbba9 View commit details

Commits on Jan 5, 2017

  1. Adding gometalinter testing

    Cleaned up code based on linter feedback
    mattfarina committed Jan 5, 2017
    Copy the full SHA
    95aab3c View commit details

Commits on Jan 6, 2017

  1. Merge pull request #61 from Masterminds/feat/ci-linting

    Adding gometalinter testing
    mattfarina authored Jan 6, 2017
    Copy the full SHA
    83dde19 View commit details

Commits on Jan 9, 2017

  1. Copy the full SHA
    87fca6b View commit details

Commits on Jan 11, 2017

  1. Copy the full SHA
    9a6e212 View commit details

Commits on Jan 13, 2017

  1. Fixing windows compatability

    There have been several compatability issues with Windows due to
    assumptions of a posix environment.
    mattfarina committed Jan 13, 2017
    Copy the full SHA
    1e1db8b View commit details
  2. Removing travis testing for Go 1.5

    Since Go 1.5 is no longer supported by the Go team and golint,
    which is used by gometalinter, no longer works in Go 1.5 the
    testing is bring removed. It should still work.
    mattfarina committed Jan 13, 2017
    Copy the full SHA
    48f4652 View commit details

Commits on Jan 17, 2017

  1. Adding appveyor badge

    mattfarina committed Jan 17, 2017
    Copy the full SHA
    0d1e1f8 View commit details
  2. Merge pull request #62 from Masterminds/feat/appveyor

    Adding Windows testing via appveyor
    mattfarina authored Jan 17, 2017
    Copy the full SHA
    a76894c View commit details

Commits on Jan 18, 2017

  1. Copy the full SHA
    bac0f48 View commit details

Commits on Jan 21, 2017

  1. git: remove extra quotes in submodule export

    on the cli, one uses the extra single quotes to ensure the whole cmd is passed as a single arg despite
    containing spaces, but when passing args in a structured call like this, it isn't needed.
    
    Fixes Masterminds/glide#745
    dt committed Jan 21, 2017
    Copy the full SHA
    2449b6d View commit details

Commits on Jan 24, 2017

  1. Copy the full SHA
    504bd82 View commit details
  2. Copy the full SHA
    4ae26b8 View commit details
  3. Removing debug code. oops

    mattfarina committed Jan 24, 2017
    Copy the full SHA
    2b46764 View commit details
  4. Fatal error if bzr is not installed

    If we get a "bzr not installed" error, the `repo` object is nil which
    causes a NPE panic on the next line. Probably better just to Fatal
    the test (which stops execution) instead of reporting a test failure
    and then immediately panicking.
    kevinburke committed Jan 24, 2017
    Copy the full SHA
    04a2a98 View commit details

Commits on Jan 25, 2017

  1. Merge pull request #64 from kevinburke/fix-vcs-tests

    Fatal error if bzr is not installed
    mattfarina authored Jan 25, 2017
    Copy the full SHA
    2573480 View commit details

Commits on Jan 29, 2017

  1. Expose CmdFromDir

    Exposes internal functionality of RunFromDir to create a command
    run from the repo's directory as CmdFromDir.
    Miguel Molina committed Jan 29, 2017
    Copy the full SHA
    579b018 View commit details

Commits on Jan 30, 2017

  1. Merge pull request #65 from erizocosmico/repo/cmd-from-dir

    Expose CmdFromDir
    mattfarina authored Jan 30, 2017
    Copy the full SHA
    abd1ea7 View commit details

Commits on Mar 23, 2017

  1. Update for Go 1.8 testing

    mattfarina committed Mar 23, 2017
    Copy the full SHA
    bac9f21 View commit details
  2. Merge pull request #69 from Masterminds/update-travis

    Update for Go 1.8 testing
    mattfarina authored Mar 23, 2017
    Copy the full SHA
    adebf36 View commit details

Commits on Mar 24, 2017

  1. Copy the full SHA
    852adcd View commit details
  2. Merge pull request #70 from Masterminds/readme-1.11

    Updating the changelog for the 1.11.0 release
    mattfarina authored Mar 24, 2017
    Copy the full SHA
    795e20f View commit details

Commits on Apr 18, 2017

  1. Copy the full SHA
    93ea79b View commit details
  2. Copy the full SHA
    982e2f4 View commit details
  3. Copy the full SHA
    92453b5 View commit details
  4. Copy the full SHA
    68f7396 View commit details
  5. Copy the full SHA
    9e54342 View commit details
  6. Copy the full SHA
    cee519f View commit details
  7. Copy the full SHA
    3df2830 View commit details
  8. Copy the full SHA
    0302f47 View commit details
  9. Copy the full SHA
    085dbd4 View commit details
  10. Copy the full SHA
    500831d View commit details

Commits on Apr 21, 2017

  1. Copy the full SHA
    65b8bab View commit details

Commits on Apr 23, 2017

  1. Copy the full SHA
    c332ca6 View commit details
  2. Copy the full SHA
    00af9df View commit details

Commits on Apr 24, 2017

  1. Copy the full SHA
    92b5758 View commit details

Commits on Apr 28, 2017

  1. Merge pull request #77 from m0j0hn/VCS-76

    VCS-76: Fix submodule handling for Windows
    mattfarina authored Apr 28, 2017
    Copy the full SHA
    6594752 View commit details
  2. Copy the full SHA
    3084677 View commit details

Commits on Jul 16, 2017

  1. Copy the full SHA
    d8a3434 View commit details

Commits on Sep 8, 2017

  1. Bump Go versions

    AlekSi authored Sep 8, 2017
    Copy the full SHA
    d5c0282 View commit details

Commits on Sep 11, 2017

  1. Merge pull request #80 from AlekSi/patch-1

    Bump Go versions
    mattfarina authored Sep 11, 2017
    Copy the full SHA
    eabae39 View commit details
  2. Merge pull request #79 from guywithnose/master

    Include the error context in the error string
    mattfarina authored Sep 11, 2017
    Copy the full SHA
    98687a3 View commit details
  3. Copy the full SHA
    ea945b4 View commit details
  4. Merge pull request #81 from Masterminds/changelog-update

    Updating changelog for 1.12.0 release
    
    Note, this includes a formatting change based on markdown linting.
    mattfarina authored Sep 11, 2017
    Copy the full SHA
    6f1c6d1 View commit details

Commits on Mar 5, 2018

  1. fix style tests

    Matthew Fisher committed Mar 5, 2018
    Copy the full SHA
    dfb47ae View commit details
Showing with 833 additions and 332 deletions.
  1. +28 −0 .github/workflows/linux-tests.yaml
  2. +33 −0 .github/workflows/windows-tests.yaml
  3. +24 −0 .golangci.yml
  4. +0 −27 .travis.yml
  5. +112 −24 CHANGELOG.md
  6. +19 −0 Makefile
  7. +4 −1 README.md
  8. +10 −20 bzr.go
  9. +25 −9 bzr_test.go
  10. +10 −3 errors.go
  11. +77 −18 git.go
  12. +252 −8 git_test.go
  13. +13 −0 git_unix.go
  14. +47 −0 git_windows.go
  15. +0 −8 glide.yaml
  16. +3 −0 go.mod
  17. +24 −22 hg.go
  18. +29 −30 hg_test.go
  19. +10 −1 repo.go
  20. +18 −4 repo_test.go
  21. +33 −22 svn.go
  22. +12 −11 svn_test.go
  23. +13 −5 vcs_local_lookup.go
  24. +18 −84 vcs_remote_lookup.go
  25. +19 −35 vcs_remote_lookup_test.go
28 changes: 28 additions & 0 deletions .github/workflows/linux-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
on:
pull_request:
push:
branches:
- master

name: Linux Tests
jobs:
test:
strategy:
matrix:
go-version: [1.16.x, 1.17.x, 1.18.x]
platform:
- ubuntu-latest
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v1
- name: Lint
run: make lint
- name: Install dependencies
run: sudo apt install subversion mercurial bzr
- name: Test
run: make test
33 changes: 33 additions & 0 deletions .github/workflows/windows-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
pull_request:
push:
branches:
- master

name: Windows Tests
jobs:
test:
strategy:
matrix:
go-version: [1.16.x, 1.17.x, 1.18.x]
platform:
- windows-latest
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v1
- name: Install dependencies
run: choco install svn hg
- name: Test
run: go test -v
env:
# Skipping bzr tests on Windows as bzr does not install properly there.
# bzr development stopped in 2017 (when last change landed). The official
# windows installer is still bzr 2.5. The installer does not setup working
# cacerts. This needs to be manually modified to get working. Skipping
# tests in this environment as there are environment problems.
SKIP_BZR: "true"
24 changes: 24 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
linters:
disable-all: true
enable:
- deadcode
- dupl
- gofmt
- goimports
- gosimple
- govet
- ineffassign
- nakedret
- revive
- structcheck
- unused
- varcheck
- staticcheck

linters-settings:
gofmt:
simplify: true
goimports:
local-prefixes: helm.sh/helm/v3
dupl:
threshold: 400
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

136 changes: 112 additions & 24 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,119 @@
# 1.9.0 (2016-11-18)
# Changelog

## 1.13.3 (2022-03-31)

### Fixed

- Case sensitive use of the module name

## 1.13.2 (2022-03-30)

### Fixed

- Fix for CVE-2022-21235
- #103: Fixed CI testing. This included moving to GitHub Actions, updating the
the Git submodule handling, and skipping bzr tests on Windows (bzr has
discontinued and the installer now installs a broken environment)

## 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

- #79: Include the error context in the error string (thanks @guywithnose)
- #80: Bump the Go versions for Travis CI testing (thanks @AlekSi)

## 1.11.1 (2017-04-28)

### Fixed

- #76: Fix submodule handling for Windows (thanks @m0j0hn)

## 1.11.0 (2017-03-23)

### Added

- #65: Exposed CmdFromDir function (thanks @erizocosmico)

### Changed

- #69: Updated testing for Go 1.8

### Fixed

- #64: Testing fatal error if bzr not installed (thanks @kevinburke)

## 1.10.2 (2017-01-24)

### Fixed

- #63: Remove extra quotes in submodule export (thanks @dt)

## 1.10.1 (2017-01-18)

### Fixed

- #62: Added windows testing via appveyor and fixed issues under windows.

## 1.10.0 (2017-01-09)

### Added

- #60: Handle Git submodules (thanks @sdboyer)
- #61: Add gometalinter to testing

## 1.9.0 (2016-11-18)

### Added

## Added
- #50: Auto-detect remotes with file:// prefix.
- #59: Testing against Go 1.7

## Changed
### Changed

- Removed auto-detection for Google Code as the service is deprecated
- Added auto-detection of git.openstack.org

## Fixed
### Fixed

- #53: Git not fetching tags off branch

# 1.8.0 (2016-06-29)
## 1.8.0 (2016-06-29)

### Added

## Added
- #43: Detect when tool (e.g., git, svn, etc) not installed
- #49: Detect access denied and not found situations

## Changed
### Changed

- #48: Updated Go Report Gard url to new format
- Refactored SVN handling to detect when not in a top level directory
- Updating tagging to v[SemVer] structure for compatibility with other tools.

## Fixed
### Fixed

- #45: Fixed hg's update method so that it pulls from remote before updates

# 1.7.0 (2016-05-05)
## 1.7.0 (2016-05-05)

- Adds a glide.yaml file with some limited information.
- Implements #37: Ability to export source as a directory.
@@ -34,13 +122,13 @@
on an individual revision. Note, the tip of branch is VCS specific so usage
may require detecting VCS type.

# 1.6.1 (2016-04-27)
## 1.6.1 (2016-04-27)

- Fixed #30: tags from commit should not have ^{} appended (seen in git)
- Fixed #29: isDetachedHead fails with non-english locales (git)
- Fixed #33: Access denied and not found http errors causing xml parsing errors

# 1.6.0 (2016-04-18)
## 1.6.0 (2016-04-18)

- Issue #26: Added Init method to initialize a repo at the local location
(thanks tony).
@@ -54,11 +142,11 @@
- Issue #22: Added Ping command to test if remote location is present and
accessible.

# 1.5.1 (2016-03-23)
## 1.5.1 (2016-03-23)

- Fixing bug parsing some Git commit dates.

# 1.5.0 (2016-03-22)
## 1.5.0 (2016-03-22)

- Add Travis CI testing for Go 1.6.
- Issue #17: Add CommitInfo method allowing for a common way to get commit
@@ -69,48 +157,48 @@
for private repo type detection.
- Issue #14: Autodetect ssh/scp style urls (thanks chonthu).

# 1.4.1 (2016-03-07)
## 1.4.1 (2016-03-07)

- Fixes #16: some windows situations are unable to create parent directory.

# 1.4.0 (2016-02-15)
## 1.4.0 (2016-02-15)

- Adding support for IBM JazzHub.

# 1.3.1 (2016-01-27)
## 1.3.1 (2016-01-27)

- Issue #12: Failed to checkout Bzr repo when parent directory didn't
exist (thanks cyrilleverrier).

# 1.3.0 (2015-11-09)
## 1.3.0 (2015-11-09)

- Issue #9: Added Date method to get the date/time of latest commit (thanks kamilchm).

# 1.2.0 (2015-10-29)
## 1.2.0 (2015-10-29)

- Adding IsDirty method to detect a checkout with uncommitted changes.

# 1.1.4 (2015-10-28)
## 1.1.4 (2015-10-28)

- Fixed #8: Git IsReference not detecting branches that have not been checked
out yet.

# 1.1.3 (2015-10-21)
## 1.1.3 (2015-10-21)

- Fixing issue where there are multiple go-import statements for go redirects

# 1.1.2 (2015-10-20)
## 1.1.2 (2015-10-20)

- Fixes #7: hg not checking out code when Get is called

# 1.1.1 (2015-10-20)
## 1.1.1 (2015-10-20)

- Issue #6: Allow VCS commands to be run concurrently.

# 1.1.0 (2015-10-19)
## 1.1.0 (2015-10-19)

- #5: Added output of failed command to returned errors.

# 1.0.0 (2015-10-06)
## 1.0.0 (2015-10-06)

- Initial release.
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
GOLANGCI_LINT_VERSION?=1.45.0
GOLANGCI_LINT_SHA256?=ca06a2b170f41a9e1e34d40ca88b15b8fed2d7e37310f0c08b7fc244c34292a9
GOLANGCI_LINT=/usr/local/bin/golangci-lint

$(GOLANGCI_LINT):
curl -sSLO https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCI_LINT_VERSION}/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz
shasum -a 256 golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz | grep "^${GOLANGCI_LINT_SHA256} " > /dev/null
tar -xf golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz
sudo mv golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64/golangci-lint /usr/local/bin/golangci-lint
rm -rf golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64*

.PHONY: test
test:
@echo "==> Running tests"
go test -v

.PHONY: lint
lint: $(GOLANGCI_LINT)
@$(GOLANGCI_LINT) run
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -3,7 +3,10 @@
Manage repos in varying version control systems with ease through a common
interface.

[![Build Status](https://travis-ci.org/Masterminds/vcs.svg)](https://travis-ci.org/Masterminds/vcs) [![GoDoc](https://godoc.org/github.com/Masterminds/vcs?status.png)](https://godoc.org/github.com/Masterminds/vcs) [![Go Report Card](https://goreportcard.com/badge/github.com/Masterminds/vcs)](https://goreportcard.com/report/github.com/Masterminds/vcs)
[![Linux Tests](https://github.com/Masterminds/vcs/actions/workflows/linux-tests.yaml/badge.svg)](https://github.com/Masterminds/vcs/actions/workflows/linux-tests.yaml) [![Go Report Card](https://goreportcard.com/badge/github.com/Masterminds/vcs)](https://goreportcard.com/report/github.com/Masterminds/vcs)
[![Windows Tests](https://github.com/Masterminds/vcs/actions/workflows/windows-tests.yaml/badge.svg)](https://github.com/Masterminds/vcs/actions/workflows/windows-tests.yaml) [![Docs](https://img.shields.io/static/v1?label=docs&message=reference&color=blue)](https://pkg.go.dev/github.com/Masterminds/vcs)

**Note: Module names are case sensitive. Please be sure to use `github.com/Masterminds/vcs` with the capital M.**

## Quick Usage

Loading