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 246671 - CVS can't commit; Weird statuses in diff after a tree conflict in a file
Summary: CVS can't commit; Weird statuses in diff after a tree conflict in a file
Status: NEW
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: CVS (show other bugs)
Version: 8.0
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-25 09:13 UTC by Zom-B
Modified: 2014-08-25 14:34 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
update log (1.44 KB, text/plain)
2014-08-25 09:14 UTC, Zom-B
Details
commit log (617 bytes, text/plain)
2014-08-25 09:14 UTC, Zom-B
Details
screenshot (92.64 KB, image/png)
2014-08-25 09:14 UTC, Zom-B
Details
ide-log (81.51 KB, text/plain)
2014-08-25 11:45 UTC, Zom-B
Details
cvs-log (25.90 KB, image/png)
2014-08-25 11:45 UTC, Zom-B
Details
cvslog.in (2.23 KB, application/octet-stream)
2014-08-25 12:28 UTC, Zom-B
Details
cvslog.out (3.46 KB, application/octet-stream)
2014-08-25 12:28 UTC, Zom-B
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zom-B 2014-08-25 09:13:35 UTC
There's a project that I can't commit. When I do 'commit', it acts like it's working, but the project keeps being marked with a blue barrel and updating on other computers results in the old file versions. (see cvs-update-log.txt)

Some of the weirdness I see in the diff (see attached image):
- Changed files appear with status "Up to date", but when clicked on them, the differences panel shows actual changes,
- It shows old files that I deleted (within NB), some with status "Unknown" some with status "Locally New", and some with no status at all (empty cell).

These old files don't exist locally (hell, even the directory doesn't exist anymore) and updating on other PC's causes their copy of this directory to be removed, proving it's not in the repository.

When I select everything and commit, it says "no changes". When I only select a file with status "locally new" and commit, I get two errors saying a path doesn't exist, and the log in cvs-commit-log.txt.

I changed some files on the other PC, committed, and updated on my own PC. The result is:
- the changes were indeed updated on my own PC.

And I still can't update the CVS server with the newly changed files.

---

I tried deleting the entire project, updating from CVS, then overwriting the files with a local backup, but this didn't change anything at all.

---

I tried copying the files to the other PC, committing from there and updating on my PC. Now at least the CVS is up-to-date but this introduced even weirder behavior. Now it claims some files are changed, but when I view them in the difference panel, the left side shows the old version, but I know both locally and on the CVS now contain the new version and the old shouldn't even exist anymore (except in CVS history).
Comment 1 Zom-B 2014-08-25 09:14:07 UTC
Created attachment 148874 [details]
update log
Comment 2 Zom-B 2014-08-25 09:14:20 UTC
Created attachment 148875 [details]
commit log
Comment 3 Zom-B 2014-08-25 09:14:57 UTC
Created attachment 148876 [details]
screenshot

Why wasn't this uploaded with the original post? I did select it under add attachment.
Comment 4 Ondrej Vrabec 2014-08-25 09:32:09 UTC
Can you try to delete cvs cache folder? Delete $CACHE_FOLDER$/cvscache folder and restart the IDE, then do CVS->Diff again, does it change anything?
you can grab $CACHE_FOLDER$ value from Help -> About: Cache directory
Comment 5 Zom-B 2014-08-25 11:09:45 UTC
I tried that and it broke everything irreversibly.

Whenever I try anything (like update, diff) I get "CVS command failed with the following error:" and it shows me a box with just the complete CVS log that contains no error at all.

