- 25 4月, 2012 3 次提交
-
-
由 Luke Diamand 提交于
The verbose flag is common to all classes, or at least should be. Make it a member of the base Command class, rather than reimplementing for each class. Make option parsing mirror this. Signed-off-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Luke Diamand 提交于
p4 itself treats an empty value for P4EDITOR as the same as having P4EDITOR unset. Do the same for "git p4". Signed-off-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Luke Diamand 提交于
The previous one is already in 'next' but was somewhat lacking. The configuration "git-p4.validLabelRegexp" is now called "labelExportRegexp", and its default covers lowercase alphabets as well. Signed-off-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 12 4月, 2012 1 次提交
-
-
由 Luke Diamand 提交于
The existing label import code looks at each commit being imported, and then checks for labels at that commit. This doesn't work in the real world though because it will drop labels applied on changelists that have already been imported, a common pattern. This change adds a new --import-labels option. With this option, at the end of the sync, git p4 gets sets of labels in p4 and git, and then creates a git tag for each missing p4 label. This means that tags created on older changelists are still imported. Tags that could not be imported are added to an ignore list. The same sets of git and p4 tags and labels can also be used to derive a list of git tags to export to p4. This is enabled with --export-labels in 'git p4 submit'. Signed-off-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 10 4月, 2012 2 次提交
-
-
由 Pete Wyckoff 提交于
In messages to the user and comments, change "git-p4" to "git p4". Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
Move git-p4 out of contrib/fast-import into the main code base, aside other foreign SCM tools. Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 27 2月, 2012 2 次提交
-
-
由 Pete Wyckoff 提交于
When the --use-client-spec is given to clone, and the clone path is a subset of the full tree as specified in the client, future submits will go to the wrong place. Factor out getClientSpec() so both clone/sync and submit can use it. Introduce getClientRoot() that is needed for the client spec case, and use it instead of p4Where(). Test the five possible submit behaviors (add, modify, rename, copy, delete). Reported-by: NLaurent Charrière <lcharriere@promptu.com> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
If --use-client-spec was given, set the matching configuration variable. This is necessary to ensure that future submits work properly. The alternatives of requiring the user to set it, or providing a command-line option on every submit, are error prone. Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 24 2月, 2012 1 次提交
-
-
由 Luke Diamand 提交于
RCS keywords cause problems for git-p4 as perforce always expands them (if +k is set) and so when applying the patch, git reports that the files have been modified by both sides, when in fact they haven't. This change means that when git-p4 detects a problem applying a patch, it will check to see if keyword expansion could be the culprit. If it is, it strips the keywords in the p4 repository so that they match what git is expecting. It then has another go at applying the patch. This behaviour is enabled with a new git-p4 configuration option and is off by default. Acked-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 23 2月, 2012 1 次提交
-
-
由 Russell Myers 提交于
This was broken since the feature was introduced initially at abcaf073 (If the user has configured various parameters, use them., 2008-08-10). Acked-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 27 1月, 2012 2 次提交
-
-
由 Pete Wyckoff 提交于
Change p4 command invocation to avoid going through the shell. This allows names with spaces and wildcards to work. Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NVitor Antunes <vitor.hda@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Vitor Antunes 提交于
To find out which is its parent the commit of the new branch is compared sequentially to each blob of the parent branch from the newest to the oldest. The first blob which results in a zero diff is considered the parent commit. If none is found, then the commit is applied to the top of the parent branch. A fast-import "checkpoint" call is required because diff-tree is only able to work with blobs on disk. But most of these commits will not be part of the final imported tree, making fast-import fail. To avoid this, the temporary branches are tracked and then removed at the end of the import process. Signed-off-by: NVitor Antunes <vitor.hda@gmail.com> Acked-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 21 1月, 2012 3 次提交
-
-
由 Luke Diamand 提交于
In p4, the Owner field is optional. If it is missing, construct something sensible rather than crashing. Signed-off-by: NLuke Diamand <luke@diamand.org> Acked-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Luke Diamand 提交于
Use an explicit length for the data in a label, rather than EOT, so that labels with empty descriptions are passed through correctly. Signed-off-by: NLuke Diamand <luke@diamand.org> Acked-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Luke Diamand 提交于
Don't use shell expansion when detecting branches, as it will fail if the branch name contains a shell metachar. Similarly for labels. Add additional test for branches with shell metachars. Signed-off-by: NLuke Diamand <luke@diamand.org> Acked-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 12 1月, 2012 3 次提交
-
-
由 Pete Wyckoff 提交于
Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
Catch the case where a ... exists at the end, and also elsehwere. Reported-by: NGary Gibbons <ggibbons@perforce.com> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 04 1月, 2012 4 次提交
-
-
由 Pete Wyckoff 提交于
The old code was not very complete or robust. Redo it. This new code should be useful for a few possible additions in the future: - support for * and %%n wildcards - allowing ... inside paths - representing branch specs (not just client specs) - tracking changes to views Mark the remaining 12 tests in t9809 as fixed. Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Gary Gibbons 提交于
Perforce client views can map individual files, mapping one //depot file path to one //client file path. These mappings contain no meta/masking characters. This patch add support for these file maps to the currently supported '...' view mappings. [pw: one test now suceeds] Signed-off-by: NGary Gibbons <ggibbons@perforce.com> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Gary Gibbons 提交于
Correct view sorting to support the Perforce order, where client views are ordered and later views override earlier view mappings. [pw: one test now succeeds] Signed-off-by: NGary Gibbons <ggibbons@perforce.com> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Gary Gibbons 提交于
Change re method in test for unsupported Client View types (containing %% or *) anywhere in the string rather than at the begining. [pw: two tests now succeed] Signed-off-by: NGary Gibbons <ggibbons@perforce.com> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 28 12月, 2011 4 次提交
-
-
由 Pete Wyckoff 提交于
Clarify there is a -M option, but no -C. These are both configurable through variables. Explain that the allowSubmit variable takes a comma-separated list of branch names. Catch earlier an invalid branch name given as an argument to "git p4 clone". Test option --origin, variable allowSubmit, and explicit master branch name. Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
The depot path is required, even with this option. Make sure git-p4 fails and exits with non-zero. Contents in the specified depot path will be rearranged according to the client spec. Test this and add a note in the docs. Leave an XXX suggesting that this is somewhat confusing behavior that might be good to fix later. Function stripRepoPath() looks at self.useClientSpec. Make sure this is set both for command-line option --use-client-spec and for configuration variable git-p4.useClientSpec. Test this. Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
When an explicit list of changes is given, it makes no sense to use @all or @3,5 or any of the other p4 revision specifiers. Make the code notice when this happens, instead of just ignoring --changesfile. Test it. Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
Complain if --git-dir is given during a clone. It has no effect. Only --destination and --bare can change where the newly cloned git dir will be. Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 18 12月, 2011 1 次提交
-
-
由 Pete Wyckoff 提交于
Commit 7c766e57 (git-p4: introduce skipSubmitEdit, 2011-12-04) made it easier to automate submission to p4, but broke the most common case. Add a test for when the user really does edit and save the change template, and fix the bug that causes the test to fail. Also add a confirmation message when submission is cancelled. Reported-by: NMichael Horowitz <michael.horowitz@ieee.org> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 12 12月, 2011 2 次提交
-
-
由 Gary Gibbons 提交于
P4 only looks at the environment variable $PWD to figure out where it is, so chdir() has code to set that every time. But when the clone --destination is not an absolute path, PWD will not be absolute and P4 won't be able to find any files expected to be in the current directory. Fix this by expanding PWD to an absolute path. One place this crops up is when using a P4CONFIG environment variable to specify P4 parameters, such as P4USER or P4PORT. Setting P4CONFIG=.p4config works for p4 invocations from the current directory. But if the value of PWD is not absolute, it fails. [ update description --pw ] Signed-off-by: NGary Gibbons <ggibbons@perforce.com> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Gary Gibbons 提交于
Submitting patches back to p4 requires a p4 "client". This is a mapping from server depot paths into a local directory. The directory need not exist or be populated with files; only the mapping on the server is required. When there is no directory, make git-p4 automatically create it. [ reword description --pw ] Signed-off-by: NGary Gibbons <ggibbons@perforce.com> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 06 12月, 2011 1 次提交
-
-
由 Pete Wyckoff 提交于
Add a configuration variable to skip invoking the editor in the submit path. The existing variable skipSubmitEditCheck continues to make sure that the submit template was indeed modified by the editor; but, it is not considered if skipSubmitEdit is true. Reported-by: NLoren A. Linden Levy <lindenle@gmail.com> Acked-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 06 11月, 2011 1 次提交
-
-
由 Pete Wyckoff 提交于
Revert 97a21ca5 (git-p4: stop ignoring apple filetype, 2011-10-16) and add a test case. Reported-by: NMichael Wookey <michaelwookey@gmail.com> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 18 10月, 2011 5 次提交
-
-
由 Pete Wyckoff 提交于
Currently "apple" filetype is ignored explicitly, and the file is not even included in the git repository. This seems wrong. Remove this, letting it be treated like a "binary" filetype. Acked-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Luke Diamand 提交于
git-p4 used to simply pass strings into system() and popen(), and relied on the shell doing the necessary expansion. This though meant that shell metacharacters in file names would be corrupted - for example files with $ or space in them. Switch to using subprocess.Popen() and friends, and pass in explicit arrays in the places where it matters. This then avoids needing shell expansion. Add trivial helper functions for some common perforce operations. Add test case. [pw: test cleanup] Signed-off-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
The previous code was approximate in the filetypes it recognized. Put in the canonical list and be more careful about matching elements of the file type. This might change behavior in some cases, hopefully for the better. Windows newline mangling will now happen on all text files. Previously some like "text+ko" were oddly exempt. Files with multiple combinations of modifiers, like "text+klx", are now recognized for keyword expansion. I expect these to be seen only rarely. Acked-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
Join the text before looking for keywords. There is nothing to prevent the p4 output marshaller from splitting in the middle of a keyword, although it has never been known to happen. Also remove the (?i) regexp modifier; perforce keywords are documented as case-sensitive. Remove the "\n" end-character match. I don't know why that is in there, and every keyword in a fairly large production p4 repository always ends with a $. Acked-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
One of the filetypes that p4 supports is utf16. Its behavior is odd in this case. The data delivered through "p4 -G print" is not encoded in utf16, although "p4 print -o" will produce the proper utf16-encoded file. When dealing with this filetype, discard the data from -G, and instead read the contents directly. An alternate approach would be to try to encode the data in python. That worked for true utf16 files, but for other files marked as utf16, p4 delivers mangled text in no recognizable encoding. Add a test case to check utf16 handling, and +k and +ko handling. Reported-by: NChris Li <git@chrisli.org> Acked-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 23 8月, 2011 4 次提交
-
-
由 Vitor Antunes 提交于
Perforce does not strictly require the usage of branch specifications to create branches. In these cases the branch detection code of git-p4 will not be able to import them. This patch adds support for git-p4.branchList configuration option, allowing branches to be defined in git config. Signed-off-by: NVitor Antunes <vitor.hda@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Vitor Antunes 提交于
All branches in the Perforce server are downloaded to allow branch detection. If you have a centralized server on a remote location and there is a big number of branches this operation can take some time. This patch adds the configuration option git-p4.branchUser to allow filtering the branch list by user. Although this limits the branch maintenance in Perforce to be done by a single user, it might be an advantage when the number of branches being used in a specific depot is very small when compared with the branches available in the server. Signed-off-by: NVitor Antunes <vitor.hda@gmail.com> Acked-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Vitor Antunes 提交于
When branch detection is enabled each branch is named in git after their relative depot path in Perforce. To do this the depot paths are compared against each other to find their common base path. The current algorithm makes this comparison on a character by character basis. Assuming we have the following branches: //depot/branches/featureA //depot/branches/featureB Then the base depot path would be //depot/branches/feature, which is an invalid depot path. The current patch fixes this by splitting the path into a list and comparing the list entries, making it choose correctly //depot/branches as the base path. Signed-off-by: NVitor Antunes <vitor.hda@gmail.com> Acked-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Vitor Antunes 提交于
Signed-off-by: NVitor Antunes <vitor.hda@gmail.com> Acked-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-