This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 51363
Collapse All | Expand All

(-)libsrc/org/netbeans/lib/cvsclient/command/history/HistoryCommand.java (-1 / +29 lines)
Lines 113-118 Link Here
113
113
114
    /** Holds value of property forUsers. */
114
    /** Holds value of property forUsers. */
115
    private String[] forUsers;
115
    private String[] forUsers;
116
    
117
    /** Holds value of property reportOnRepository. */
118
    private String[] reportOnRepository;
116
119
117
    /**
120
    /**
118
     * Construct a new history command
121
     * Construct a new history command
Lines 166-171 Link Here
166
            addStringArrayArgument(requests, getReportLastEventForModule(), "-n"); //NOI18N
169
            addStringArrayArgument(requests, getReportLastEventForModule(), "-n"); //NOI18N
167
            addStringArrayArgument(requests, getReportOnModule(), "-m"); //NOI18N
170
            addStringArrayArgument(requests, getReportOnModule(), "-m"); //NOI18N
168
            addStringArrayArgument(requests, getLastEventForFile(), "-f"); //NOI18N
171
            addStringArrayArgument(requests, getLastEventForFile(), "-f"); //NOI18N
172
            addStringArrayArgument(requests, getReportOnRepository(), "-p"); //NOI18N
169
            if (!isReportCheckouts() && !isReportCommits() && !isReportTags() &&
173
            if (!isReportCheckouts() && !isReportCommits() && !isReportTags() &&
170
                    !isReportEverything() && getReportEventType() == null && getReportOnModule() == null) {
174
                    !isReportEverything() && getReportEventType() == null && getReportOnModule() == null) {
171
                // this is the default switch if nothing else is specified.
175
                // this is the default switch if nothing else is specified.
Lines 285-290 Link Here
285
        else if (opt == 'u') {
289
        else if (opt == 'u') {
286
            addForUsers(optArg);
290
            addForUsers(optArg);
287
        }
291
        }
292
        else if (opt == 'p') {
293
     		addReportOnRepository(optArg);
294
        }
288
        else {
295
        else {
289
            return false;
296
            return false;
290
        }
297
        }
Lines 295-301 Link Here
295
     * String returned by this method defines which options are available for this particular command
302
     * String returned by this method defines which options are available for this particular command
296
     */
303
     */
297
    public String getOptString() {
304
    public String getOptString() {
298
        return "ab:cD:ef:lm:n:or:Tt:u:wx:z:"; //NOI18N
305
        return "ab:cD:ef:lm:n:op:r:Tt:u:wx:z:"; //NOI18N
299
    }
306
    }
300
307
301
    /**
308
    /**
Lines 366-371 Link Here
366
        if (getReportOnModule() != null) {
373
        if (getReportOnModule() != null) {
367
            appendArrayToSwitches(toReturn, getReportOnModule(), "-m "); //NOI18N
374
            appendArrayToSwitches(toReturn, getReportOnModule(), "-m "); //NOI18N
368
        }
375
        }
376
        if (getReportOnRepository() != null) {
377
         appendArrayToSwitches(toReturn, getReportOnRepository(), "-p "); //NOI18N
378
        }
369
        if (getShowBackToRecordContaining() != null) {
379
        if (getShowBackToRecordContaining() != null) {
370
            toReturn.append("-b "); //NOI18N
380
            toReturn.append("-b "); //NOI18N
371
            toReturn.append(getShowBackToRecordContaining());
381
            toReturn.append(getShowBackToRecordContaining());
Lines 658-663 Link Here
658
668
659
    public void addForUsers(String forUser) {
669
    public void addForUsers(String forUser) {
660
        this.forUsers = addNewValue(this.forUsers, forUser);
670
        this.forUsers = addNewValue(this.forUsers, forUser);
671
    }
672
673
    public void addReportOnRepository(String repository) {
674
        this.reportOnRepository = addNewValue(this.reportOnRepository, repository);
675
    }
676
677
    /** Getter for property reportOnRepository. (cvs switch -p)
678
     * @return Value of property reportOnRepository.
679
     */
680
    public String[] getReportOnRepository() {
681
        return this.reportOnRepository;
682
    }
683
684
    /** Setter for property reportOnRepository. (cvs switch -p)
685
     * @param reportOnRepository New value of property reportOnRepository.
686
     */
687
    public void setReportOnRepository(String[] reportOnRepository) {
688
        this.reportOnRepository = reportOnRepository;
661
    }
689
    }
662
690
663
    private String[] addNewValue(String[] arr, String newVal) {
691
    private String[] addNewValue(String[] arr, String newVal) {

Return to bug 51363