ClearCase: I am not able to get the files from Clearcase - version-control

I'm using the ClearCase as version control tool.
When I am creating view in a particular VOB, all the folders has been downloaded from the server. But files are not getting downloaded.
For that I am doing as a workaround a 'checkout' of the current vob and then UNDO checkout the same. Then only I am getting files.
Is there any fix for this?

all the folders has been downloaded from the server.
"Downloaded" means probably this is a ClearCase snapshot view, which reads the config spec:
"selection rules"
"loading rules"
and download the elements (files and directories) whose version matches the selection rules, and whose path matches the loading rules.
You need to do a cleartool ls in a folder where you see only subfolders in order to understand what selection rules was used to download those folders (and not the files)
cd /path/to/my/view/(vobs/)myVob
cleartool ls
From there, you can edit the config spec (cleartool edcs) in order to fix the selection or loading rules, ensuring that folders and files are downloaded when you update the snapshot view.
Maybe those folders are considered as hijacked: see "Locating hijacked files in snapshot views".

If there is a .cc_loading directory it looks like a wev view. Cleartool claims that it doesn't work in those views (if if the command has nothing to do with a view context!).
You should you "rcleartool ls", but you can also see what version of the directory is used with the help of CTE.
I guess that you see version /main/0 of the directories.

As this is a snapshot view, create a dynamic view with the same configspec and see what it sees. If you see directories and not files in the dynamic view, what is the configspec? And what does cleartool ls show you?

Related

Why does some files not show up in Eclipse?

