1

I am trying to use the tf.exe destroy command to remove the history for a branch, and get error TF14127 which means

cannot destroy because a file is being used by a shelveset.

Destroy command being used is:

tf.exe destroy $path /keephistory /startcleanup /silent /noprompt /stopat:D01-08-2018

So I try to delete the shelveset with tf vc shelve delete "shelveset-name;username", but that returns

the shelveset cannot not be found

So, I look for it using tf vc shelvesets /owner:"username", and this is where I finally get to the root cause, with

TF14045: The identity username is not a recognized identity.

So I ask my domain admin guy, and sure enough that user was deleted (not just disabled) in a cleanup last year ...

So, am I stuck, or is there a way to delete a shelveset for an invalid identity?

NOTE: we are using TFS Server 2018 R2, and the Tf.exe is 2017 (Version 15.129.27825.1).

TickFord
  • 11
  • 2
  • according to [this](https://learn.microsoft.com/en-us/vsts/repos/tfvc/shelve-command?view=vsts) the username is optional. What happens if you just execute `tf vc shelve delete shelveset-name`? – Steffen Winkler Aug 21 '18 at 10:28
  • if I omit the username, it just assumes I am the owner, and says it cant find the shelveset. – TickFord Aug 21 '18 at 22:23
  • oh - which version of TFS is this about? You should add the tag for that to your question – Steffen Winkler Aug 22 '18 at 07:28
  • Versions added as a note at end of post, couldn't see the correct tag and I am too new to add tags... – TickFord Aug 22 '18 at 11:06

2 Answers2

0

The solution here was in the end simple: the user's name was, for example, "Fred Bloggs", and this is the name that was reported in the TF14127 error.

But, the user's identity is actually just "FredB", and [tf vc shelvesets /owner:"FredB"] was able to find his shelvesets.

So, the error message is misleading, using the users full name (Given Names and Surname), not the username that needs to be used to find shelvesets.

Ended up using Team Foundation Sidekicks to find and delete the shelveset.

TickFord
  • 11
  • 2
0

I would suggest you to use TFS Sidekicks to try to solve the shelveset and then use tf destroy to completly remove the branch.

HLourenco
  • 378
  • 5
  • 19