Unshelve deletes previous version

已查看 55 次
跳至第一个未读帖子

Günther DoJoy Humer

未读,
2022年10月20日 13:38:092022/10/20
收件人 TortoiseSVN
I wanted to somehow use Shelving like gits cheap branching. 

Feature shelf, BugFix shelve...

Create a shelveset
Change sth.
Create a new version of the shelveset

work on something different

unshelve version1 of shelveset
Review, commit
unshelve... Version2 is not there anymore!

100% reproducable

Daniel Sahlberg

未读,
2022年10月24日 08:40:032022/10/24
收件人 TortoiseSVN
It seems that unshelving version 1 deletes version 2 but keeps version 1 of the shelf.

I will have to look at this a bit closer as I'm not sure what the proper behaviour should be, neither if this is a flaw in TortoiseSVN or in the Subversion libraries. (Anyone interested should try to reproduce the error on the commandline).

One argument could be that if you decide to go back to shelf version 1, then you have decided that any changes later on are not important anymore. In that case, shelf version 1 should also be deleted. An argument against this is that shelving (opposed to checkpointing) deletes any changes in the WC after moving them to the shelf. But I'm not sure if shelf version 2 is selfcontained or if it stands on top of shelf version 1.

A way to work around this would be to create differently named shelf for each change.

Kind regards,
Daniel

Stefan

未读,
2022年10月25日 13:13:072022/10/25
收件人 TortoiseSVN
the command line client does this as well.
the shelve_restore() function in shelf-cmd.c (in the svn lib) calls svn_client__shelf_delete_newer_versions() after applying the shelf with the selected version.

So I'm guessing that there's a reason for that behavior.

Robert Marr

未读,
2024年4月12日 10:14:294月12日
收件人 TortoiseSVN
Hey, so I can confirm this is current behavior of V2 as of 1.14.5.  It feels like a bug, but at a bare minimum, something so destructive should issue a warning command.  "Oh, you wanted those other versions you made?  Sorry, GONE"  I'm surprised there's not more people talking about this.

Shawn W

未读,
2024年6月9日 17:34:55 (6天前) 6月9日
收件人 TortoiseSVN
I can confirm this behavior also, in 1.14.5. It would be very helpful to allow applying any version in a shelf and retaining all versions.
Otherwise, the only workaround I can see is every time creating a new shelf instead of a new version of an existing shelf.

回复全部
回复作者
转发
0 个新帖子