I started Eclipse and opened a project that is in a Git repo. However, a folder with some files does not show. Why is that?
The files are committed, and I am on the right branch so it is not that.
$ git status
On branch feat57
nothing to commit, working tree clean
The files exists:
$ ls -d html/catalogue/*/
html/catalogue/article/ html/catalogue/backup/ html/catalogue/projects/ html/catalogue/reports/
$ ls html/catalogue/projects/
projects_edit.php projects_list.php projects_new.php projects.php projects_view.php
Apache finds the files when I access it through a browser.
Two icons seems to show that something is wrong. However, I don't know what they mean.
As you can see, there's something fishy with folders html and catalogue. The folder that is not showing is in catalogue. You can also see that projects does not show.
I guess you are locking at your project from the "Package Explorer" view. This is a special view that doesn't represent the file system. It focuses on source and ressource folders, which you can identify by the little brownish symbol inside the "folder" icon. I suspect your catalogue folder is excluded from the build path somehow.
If it's not, try refreshing the project (mark the project and hit F5).
Finally, if you want a view showing the file system, go to Window->Show View->Navigator.

Eclipse Team Synchronizing View: How to remove unversioned items in outgoing changes?

While viewing the outgoing changes in Eclipse Team Synchronization(Subclipse), I am able to see the unversioned files also, like the generated class files, build folders, etc, which I do not want to see in this view. I dont want to add it to svn:ignore, since I have to do it manually for all the additional folders generated.
Is there any setting to change this to show only versioned files in this mode always?
Tortoise SVN client shows this option while committing, to show only versioned files. I am looking for such an option in Subclipse Team Synchronization view. Thanks in advance.
eclipse_outgoing_view
You should svn:ignore build folders.
Otherwise it's only a question of time until you or your colleague checks in the build folder
You should use svn:ignore, and note that once you do for a folder, all child folders are automatically ignored. In your example, if the build folder were ignored then everything inside it would automatically be ignored. It looks like your build folder has already been added to repository though, so maybe you can ignore the dist folder inside bin.

Subclipse wants to commit an folder conaining an svn:ignore file

I have a project with a subfolder Resources. In this folder there is a file I added to SVN:ignore.
Now there aren't any other changes compared with the latest respository revision. But in eclipse's synchronzite view, this folder is still beeing displayed. No other files are displayed under it, because nothing changed.
Why is this folder beeing displayed in the synchronize view?
Is it because SVN metadata changed?
Do I have to commit the metadata into the repository?
Is there a way, to get this folder out of the synchronize view, without commiting metadata?
I don't want to commit those SVN:ignore metadata, because its user specific. I don't want to ignore the folder's contents, because there are regular files which has to be version controlled.
Thanks in advance.
Is it because SVN metadata changed?
Yes, you modified the svn:ignore property of the Resources folder.
Do I have to commit the metadata into the repository?
Yes, svn:ignore properties are stored in the repository. They are shared between all SVN users.
Is there a way, to get this folder out of the synchronize view, without commiting metadata? I don't want to commit those SVN:ignore metadata, because its user specific.
Yes. You can use global-ignores in your SVN configuration file, instead of the svn:ignore property. From the section Runtime Configuration Area in the SVN book:
global-ignores
When running the svn status command, Subversion lists unversioned files and directories along with the versioned ones, annotating them with a ? character (see the section called “See an overview of your changes”). Sometimes it can be annoying to see uninteresting, unversioned items—for example, object files that result from a program's compilation—in this display. The global-ignores option is a list of whitespace-delimited globs that describe the names of files and directories that Subversion should not display unless they are versioned. The default value is *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store.
You must commit svn:ignore when it should be work. There is no other way I think. Because all project metadata are under version control!
maybe it is trying to add the .ignore file itself? (It might have created that file to list ignored files.) Check for any other hidden files too.
if you want, you can add the whole folder to the ignore list
EDIT
Svn does not create a ignore file list, but maybe it is committing the parent folder or there is some hidden file inside that folder

How to find all checkedout files with ClearCase cleartool?

I'm trying to setup our ClearCase with Hudson for a continuous integration (and deployment later).
I finally got a UCM view for the build, but unfortunatly our build process checks out files to store the build number. Now the build broke and the file is still checked out, preventing the next build.
I already now about cleartool find . -type f, but I can't figure out how to find checked out files. I know the syntax of UNIX' find, so that isn't a problem.
Can someone point me to a documentation of the query language or maybe give an example to find checked out or hijacked files?
You can start by this SO question on how to list private files.
Then it depends on the nature of your ClearCase view.
On a dynamic view for instance, a simple ct lsprivate list private files (including hijacked ones) and checkout files.
The official command is cleartool lscheckout (or 'lsco').
If you are within the right vob within your view:
$/path/to/view/vobs/aVob
cleartool lsco -rec -cview
,should list all checked out files from any user in any sub-directories of said vob.
But if your build is broken because of files checked out in several vobs, then you need to widen the scope:
$/path/to/view/
cleartool lsco -avobs -cview
(you don't need to be in a specific vob in this case)
As Manjunath K Mayya points out in the comments:
To list only the file names, without the version details, we can use "short":
cleartool lsco -short -avobs -cview

What's the "proper" way to delete files from a ClearCase snapshot?

When I delete a file from my snapshot view, the next time I look at the snapshot in ClearCase Explorer, it shows the "??" checked-out-but-removed icon. When I run "Find Modified Files" on the snapshot, the deleted files aren't shown. Running "Update View" on the snapshot causes ClearCase to re-copy the missing files back into my view.
What I want to happen is this: when I delete a file from my snapshot, and do an update, the file should be deleted from the view, just as if I had deleted it through ClearCase from a dynamic view. What's the best way to accomplish this?
I would prefer to avoid a lot of customization of my ClearCase environment. If there's a "standard" way to do this, I'd like to try that. If cleartool can show me search results for all files that fit this bill, that will be good enough for my purposes.
If you delete the file from the ClearCase Explorer, you shouldn't have any issue: it will
checkout the parent directory
rmname the file
checkin the parent directory
But if you do it directly from a shell or a Windows Explorer, then ClearCase won't be informed of the operation, hence the "??" checked-out-but-removed status.
With a dynamic view, you cannot remove a file without ClearCase knowing about it, since a dynamic view is an encapsulation of the file system managed entirely by ClearCase.
Now let's suppose you have deleted a bunch of check-out files directly from the native filesystem (not from the ClearCase Explorer or an IDE with a ClearCase plugin), and that you want those files to stay deleted!
Then a way to reconcile the two status would be to:
cleartool update . (at the root directory of the snapshot view)
parse the generated ".updt" file and for each checked-out file, rmname it (like in this article)