Home » Eclipse Projects » Eclipse Platform » CVS / deleting a file
CVS / deleting a file [message #241110] |
Wed, 12 May 2004 21:55  |
Eclipse User |
|
|
|
Originally posted by: billk.tech.beacon-it.co.jp
I must be missing something, but is there any way to delete a file from
the CVS repository (by using Eclipse)?
|
|
| | | |
Re: CVS / deleting a file [message #241279 is a reply to message #241185] |
Thu, 13 May 2004 15:14   |
Eclipse User |
|
|
|
Originally posted by: eclipse.rizzoweb.com
LeO wrote:
> Since I've also asked and I guess more have this question, wouldn't it be
> good to add some kind of *workaround*?
>
> Jens wrote:
>
>
>>... actually, you can't delete a file physically from the repository with
>>eclipse. But if you mean to move a file into attic (or state dead) ....
>>delete it local and commit the parent folder. That file will never be
>>retrieved until somebody re-creates it, but then the revision number will
>>be resumed. Have a look on your repository files.
When someone deletes a file locally and then commits the containing
directory, that file is "deleted" as far as you can see from the CVS
client perspective. Eclipse does this.
Besides that there is a more serious, drastic thing to do with a file
that is under CVS control: physically removing it from the CVS
repository altogether, meaning there will be no record of it and it can
never be revived or restored. To do that requires manual work on the CVS
server itself, which is intentional by the design of CVS. No CVS clients
(including command-line) can do this - it has to be done on the server
where the repository files live. It is very rare that this needs to be
done, since removing it locally and then committing the directory is the
common practice.
HTH,
Eric
|
|
|
Re: CVS / deleting a file [message #241735 is a reply to message #241216] |
Mon, 17 May 2004 09:27   |
Eclipse User |
|
|
|
Originally posted by: leo_zen.gmx.at
Yeah, I know I could delete it first locally, then Commit. But when I have
the Repository View, then I right-click on one of the file and get the
context-menu. Then why not to have it there a Delete, which would be
equivalent of 'rm'?
Then I'm not forced to delete it locally to delete it on CVS.
exquisitus wrote:
> Why does it need a workaround? package explorer->right click on file
> you don't want. Select *delete*. File no longer appears in your
> procject, and file will disappear from other users workspace when they sync.
> LeO wrote:
> > Since I've also asked and I guess more have this question, wouldn't it be
> > good to add some kind of *workaround*?
> >
> > Jens wrote:
> >
> >
> >>... actually, you can't delete a file physically from the repository with
> >>eclipse. But if you mean to move a file into attic (or state dead) ....
> >>delete it local and commit the parent folder. That file will never be
> >>retrieved until somebody re-creates it, but then the revision number will
> >>be resumed. Have a look on your repository files.
> >
> >
> >>Cheers,
> >>Jens :-)
> >
> >
> >>Bill Keese wrote:
> >
> >
> >>>I must be missing something, but is there any way to delete a file from
> >>>the CVS repository (by using Eclipse)?
> >
> >
> >
|
|
|
Re: CVS / deleting a file [message #241745 is a reply to message #241735] |
Mon, 17 May 2004 09:44   |
Eclipse User |
|
|
|
Originally posted by: eclipse.rizzoweb.com
LeO wrote:
> Yeah, I know I could delete it first locally, then Commit. But when I have
> the Repository View, then I right-click on one of the file and get the
> context-menu. Then why not to have it there a Delete, which would be
> equivalent of 'rm'?
>
> Then I'm not forced to delete it locally to delete it on CVS.
There are no ways to operate directly on the repository unless you
modify your local copy and commit that. It is intentionally that way.
CVS records the fact that you no longer want to track the file, but it
must keep the original file around because other branches may still have
it, it may be tagged as a previous release, etc.
I reiterate that this is not an Eclipse decision or issue - this is just
how CVS works. It is very rare that a file truly needs to be completely
erased from the repository, including all it's history and everything.
That is what you are asking for, and CVS simply does not make it that
easy - it is intentionally a manual task because it is not the normal
thing to do.
Perhaps this section from the CVS manual will make it a bit more clear
why it is this way:
http://www.cvshome.org/docs/manual/cvs-1.11.15/cvs_7.html
HTH,
Eric
|
|
| |
Re: CVS / deleting a file [message #242092 is a reply to message #241989] |
Tue, 18 May 2004 09:57  |
Eclipse User |
|
|
|
Originally posted by: eclipse.rizzoweb.com
LeO wrote:
> ThX for the link. If I take the example there (little bit modified) with
>
> $ cvs remove -f a.c
> cvs remove: scheduling a.c for removal
> cvs remove: use 'cvs commit' to remove these files permanently
> $ cvs ci -m "Removed unneeded files"
> cvs commit: Examining .
> cvs commit: Committing .
>
> Then I would like to have these two commands hided behind an option. i.e.
> right-click on the repository-file, select Delete, adding some comments
> and then commit both command at once.
>
> And most preferable in the repostiory view as well as in the
> Team-Option-menu. Because I personally have problems to commit a delete
> file, since I don't know how to select it - it's no longer there. And
> yeah, if you know, then you select the upper dir and then commit - but
> that's not the intiutive GUI-approach.
OK, so you are talking about regular old remove.
In that case, I think you have to look at how all such Team (CVS)
operations are done: it is always a 2-step process to make a change.
First make the change, then commit it.
Both of your suggestions seem to go against that basic operational
procedure. If it were made into a single command to remove and commit,
that would be totally different from the other things you do to a file
in CVS (ie, change then commit). If the option were added to the
Repository view, it would be grossly out of place. The Repository view
is for browsing what is in the CVS repository (and checking it out into
an Eclipse project), not for making changes based on your local
check-out. Doing a remove and commit just doesn't fit with Repository
view's purpose, IMO.
Having said all that, here's a couple of suggestions for you:
1) Use the Synchronize view for committing and updating with the
repository. It is a very handy "preview" of what changes you have
locally and what changes exist in the repository that you don't yet
have. It provides the best interface, IMO, into getting your local view
up-to-date with the repository, including merges. I generally
right-click on the project(sometimes just a high-level directory within
a project) and choose Team > Synchronize with repository.
2) Make sure you have enabled the CVS label decorators, which will
indicate with a little '>' any files and/or directories that you need to
commit. That will help you easily identify directories where you have
deleted files locally but not yet committed that change to the
repository. In Eclipse 2.x, see Preferences > Workbench > Label
Decorations and then Preferences > Team > CVS > Label Decorations.
3) If you just can't find it in your heart to agreee with my points and
the above suggestions don't help you for some reason, then by all means
submit a feature request into Eclipse's Bugzilla. It is there to gather
input/feedback from the user community, so perhaps your suggestions
would be taken up by the developers.
HTH,
Eric
|
|
|
Goto Forum:
Current Time: Sun Jun 08 15:11:36 EDT 2025
Powered by FUDForum. Page generated in 0.04590 seconds
|