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