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