Now I can't use CVS at all. I removed the new cvscache and placed the backup back but this new problem persist and I can't use CVS anymore.
Comment 6 Ondrej Vrabec 2014-08-25 11:21:58 UTC
can you please attach the IDE log (View -> IDE log) when running with deleted cvscache folder?
Comment 7 Ondrej Vrabec 2014-08-25 11:24:04 UTC
(In reply to Ondrej Vrabec from comment #6)
> can you please attach the IDE log (View -> IDE log) when running with
> deleted cvscache folder?
... and right after you call CVS -> Show Changes
Comment 8 Zom-B 2014-08-25 11:45:00 UTC
I uninstalled NetBeans entirely and deleted all traces it left on the system (registry excluded but I think that's not used), then re-installed, and the problem still persists.

Log when running clean attached.

When I do "show changes" or any other CVS command, the IDE log stays empty and I get a dialog similar to the 5th attachment.
Comment 9 Zom-B 2014-08-25 11:45:13 UTC
Created attachment 148879 [details]
ide-log
Comment 10 Zom-B 2014-08-25 11:45:25 UTC
Created attachment 148880 [details]
cvs-log
Comment 11 Ondrej Vrabec 2014-08-25 11:49:29 UTC
(In reply to Zom-B from comment #9)
> Created attachment 148879 [details]
> ide-log
There is no error in the log, did you attach it after you got the error from cvs->show changes or before?
Comment 12 Zom-B 2014-08-25 11:53:22 UTC
Both.

Like I said, the CVS actions I tried don't output anything to the IDE-log.
Comment 13 Ondrej Vrabec 2014-08-25 11:56:47 UTC
(In reply to Zom-B from comment #12)
> Both.
> Like I said, the CVS actions I tried don't output anything to the IDE-log.
No error message in the output window either?
Comment 14 Zom-B 2014-08-25 12:04:04 UTC
Nope
Comment 15 Ondrej Vrabec 2014-08-25 12:08:19 UTC
then please try running the IDE with -J-DcvsClientLog=PATH_TO_A_FILE (e.g. -J-DcvsClientLog=C:\Temp\cvslog) and run cvs->Show Changes. You should get the error but also C:\Temp\cvslog.in and C:\Temp\cvslog.out should be generated and contain the server/client comm log. Please attach them.
Comment 16 Zom-B 2014-08-25 12:28:44 UTC
Created attachment 148885 [details]
cvslog.in
Comment 17 Zom-B 2014-08-25 12:28:56 UTC
Created attachment 148886 [details]
cvslog.out
Comment 18 Zom-B 2014-08-25 12:30:56 UTC
Somewhere along the line the original error (weird diff files) disappeared. I think when I reinstalled NB.

Since the original project now has no cvs changes, I did "show changes" on another project that does. I also had to censor a lot of confidential information so excuse me if the log looks a bit weird.
Comment 19 Ondrej Vrabec 2014-08-25 12:39:52 UTC
i find it hard to orient in the logs since you probably replaced all file names with <snip> but this looks suspicious:
> E cvs update: conflict: removed `src/com/<snip>
Check the original log and get the file that is printed on the line. It may be you have a tree conflict which NetBeans CVS support has problems with. May be someone modified it in the repository while you deleted it locally (or maybe vice-versa). Can you leave that file as it is in the repository? Could you even make a fresh cvs checkout, update and then do cvs -> show changes with the deleted cvscache?
Comment 20 Zom-B 2014-08-25 13:01:21 UTC
I guess by replace regex was too aggressive. That line should have been:

> E cvs update: conflict: removed `src/com/<snip> was modified by second party

The file pointed to by snip doesn't exist locally. It only exists in the CVS.
Comment 21 Zom-B 2014-08-25 13:08:58 UTC
Yes, I guess someone modified it in the repository while I deleted it locally.

I did a fresh checkout and got the repo version without any errors/weirdness whatsoever, which is what I'll continue to work with. (copying of the changed files from the new to the checked-out projrect takes some work, but luckily not much in this case. It could've been many orders of magnitude worse)
Comment 22 Ondrej Vrabec 2014-08-25 14:34:44 UTC
(In reply to Zom-B from comment #21)
> Yes, I guess someone modified it in the repository while I deleted it
> locally.
Then recreate the file locally (so it exists again on your side), do the update (so you merge others' changes) and then delete it. The problem you're experiencing is called a tree conflict, always quite difficult to solve and can mean there are some problems in communication in your team. Another developer modified the file while you deleted it without knowing of one another. So it's always better to wait for the other changes finished before continuing with yours.
So in your case it's better to revert the local deletion, bring your teammate's changes and then delete the file again.