[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

shelve is (surprisingly) sensitive to working directory

From: James McCoy <jamessan_at_jamessan.com>
Date: Sat, 30 Dec 2017 00:47:38 -0500

While messing around with things recently, I decided to try out shelve
to save some of my pending changes. This didn't work as well as I
expected, since I wasn't in the root of my working copy. Simplified
transcript below demonstrates the issue:

[[[
jamessan_at_freya:~/src/apache.org/subversion/trunk$ svn info | grep ^Work
Working Copy Root Path: /home/jamessan/src/apache.org/subversion
jamessan_at_freya:~/src/apache.org/subversion/trunk$ ./subversion/svn/svn stat
M subversion/libsvn_client/shelve.c
jamessan_at_freya:~/src/apache.org/subversion/trunk$ ./subversion/svn/svn shelve demo
C /home/jamessan/src/apache.org/subversion/subversion/libsvn_client/shelve.c
> rejected hunk @@ -216,7 +216,6 @@
shelved 'demo'
]]]

Notice that a conflict is shown and the full path is incorrect (missing
/trunk/). It looks like the relative path from my working directory was
appended to the working copy root, which is clearly wrong.

[[[
jamessan_at_freya:~/src/apache.org/subversion/trunk$ svn stat
M subversion/libsvn_client/shelve.c
jamessan_at_freya:~/src/apache.org/subversion/trunk$ ./subversion/svn/svn shelve --list
demo 0 mins old 504 bytes 1 paths changed

 shelve.c | 1 +
 1 file changed, 1 insertion(+)

jamessan_at_freya:~/src/apache.org/subversion/trunk$ lsdiff ../.svn/shelves/demo.patch
subversion/libsvn_client/shelve.c
jamessan_at_freya:~/src/apache.org/subversion/trunk$ ./subversion/svn/svn revert subversion/libsvn_client/shelve.c
Reverted 'subversion/libsvn_client/shelve.c'
jamessan_at_freya:~/src/apache.org/subversion/trunk$ ./subversion/svn/svn unshelve demo
C /home/jamessan/src/apache.org/subversion/subversion/libsvn_client/shelve.c
> rejected hunk @@ -216,6 +216,7 @@
unshelved 'demo'
]]]

Cheers,

-- 
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7  2D23 DFE6 91AE 331B A3DB
Received on 2017-12-30 06:47:50 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.