Login | Register
My pages Projects Community openCollabNet

Discussions > users > RE: Re: [Subclipse-users] Recursively reverting files

subclipse
Discussion topic

Hide all messages in topic

All messages in topic

RE: Re: [Subclipse-users] Recursively reverting files

Author jacobweber
Full name Jacob Weber
Date 2016-04-05 15:03:10 PDT
Message Thanks!

RE: Re: [Subclipse-users] Recursively reverting files

Author selsemore
Full name Stephen Elsemore
Date 2016-03-21 10:09:54 PDT
Message I've fixed this:

http://subclipse.tig​ris.org/issues/show_​bug.cgi?id=1649

RE: Re: [Subclipse-users] Recursively reverting files

Author jacobweber
Full name Jacob Weber
Date 2016-03-08 11:58:10 PST
Message > We extended the Team > Cleanup/Refresh option to do this. Try using the option after refreshing your workspace and see if that helps.

Sorry for the delayed reply. This didn't work though. As an example:

1. Check out a project in Subclipse with nested folders, e.g. /project1/folder1/fo​lder2/file1.

2. In Terminal, "rm -rf folder1".

3. In Eclipse, select Refresh on the project.

4. Select Team > Cleanup / Refresh on the project.

4. Select Team > Revert on the project. This restores an empty folder1.

5. Select Team > Revert again. This restores an empty folder2.

6. Select Team > Revert again. This restores file1.

This is using the latest Eclipse/Subclipse versions, and JavaHL 1.8.1.13.

Re: [Subclipse-users] Recursively reverting files

Author markphip
Full name Mark Phippard
Date 2016-02-26 16:24:08 PST
Message My recollection is that this is all a known issue since the new SVN working copy format was introduced. When you make changes outside Eclipse and then Refresh we do not get all of the notifications we need to refresh our cache fully.

We extended the Team > Cleanup/Refresh option to do this. Try using the option after refreshing your workspace and see if that helps.

Mark

Sent from my iPhone

On Feb 26, 2016, at 6:44 PM, Jacob Weber <jacob at jacobweber dot com> wrote:

>> I cannot recall a single occasion in 10+ years I have had to do this. So what is the specific scenario you have where this is necessary? Please provide more details. How does TortoiseSVN handle the same situation?
>
> Haven't used TortoiseSVN. But as an example, today I deleted a bunch of plugins on a Cordova project. This involved deleting several directories with many levels of subdirectories. One thing that might be important here is that the files were deleted using a command-line tool, outside of Eclipse, then refreshed inside Eclipse.
>
> So on the first revert, it just found the directories that were deleted, but not their contents. So it restored them as empty directories.
>
> The next revert restored the contents of those empty directories, but again not the contents of their subdirectories. And so on. In this example I had to revert 7 times, most of which took several minutes.
>
> ---
>
> I just tried adding two files, one inside a directory with un-committed property changes. When I Revert, it looks like the behavior is different with the property change; selecting the file inside the directory doesn't automatically select the parent directory.
>
> That makes sense. So maybe you should only revert recursively if the directory AND all of its contents are checked? That way you wouldn't revert the contents of a directory when you're just trying to revert its property.
>
>>> On Fri, Feb 26, 2016 at 3:54 PM, Jacob Weber <jacob at jacobweber dot com> wrote:
>>>
>>> Reverting a bit change in Subclipse is kind of a nightmare -- you have to
>>> go through several rounds of Team > Revert, each one slowly reverting one
>>> file at a time. There's got to be a better way.
>>
>> I cannot recall a single occasion in 10+ years I have had to do this. So
>> what is the specific scenario you have where this is necessary? Please
>> provide more details. How does TortoiseSVN handle the same situation?
>>
>>
>>> I took a look at:
>>> http://subclipse.tig​ris.org/issues/show_​bug.cgi?id=1303
>>>
>>> and I'm aware of the UI issues it mentions. But it seems like:
>>>
>>> - if it's going to revert each selected file individually, it could still
>>> pass -R when reverting each one, so that if it's a directory, its contents
>>> will be reverted. This would especially help when you deleted a nested
>>> directory, and each Revert command just restores one layer of files, but
>>> not its children.
>>>
>>> - in the dialog, if you select all files in a directory, it could revert
>>> the directory itself. The UI already makes it look like it will do this, by
>>> checking the directory when you check its files.
>>
>>
>> The main issue with reverting a directory is we have to be careful to not
>> inadvertently revert the children when that is not desired. For example if
>> you are reverting a property change on a folder, but do not want to revert
>> the content changes in all files beneath the folder too.
>>
>> If the folder is scheduled-add, then it should be safe to revert it
>> recursively since you cannot revert the folder without the children anyway.
>>
>> --
>> Thanks
>>
>> Mark Phippard
>> http://markphip.blogspot.com/
>
> --------------------​--------------------​--------------
> http://subclipse.tig​ris.org/ds/viewMessa​ge.do?dsForumId=1047​&dsMessageId=316​3136
>
> To unsubscribe from this discussion, e-mail: [users-unsubscribe@s​ubclipse.tigris.org]​.

RE: Re: [Subclipse-users] Recursively reverting files

