View Javadoc

1   package com.aragost.javahg.commands;
2   
3   import java.io.File;
4   import java.io.IOException;
5   
6   import com.aragost.javahg.Repository;
7   import com.aragost.javahg.commands.flags.ImportCommandFlags;
8   import com.aragost.javahg.internals.Utils;
9   
10  public class ImportCommand extends ImportCommandFlags {
11  
12      public ImportCommand(Repository repository) {
13          super(repository);
14      }
15  
16      /**
17       * Run <tt>hg import</tt> on the files.
18       * 
19       * @param files
20       *            the input files
21       * @throws IOException
22       */
23      public void execute(String... files) throws IOException {
24          launchString(files);
25      }
26  
27      /**
28       * Run <tt>hg import</tt> on the files.
29       * 
30       * @param files
31       *            the input files
32       * @throws IOException
33       */
34      public void execute(File... files) throws IOException {
35          launchString(Utils.fileArray2StringArray(files));
36      }
37  }