bk import(7.3ce-rc1)        BitKeeper User's Manual       bk import(7.3ce-rc1)

NAME
       bk import - import files or changes into a BitKeeper package

SYNOPSIS
       bk import -tpatch [<options>] <patch> <destination>
       bk import -tplain [<options>] <directory> <destination>
       bk import -tCVS [<options>] <directory> <destination>
       bk import -tMKS [<options>] <directory> <destination>
       bk import -tRCS [<options>] <directory> <destination>
       bk import -tSCCS [<options>] <directory> <destination>

DESCRIPTION
       Use  bk  import  to  put  plain  text files, patches ("diff -Nur"), and
       RCS/CVS files (in this document RCS will mean CVS, MKS and RCS) into  a
       BitKeeper  package.  For file (text, SCCS, RCS, etc) imports, bk import
       does its work outside of your original tree thus leaving  the  original
       files intact while importing them into a BitKeeper package.

       Patch  imports are the only type of import which may be done repeatedly
       in the same destination package.

       See below for information specific types of imports.

OPTIONS
       -C           Do not commit the ChangeSet.
       -f           Force; do not prompt for list editing.
       -F           Fast; run more quickly for  large  imports.   NOTICE:  use
                    this  option only when you know that this is the only Bit-
                    Keeper activity you are doing.  Using this option  on  two
                    parallel imports may cause BitKeeper consistency problems.
       -g<gap>      Change or disable the gap used to cluster changeset group-
                    ing.  A gap of 0 clusters all changes into one big change-
                    set;  a gap of non-zero clusters changes which happen less
                    than that time span apart.  The value is in  minutes  with
                    the default set to 10.
       -H<hostname> Set  the  hostname used for the creation of any new deltas
                    during the import.
       -i           Prompts for a regular expression to apply to the  list  of
                    files.   All matches are included. (For use with all types
                    except patches.)
       -l<file>     Use the list of files in <file>.  (For use with all  types
                    except patches.)
       -q           Be quiet.
       -S<sym>      Add tag <sym> to the changeset created around the import
       -t<type>     Specify import file type.  <type> can be one of:

                    plain Import plain text files
                    patch Import a patch (diffs)
                    RCS   Import RCS files
                    CVS   Import  CVS  files. The only difference from "-tRCS"
                          is that Attic directories are processed and  deleted
                          files  are  detected.   All  RCS options may be used
                          with CVS imports.
                    MKS   Import MKS Source Integrity files.   The  files  are
                          stripped  of  the ext field, moved from rcs directo-
                          ries to RCS directories, a ,v suffix  is  added  and
                          then  the normal RCS processing is applied.  All RCS
                          options may be used with MKS imports.
                    SCCS  Import SCCS files
       -v           Be verbose.
       -x           Prompts for a regular expression to apply to the  list  of
                    files.  All matches are excluded.  (For use with all types
                    except patches.)

RCS OPTIONS
       -h           turn off verification of contents (faster, less safe).
       -T           Do not import tags. The default is to import tags.
       -u           Run files through bk undos first; this  will  convert  DOS
                    style end of lines to Unix style end of lines.

PATCH OPTIONS
       -p<num>      Strip   the   smallest  prefix  containing  <num>  leading
                    slashes from each file name found in the patch file.
       -r           Do not do rename processing when doing patch imports.
       -R           If a patch fails to apply cleanly,  back  out  the  entire
                    operation and exit with a failure.
       -y<comment>  Set  the  message  for the delta comments for all files to
                    <comment> rather than "Import patch PATCHNAME."
       -z<fuzz>     Control the acceptance of fuzz by bk patch by passing  the
                    argument  "-F<fuzz>"  to  bk patch rather than the default
                    "-F0" , which indicates strict matching.  See the bk  help
                    patch man page for further information.

IMPORTING PATCHES
       BitKeeper  can  be  used  to  track  external work by importing patches
       ("diff -Nur") into a BitKeeper package.  BitKeeper can help with  patch
       import  problems,  namely  that  renames  are not tracked well and that
       there generally aren't very good comments if any at all attached to the
       changes  being  made.  A rename in a patch is viewed as the deletion of
       one file and the creation of another file, so to track these, bk import
       will  launch bk renametool which is the graphical tool used to manually
       match the deleted files with the newly created files.

IMPORTING RCS (AND CVS OR MKS) FILES
       The default branch of the RCS tree is the one that  will  be  imported.
       No  other  branches  are  imported,  branch imports are on a consulting
       basis only.  All metadata, such as dates, times,  user  names,  checkin
       comments, and symbolic tags are preserved on import.

       This  type  of  import requires RCS 5.6 or later to be installed on the
       importing system.

IMPORTING PLAIN TEXT
       Importing a plain text file into a BitKeeper package can only  be  done
       once.  If there is already a file in the package that has the same name
       as a file to be imported the import will fail.

       If a package is already populated with files use the "-i", "-x" or "-l"
       options  to  avoid  trying  to  import  files  already  in the package.
       Because of the preceding constraints, import  does  not  catch  renames
       with plain text files.  If a file has been renamed, it can be imported,
       but the original file will still exist in the package so it  is  neces-
       sary to remove the original file from the package tree after the import
       of the renamed file.

       Plain text files can be imported from a directory,

           bk import /path/to/src_files ~/package

       from a list of files relative to the source directory,

           bk import -l/tmp/list /path/to/src_files ~/package

       or by using regular expressions in interactive mode

           bk import -ix ~/src_files ~/package
           End patterns with . by itself or EOF
           File name pattern to include>> *.c
           File name pattern to include>> *.h
           File name pattern to include>> Makefile
           File name pattern to include>> .
           End patterns with . by itself or EOF
           File name pattern to exclude>> *.o
           File name pattern to exclude>> .

IMPORTING SCCS FILES
       Teamware and other SCCS files can be imported.  The history of the file
       is  preserved,  but  the unmerged branches are discarded.  This is okay
       because the necessary metadata is in the mainline.

       Importing BitKeeper files is not supported; use bk clone.

ERROR HANDLING
       Import does not handle all errors in a robust  way.   If  unsuccessful,
       import may leave work half done in the destination package.  It is sug-
       gested that the import destination repository is a clone of the  origi-
       nal package in case of a failed import.

SEE ALSO
       bk log
       bk undos

CATEGORY
       Repository

BitKeeper Inc                         1E1                 bk import(7.3ce-rc1)