Import Subcommand Documentation

When to use it

Use the import subcommand to grab an external dependency and manage it locally. This subcommand is your main entryway into the world of vendor branch management.

Conceptually, the import subcommand does an svn export or git clone of the external repository, copies each file into a named folder in your working copy, and throws away the clone / exported directory.

Importing a named branch

When importing from Subversion, you can import any directory, including branches or subdirectories of the project. This is a feature of Subversion, where everything (including branches and tags) are just more directories.

When importing from Git, you can only import the full repository, but you may import any branch, as long as you know it's name. Use the --commit option to tell Piston what to import.

Example usage

$ piston import git:// vendor/plugins/acts_as_list
$ piston import --commit 2-2-stable git:// vendor/rails
$ piston import

Command summary

  piston import repository [directory] [options]+

  repository (1 -> repository) 
      The repository you wish to Pistonize 
  directory (1 ~> directory=) 
      Where to put the Pistonized repository 
  --verbose=[verbose], -v (0 ~> integer(verbose=0)) 
      Verbosity level (0 to 5, 0 being the default) 
  --quiet, -q 
  --revision=revision, -r (0 ~> revision) 
      The revision you wish to operate on 
  --commit=commit (0 ~> commit) 
      The commit you wish to operate on 
      Automatically lock down the revision/commit to protect against blanket 
  --repository-type=repository-type (0 ~> repository-type=) 
      Force a specific repository type, for when it's not possible to guess 
  --help, -h