KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ccvs > core > client > Log


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.team.internal.ccvs.core.client;
12
13 import org.eclipse.core.runtime.IProgressMonitor;
14 import org.eclipse.team.internal.ccvs.core.CVSException;
15 import org.eclipse.team.internal.ccvs.core.ICVSResource;
16
17 public class Log extends AbstractMessageCommand {
18     /*** Local options: specific to log ***/
19     
20     public static LocalOption makeRevisionOption(String JavaDoc revision) {
21         return new LocalOption("-r" + revision, null); //$NON-NLS-1$
22
}
23     public static final LocalOption RCS_FILE_NAMES_ONLY = new LocalOption("-R"); //$NON-NLS-1$
24

25     public static final LocalOption NO_TAGS = new LocalOption("-N"); //$NON-NLS-1$
26

27     protected Log() { }
28     protected String JavaDoc getRequestId() {
29         return "log"; //$NON-NLS-1$
30
}
31     
32     protected ICVSResource[] sendLocalResourceState(Session session, GlobalOption[] globalOptions,
33         LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
34         throws CVSException {
35         
36         // Send all folders that are already managed to the server
37
boolean sendEmptyFolders = Command.findOption(localOptions, RCS_FILE_NAMES_ONLY.getOption()) != null;
38         new FileStructureVisitor(session, localOptions, sendEmptyFolders, false /* send modified contents */).visit(session, resources, monitor);
39         return resources;
40     }
41 }
42
43
Popular Tags