On Wed, Mar 28, 2012 at 5:06 PM, Daniel Shahaf <d...@daniel.shahaf.name> wrote:
> Johan Corveleyn wrote on Wed, Mar 28, 2012 at 16:38:41 +0200:
>> Thanks both for your help. Maybe this will help others running in the
>> same situation ...
>
> Do you know what cause the pristine to disappear in the first place?

No, not yet. When I have some more time I'll try to reproduce it.

In the meantime, I experimented a bit more with '--set-depth exclude',
just to see what happens when you do this on a modified file. It's
interesting (but maybe this is all normal, can't say ... just
interesting :-)):

[[[
C:\WC>echo test >> build.properties

C:\WC>svn-1.7 st
M       build.properties

C:\WC>svn-1.7 up --set-depth exclude build.properties
D    build.properties

C:\WC>svn-1.7 st
?       build.properties

C:\WC>svn-1.7 up build.properties
Updating 'build.properties':
   C build.properties
At revision 176270.
Summary of conflicts:
  Tree conflicts: 1

### argh, a tree conflict. Panic! :-)

C:\WC>svn-1.7 st
D     C build.properties
      >   local unversioned, incoming add upon update
Summary of conflicts:
  Tree conflicts: 1

### let's try to recover from this.

C:\WC>svn-1.7 resolve --accept=working build.properties
Resolved conflicted state of 'build.properties'

C:\WC>svn-1.7 st
D       build.properties

### hm, how do I get it back as un-deleted without losing my mods

C:\WC>svn-1.7 add build.properties
A         build.properties

C:\WC>svn-1.7 st
RM      build.properties

### cool! I've never seen 'RM' before. Anyway, this is not what I wanted :-(

C:\WC>copy build.properties build.properties.bak
        1 file(s) copied.

C:\WC>svn-1.7 revert build.properties
Reverted 'build.properties'

C:\WC>svn-1.7 st
?       build.properties.bak

C:\WC>copy build.properties.bak build.properties
Overwrite build.properties? (Yes/No/All): y
        1 file(s) copied.

C:\WC>svn-1.7 st
?       build.properties.bak
M       build.properties

### phew, that's better
]]]


So then I remembered there is a --force option for 'svn update'. That
works out better:

[[[
C:\WC>echo test >> build.properties

C:\WC>svn-1.7 st
M       build.properties

C:\WC>svn-1.7 up --set-depth exclude build.properties
D    build.properties

C:\WC>svn-1.7 st
?       build.properties

C:\WC>svn-1.7 up --force build.properties
Updating 'build.properties':
E    build.properties
Updated to revision 176272.

C:\WC>svn-1.7 st
M       build.properties
]]]

-- 
Johan

Reply via email to