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.

Bug 27997 - Force commit does not work on files that are not in root
Summary: Force commit does not work on files that are not in root
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: vcsgeneric (show other bugs)
Version: 3.x
Hardware: PC Linux
: P1 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
: 31798 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-10-14 17:25 UTC by David Kaspar
Modified: 2003-06-09 14:37 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The contextual diff. (2.38 KB, patch)
2003-04-24 15:36 UTC, Martin Entlicher
Details | Diff
The binary patch, that fix this problem. Put into <NB-install>/modules/patches/org-netbeans-modules-vcs-profiles-cvsprofiles/ folder. (6.98 KB, application/octet-stream)
2003-04-24 15:38 UTC, Martin Entlicher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Kaspar 2002-10-14 17:25:27 UTC
How to reproduce:
1) Create CVS structure like this:
- root
  |- dir
  |  ` subfile [uptodate]
  '- file [uptodate]
2) Try "Force" commit on file -> All OK
3) Try "Force" commit on subfile -> ERROR - File
is not commited - In the "Output Window -
Versioning" there is message:
Nothing known about file subfile.
Comment 1 Martin Entlicher 2002-10-23 19:27:33 UTC
There is missing a part of the file path. It's a bug in CvsCommit
class.
Comment 2 Jiri Kovalsky 2003-02-12 11:00:23 UTC
Hm, in such case it's a regression, because this works fine in
NetBeans 3.4.
Comment 3 akemp 2003-03-07 18:51:01 UTC
This is also an issue with Win2k.  Using NB3.5Dev and the CVS-external
Command Line system, if I "add" a file and then "commit" it, I get a
"nothing known about file xxxx" CVS error.  The little bit of
information I've been able to find about this error suggests that cvs
should be run from within the same directory as the file being
committed.  In Win2k's case:
For:
  /WorkingDir/Adir/Bdir/FileToCommit
/WorkingDir/Adir/Bdir: /cygwin/bin/cvs.exe commit FileToCommit

  Everything works well under the built-in CVS client.
Comment 4 Tomas Zezula 2003-03-10 10:31:48 UTC
Scheduled for 4.0.
Workaround:
Use JavaCVS for this.
Comment 5 arittner 2003-04-23 16:57:55 UTC
I run in the same problem - but waiting for 4.0 is not a 
result for me. javacvs does not work with a remote cvs-
repository (see issue #33158) and generic cvs ignores the 
package structure. 
Is it a problem with the command-template?

COMMIT_CMD changes the directory with ${RUNCDM} but (eg.) 
DIFF_TEXT with ${RUNCDW}. DIFF_TEXT changes the directory 
on the right way but COMMIT_CMD stay on root. 

Hm, with changed exec-template to "${RUNCDW} ..." I get 
the same root-directory. COMMIT_CMD ignores ${RUNCDW} or 
can't resolve the right path. 
Or COMMIT_TEMPLATE_GETTER does not resolve the right 
package for the file. 

Hm, however - IMHO it should be fixed for 3.5.

regards,
  josh.
Comment 6 dmladek 2003-04-23 17:08:39 UTC
Seems like a DEADLOCK for Josh :-(
Could we realy try to fix those 2 issues, please?
Icreasing to P2
Comment 7 Martin Entlicher 2003-04-24 11:22:37 UTC
The are probably some variables badly set. I guess the bug is in
CvsCommit.java in cvs-profile module.
Comment 8 Martin Entlicher 2003-04-24 12:46:50 UTC
The paths, that are given to the forced commit are corrected in the
main trunk:

/cvs/vcsgeneric/profiles/cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/commands/CvsCommit.java,v 
<--  CvsCommit.java
new revision: 1.12; previous revision: 1.11

So [Up-to-date] files can be committed when forced.

But there's one remaining problem, which is hard to fix:
- when you have .java and .form file and only .java file is modified
(e.g. TestFrame [Locally Modified, Up-to-date; 1.1]) and you want to
preserve the same revision for both after commit (1.2) this will not
work, because even when you select "Force to Commit", only the
modified .java file will be committed.
Comment 9 Martin Entlicher 2003-04-24 15:32:24 UTC
Issue #33225 submitted for the remaining problem. Also I'm increasing
this ro P1, because the Force Commit option is unusable.
Comment 10 Martin Entlicher 2003-04-24 15:36:15 UTC
Created attachment 10144 [details]
The contextual diff.
Comment 11 Martin Entlicher 2003-04-24 15:38:20 UTC
Created attachment 10145 [details]
The binary patch, that fix this problem. Put into <NB-install>/modules/patches/org-netbeans-modules-vcs-profiles-cvsprofiles/ folder.
Comment 12 Jiri Kovalsky 2003-04-24 15:57:47 UTC
Okay, it seems working. I could conveniently force commit of any files
except the multidataobject case mentioned above. Applied
Patch27997.jar patch fixed the problem. Tested in NetBeans 3.5 build
#2003222350 with JDK 1.4.0 build #02 on Windows 2000.
Comment 13 Richard Gregor 2003-04-24 15:58:16 UTC
Reviewed without objections.
Comment 14 _ ttran 2003-04-24 16:14:58 UTC
approved for 3.5
Comment 15 Martin Entlicher 2003-04-24 16:41:03 UTC
Thanks for the verification, review and approval.

The problem is fixed in release35 branch:

/shared/data/helm/cvs/repository/vcsgeneric/profiles/cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/commands/CvsCommit.java,v 
<--  CvsCommit.java
new revision: 1.9.2.2; previous revision: 1.9.2.1
Comment 16 arittner 2003-04-24 19:06:24 UTC
Thanx for your great job :D
Comment 17 arittner 2003-04-25 13:39:38 UTC
Ok, today I've tested the patch with different packages. 
It's ok - the patch runs for me. Thank you. 

greetings,
  josh.
Comment 18 Martin Entlicher 2003-04-30 09:49:18 UTC
*** Issue 31798 has been marked as a duplicate of this issue. ***
Comment 19 dmladek 2003-06-09 14:37:07 UTC
OK in NB35 #200306022350