mihasya/gopack — pull request #1 by mihasya (2013-11-06 01:27:31+00:00)
Title: first stab at snapshotting git deps, some tests failing

(this pull request depends on https://github.com/d2fn/gopack/pull/48 branch being merged and is mostly here for discussion purposes; see other PR for rationale)

### Changes:

* Addition of `PopulateDep(*Dep)` to `Scm` interface for the purpose of filling out SCM information in a blank `Dep` based on directory contents.
* Addition of `DepFromConfig` and `DepFromPath` constructors which encapsulate the old creation routine and use the above `Scm` method to reverse-engineer a `Dep`, respectively.
* Addition of `DetectScm` and related vars and funcs in `scm.go` for the purposes of sorting out which `Scm` is used by a given path.
* Addition of `gopack snapshot` command that dumps out a valid `gopack.config` that includes all transitive dependencies/

Things that for sure still need to be done:

- [ ] hg support
- [ ] svn support (would love someone's help on that..)
- [ ] (minor) fixing up the output order so that `repo:` always goes first and so that the deps are in proper order (otherwise one can imagine lots of vcs commits that contain changes to `gopack.config` that are just reordering)