Strange VSS behaviour
---------------------

Using vssget task in NAnt (actually NAntContrib), I was encountering a "The get 
operation failed. \n Version not found" error.

After some searching on the web I found that the problem only occurred when (a) 
I was using a version label in the vssget, and (b) I had recursive = true.  
This seemed to match to several things found on the Internet, including a known 
bug in 6.0d. (During investigation I found the old server I was using only had 
6.0a, which had the problem, and I upgraded to 6.0c -- same problem).

Anyway, further investigation showed that a sub-directory (VSS sub-project) had 
no problems with recursive versioned get (and it had further subdirectories), 
so maybe some problem with the level of the labelling -- but no, when I 
labelled higher up the tree is was still to solution directory that I could not 
recurse, but several others I could.

I then went through and thoroughly tested every sub-directory (project) in the 
solution and ---- I found the error!

It was one particular sub-directory.. anyway, I can now report what the error 
is:

  * The machine I was running NAnt on, which did the labelling, and was 
attempting the vssget, has it's clock set to UTC time.
 
  * The sub-directory with the problem was a _new_ project, created only a 
short time ago on another workstation with it's clock set to local time (for us 
this is +11:00).

  * Note that the label was applied _after_ the project was added, so it should 
have also got the label.

  * However, looking at the VSS history the time of the labelling is 04:10, 
whilst the project was added at 11:23 -- in fact if you look history of the new 
project it has a bunch of creation entries at 11:23, but does not have the 
version label!

  * In other words, the error "Version not found" was correct -- for one of my 
subdirectories the version label did not exist (due to the timestamps in 
different timezones).

Fix -- The fix was to add the label manually to that directory (and, longer 
term, make sure all VSS clients have the same timezone setting).

Suggestion -- If possible NAnt should provide more information about where the 
problem occurred, i.e. if it originally told me "Version not found for 
project/file $/xxxxx", then I could have located the problem sooner.  (I don't 
even know if this information is available via the API being used).

Other than that, I just thought I would post my discovery here to this list, in 
case anyone else has similar problems and they could search and find it.


- Stephen Gryphon
  START Corporation


--
Stephen Gryphon         
START Corporation Pty Ltd, ABN 50 083 289 061
Tel:     +61 2 9954 4411
Mobile:  +61 4 1454 2562
Website: http://www.startcorp.com/

Reply via email to