Skip to main content
summaryrefslogtreecommitdiffstats
blob: 37b1f104c1f1f245b1dfc00b73c9f5d1192573c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*******************************************************************************
 * Copyright (c) 2016 Obeo and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     Obeo - initial API and implementation
 *******************************************************************************/
package org.eclipse.emf.compare.ide.ui.tests.git.framework.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.eclipse.core.resources.IProject;
import org.eclipse.emf.compare.ide.ui.tests.git.framework.GitTestSupport;
import org.eclipse.jgit.api.CherryPickResult;
import org.eclipse.jgit.api.Status;
import org.eclipse.jgit.lib.Repository;

/**
 * Annotation used to test the cherry-pick of models.
 * <p>
 * The test method may take the following arguments in an arbitrary order. Note that you also may only accept
 * a subset of these in the signature of the test method:
 * </p>
 * <ul>
 * <li>{@link Status}</li>
 * <li>{@link Repository}</li>
 * <li>List<{@link IProject}></li>
 * <li>{@link CherryPickResult}</li>
 * <li>{@link GitTestSupport}</li>
 * </ul>
 * 
 * <pre>
 * For instance, the signature of the test method may be:
 * public void doTest({@link Status} status, {@link Repository} repository, 
 * 	List<{@link IProject}> projects) {}
 * 
 * If you want to be able to perform extra manipulation on the repository in your 
 * test case (merge, checkout, comparison), you can take the {@link GitTestSupport}
 * as a parameter:
 * public void doTest({@link Status} status, {@link Repository} repository, 
 * 	List<{@link IProject}> projects, {@link GitTestSupport} support) {}
 * </pre>
 * 
 * @author <a href="mailto:mathieu.cartaud@obeo.fr">Mathieu Cartaud</a>
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface GitCherryPick {

	/**
	 * The name of the local branch. User can specified qualified name or simple name (i.e.
	 * refs/heads/myBranch or myBranch).
	 * 
	 * <pre>
	 * The qualified name of the branch used for the test will always be on the format refs/heads/... which
	 * means it is not possible to make a comparison on a Gerrit like branch (refs/for/...)
	 * </pre>
	 * 
	 * @return the local branch
	 */
	String local();

	/**
	 * The name of the remote branch. User can specified qualified name or simple name (i.e.
	 * refs/heads/myBranch or myBranch).
	 * 
	 * <pre>
	 * The qualified name of the branch used for the test will always be on the format refs/heads/... which
	 * means it is not possible to make a comparison on a Gerrit like branch (refs/for/...)
	 * </pre>
	 * 
	 * @return the remote branch
	 */
	String remote();

}

Back to the top