Author jacobweber
Full name Jacob Weber
Date 2016-02-26 15:44:03 PST
Message > I cannot recall a single occasion in 10+ years I have had to do this. So what is the specific scenario you have where this is necessary? Please provide more details. How does TortoiseSVN handle the same situation?

Haven't used TortoiseSVN. But as an example, today I deleted a bunch of plugins on a Cordova project. This involved deleting several directories with many levels of subdirectories. One thing that might be important here is that the files were deleted using a command-line tool, outside of Eclipse, then refreshed inside Eclipse.

So on the first revert, it just found the directories that were deleted, but not their contents. So it restored them as empty directories.

The next revert restored the contents of those empty directories, but again not the contents of their subdirectories. And so on. In this example I had to revert 7 times, most of which took several minutes.

---

I just tried adding two files, one inside a directory with un-committed property changes. When I Revert, it looks like the behavior is different with the property change; selecting the file inside the directory doesn't automatically select the parent directory.

That makes sense. So maybe you should only revert recursively if the directory AND all of its contents are checked? That way you wouldn't revert the contents of a directory when you're just trying to revert its property.

> On Fri, Feb 26, 2016 at 3:54 PM, Jacob Weber <jacob at jacobweber dot com> wrote:
>
> > Reverting a bit change in Subclipse is kind of a nightmare -- you have to
> > go through several rounds of Team > Revert, each one slowly reverting one
> > file at a time. There's got to be a better way.
> >
>
> I cannot recall a single occasion in 10+ years I have had to do this. So
> what is the specific scenario you have where this is necessary? Please
> provide more details. How does TortoiseSVN handle the same situation?
>
>
> > I took a look at:
> > http://subclipse.tig​ris.org/issues/show_​bug.cgi?id=1303
> >
> > and I'm aware of the UI issues it mentions. But it seems like:
> >
> > - if it's going to revert each selected file individually, it could still
> > pass -R when reverting each one, so that if it's a directory, its contents
> > will be reverted. This would especially help when you deleted a nested
> > directory, and each Revert command just restores one layer of files, but
> > not its children.
> >
> > - in the dialog, if you select all files in a directory, it could revert
> > the directory itself. The UI already makes it look like it will do this, by
> > checking the directory when you check its files.
> >
>
>
> The main issue with reverting a directory is we have to be careful to not
> inadvertently revert the children when that is not desired. For example if
> you are reverting a property change on a folder, but do not want to revert
> the content changes in all files beneath the folder too.
>
> If the folder is scheduled-add, then it should be safe to revert it
> recursively since you cannot revert the folder without the children anyway.
>
> --
> Thanks
>
> Mark Phippard
> http://markphip.blogspot.com/

Re: [Subclipse-users] Recursively reverting files

Author markphip
Full name Mark Phippard
Date 2016-02-26 13:06:55 PST
Message On Fri, Feb 26, 2016 at 3:54 PM, Jacob Weber <jacob at jacobweber dot com> wrote:

> Reverting a bit change in Subclipse is kind of a nightmare -- you have to
> go through several rounds of Team > Revert, each one slowly reverting one
> file at a time. There's got to be a better way.
>

I cannot recall a single occasion in 10+ years I have had to do this. So
what is the specific scenario you have where this is necessary? Please
provide more details. How does TortoiseSVN handle the same situation?


> I took a look at:
> http://subclipse.tig​ris.org/issues/show_​bug.cgi?id=1303
>
> and I'm aware of the UI issues it mentions. But it seems like:
>
> - if it's going to revert each selected file individually, it could still
> pass -R when reverting each one, so that if it's a directory, its contents
> will be reverted. This would especially help when you deleted a nested
> directory, and each Revert command just restores one layer of files, but
> not its children.
>
> - in the dialog, if you select all files in a directory, it could revert
> the directory itself. The UI already makes it look like it will do this, by
> checking the directory when you check its files.
>


The main issue with reverting a directory is we have to be careful to not
inadvertently revert the children when that is not desired. For example if
you are reverting a property change on a folder, but do not want to revert
the content changes in all files beneath the folder too.

If the folder is scheduled-add, then it should be safe to revert it
recursively since you cannot revert the folder without the children anyway.

--
Thanks

Mark Phippard
http://markphip.blogspot.com/
Attachments

[Subclipse-users] Recursively reverting files

Author jacobweber
Full name Jacob Weber
Date 2016-02-26 12:54:57 PST
Message Reverting a bit change in Subclipse is kind of a nightmare -- you have to go through several rounds of Team > Revert, each one slowly reverting one file at a time. There's got to be a better way.

I took a look at:
http://subclipse.tig​ris.org/issues/show_​bug.cgi?id=1303

and I'm aware of the UI issues it mentions. But it seems like:

- if it's going to revert each selected file individually, it could still pass -R when reverting each one, so that if it's a directory, its contents will be reverted. This would especially help when you deleted a nested directory, and each Revert command just restores one layer of files, but not its children.

- in the dialog, if you select all files in a directory, it could revert the directory itself. The UI already makes it look like it will do this, by checking the directory when you check its files.
Messages per page: