Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | git-cvsexportcommit(1) |
| 2 | ====================== |
| 3 | |
| 4 | NAME |
| 5 | ---- |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 6 | git-cvsexportcommit - Export a single commit to a CVS checkout |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 11 | [verse] |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 12 | 'git cvsexportcommit' [-h] [-u] [-v] [-c] [-P] [-p] [-a] [-d cvsroot] |
| 13 | [-w cvsworkdir] [-W] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 14 | |
| 15 | |
| 16 | DESCRIPTION |
| 17 | ----------- |
| 18 | Exports a commit from GIT to a CVS checkout, making it easier |
Junio C Hamano | a77a513 | 2007-06-08 16:13:44 | [diff] [blame] | 19 | to merge patches from a git repository into a CVS repository. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 20 | |
Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 21 | Specify the name of a CVS checkout using the -w switch or execute it |
| 22 | from the root of the CVS working copy. In the latter case GIT_DIR must |
| 23 | be defined. See examples below. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 24 | |
Junio C Hamano | a77a513 | 2007-06-08 16:13:44 | [diff] [blame] | 25 | It does its best to do the safe thing, it will check that the files are |
| 26 | unchanged and up to date in the CVS checkout, and it will not autocommit |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 27 | by default. |
| 28 | |
| 29 | Supports file additions, removals, and commits that affect binary files. |
| 30 | |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 31 | If the commit is a merge commit, you must tell 'git cvsexportcommit' what |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 32 | parent the changeset should be done against. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 33 | |
| 34 | OPTIONS |
| 35 | ------- |
| 36 | |
| 37 | -c:: |
| 38 | Commit automatically if the patch applied cleanly. It will not |
| 39 | commit if any hunks fail to apply or there were other problems. |
| 40 | |
| 41 | -p:: |
Junio C Hamano | 75cc4c9 | 2006-07-24 08:25:03 | [diff] [blame] | 42 | Be pedantic (paranoid) when applying patches. Invokes patch with |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 43 | --fuzz=0 |
| 44 | |
Junio C Hamano | 75cc4c9 | 2006-07-24 08:25:03 | [diff] [blame] | 45 | -a:: |
| 46 | Add authorship information. Adds Author line, and Committer (if |
| 47 | different from Author) to the message. |
| 48 | |
Junio C Hamano | 118d277 | 2007-02-21 20:24:10 | [diff] [blame] | 49 | -d:: |
| 50 | Set an alternative CVSROOT to use. This corresponds to the CVS |
| 51 | -d parameter. Usually users will not want to set this, except |
| 52 | if using CVS in an asymmetric fashion. |
| 53 | |
Junio C Hamano | 0fd4dbd | 2006-05-14 09:22:52 | [diff] [blame] | 54 | -f:: |
| 55 | Force the merge even if the files are not up to date. |
| 56 | |
Junio C Hamano | 42f855f | 2007-02-06 00:09:38 | [diff] [blame] | 57 | -P:: |
| 58 | Force the parent commit, even if it is not a direct parent. |
| 59 | |
Junio C Hamano | 0fd4dbd | 2006-05-14 09:22:52 | [diff] [blame] | 60 | -m:: |
Junio C Hamano | a77a513 | 2007-06-08 16:13:44 | [diff] [blame] | 61 | Prepend the commit message with the provided prefix. |
Junio C Hamano | 0fd4dbd | 2006-05-14 09:22:52 | [diff] [blame] | 62 | Useful for patch series and the like. |
| 63 | |
Junio C Hamano | 591dc6a | 2007-05-29 09:18:19 | [diff] [blame] | 64 | -u:: |
Junio C Hamano | a638742 | 2007-08-25 03:54:27 | [diff] [blame] | 65 | Update affected files from CVS repository before attempting export. |
Junio C Hamano | 591dc6a | 2007-05-29 09:18:19 | [diff] [blame] | 66 | |
Junio C Hamano | f43de60 | 2009-06-18 20:54:10 | [diff] [blame] | 67 | -k:: |
| 68 | Reverse CVS keyword expansion (e.g. $Revision: 1.2.3.4$ |
| 69 | becomes $Revision$) in working CVS checkout before applying patch. |
| 70 | |
Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 71 | -w:: |
| 72 | Specify the location of the CVS checkout to use for the export. This |
| 73 | option does not require GIT_DIR to be set before execution if the |
Junio C Hamano | feeb1be | 2008-05-22 00:53:35 | [diff] [blame] | 74 | current directory is within a git repository. The default is the |
| 75 | value of 'cvsexportcommit.cvsdir'. |
Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 76 | |
Junio C Hamano | dfccbb0 | 2008-05-26 01:16:14 | [diff] [blame] | 77 | -W:: |
| 78 | Tell cvsexportcommit that the current working directory is not only |
| 79 | a Git checkout, but also the CVS checkout. Therefore, Git will |
| 80 | reset the working directory to the parent commit before proceeding. |
| 81 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 82 | -v:: |
| 83 | Verbose. |
| 84 | |
Junio C Hamano | feeb1be | 2008-05-22 00:53:35 | [diff] [blame] | 85 | CONFIGURATION |
| 86 | ------------- |
| 87 | cvsexportcommit.cvsdir:: |
| 88 | The default location of the CVS checkout to use for the export. |
| 89 | |
Junio C Hamano | 2e55244 | 2006-01-30 07:39:30 | [diff] [blame] | 90 | EXAMPLES |
| 91 | -------- |
| 92 | |
| 93 | Merge one patch into CVS:: |
| 94 | + |
| 95 | ------------ |
| 96 | $ export GIT_DIR=~/project/.git |
| 97 | $ cd ~/project_cvs_checkout |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 98 | $ git cvsexportcommit -v <commit-sha1> |
Junio C Hamano | 1974bf2 | 2007-10-31 05:57:20 | [diff] [blame] | 99 | $ cvs commit -F .msg <files> |
Junio C Hamano | 2e55244 | 2006-01-30 07:39:30 | [diff] [blame] | 100 | ------------ |
| 101 | |
Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 102 | Merge one patch into CVS (-c and -w options). The working directory is within the Git Repo:: |
| 103 | + |
| 104 | ------------ |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 105 | $ git cvsexportcommit -v -c -w ~/project_cvs_checkout <commit-sha1> |
Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 106 | ------------ |
| 107 | |
Junio C Hamano | 6926bef | 2007-06-16 09:54:05 | [diff] [blame] | 108 | Merge pending patches into CVS automatically -- only if you really know what you are doing:: |
Junio C Hamano | 2e55244 | 2006-01-30 07:39:30 | [diff] [blame] | 109 | + |
| 110 | ------------ |
| 111 | $ export GIT_DIR=~/project/.git |
| 112 | $ cd ~/project_cvs_checkout |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 113 | $ git cherry cvshead myhead | sed -n 's/^+ //p' | xargs -l1 git cvsexportcommit -c -p -v |
Junio C Hamano | 2e55244 | 2006-01-30 07:39:30 | [diff] [blame] | 114 | ------------ |
| 115 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 116 | GIT |
| 117 | --- |
Junio C Hamano | f7c042d | 2008-06-06 22:50:53 | [diff] [blame] | 118 | Part of the linkgit:git[1] suite |