11

Per the docs:

Shelves are purely a local client feature

Why then does it upload megabytes of data?

TortoiseSVN shelve upload progress dialog

217 MB transferred, even though my shelved files when Exported amount to 0.7 MB.

How does shelving work in svn? Does it create an invisible branch on the server?

I imagined shelve to be an equivalent of git stash. If that's not the case, is there a local-only equivalent in svn?

Jakub Fojtik
  • 681
  • 5
  • 22

1 Answers1

10

Documentation is right: shelving happens entirely inside your working copy. In current Subversion release (1.12.2) you can find the actual data at .svn\experimental\shelves\v3. The dialogue is not using the verb "to transfer" to imply networking.

If you're unsure and want to verify it by yourself you just need to disconnect your PC from the network or disable access to the remote repository.

As the path highlights it's still an experimental feature and in fact the format has been changing a lot. Currently it seems to be like a second working copy; in earlier releases it was like a patch collection. Today's format seem to contain a lot of duplicate information, thus the total size.


Note: as of Subversion/1.13.0, svn help no longer lists experimental commands —such as shelving-related ones— by default; you need the -v flag:

Use '-v' to show experimental subcommands

Álvaro González
  • 142,137
  • 41
  • 261
  • 360
  • 4
    This seems totally broken then. I have four files changed and it is transferring over 400MB to somewhere while I type this. Crazy!! It used to be that I could shelve a few files in less than a second. 1 minute later it is still "transferring" so I cancel it and go back to a manual patch solution which is 10kb in size. – bradgonesurfing Oct 18 '19 at 08:22
  • As said, v3 is some kind of nested working copy. It doubles total size and shelf creation is slow. Further revisions on that same shelve are much simpler, though. It it gets stuck perhaps you can use command-line to create the shelf. – Álvaro González Oct 18 '19 at 08:40
  • 3
    What a terrible design. As I've said. I will go back to using patch files. – bradgonesurfing Oct 18 '19 at 10:16
  • 1
    Yeah, shelving seems to be totally broken ATM, it fails to revert the local changes and creates 1.8 GB shelves, even though my repository is far less.. it looks like it stores ignored files as well... which is unfortunate – uceumern Mar 03 '20 at 10:02
  • 2
    I figured it out. It seems like shelve creates a complete copy of the entire working copy instead of just the changes. Since I checked out tags and branches as well this creates HUGE shelves. – uceumern Mar 03 '20 at 10:06