jessehouwing / azure-pipelines-tfvc-tasks

Azure Pipelines tasks for Team Foundation Version Control
https://marketplace.visualstudio.com/items?itemName=jessehouwing.jessehouwing-vsts-tfvc-tasks
MIT License
28 stars 17 forks source link

Error checking in #66

Closed abvogel closed 5 years ago

abvogel commented 6 years ago

2018-07-21T00:39:58.5008121Z ##[error]System.Management.Automation.MethodInvocationException: Exception calling "CheckIn" with "1" argument(s): "TF10141: No files checked in: resolve the conflicts and try again." ---> Microsoft.TeamFoundation.VersionControl.Client.CheckinException: TF10141: No files checked in: resolve the conflicts and try again.

Receiving an error after adding a few files, and then trying to Check-In with Auto Detect Adds enabled. If there are no files in the folder initially it works fine, but if it's adding to existing files it fails with the above error.

jessehouwing commented 6 years ago

Looks like other changes have since been done and are causing a merge conflict. There's not much to do about that other then switching to gated check-ins, in which case the build will always win when you use the update gated changes option.

On Sat, 21 Jul 2018, 02:42 Andrew, notifications@github.com wrote:

2018-07-21T00:39:58.5008121Z

[error]System.Management.Automation.MethodInvocationException: Exception

calling "CheckIn" with "1" argument(s): "TF10141: No files checked in: resolve the conflicts and try again." ---> Microsoft.TeamFoundation.VersionControl.Client.CheckinException: TF10141: No files checked in: resolve the conflicts and try again.

Receiving an error after adding a few files, and then trying to Check-In with Auto Detect Adds enabled. If there are no files in the folder initially it works fine, but if it's adding to existing files it fails with the above error.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jessehouwing/vsts-tfvc-tasks/issues/66, or mute the thread https://github.com/notifications/unsubscribe-auth/AD-uSwudEvjIo44E9O8JzIMdCyEWLS90ks5uInkKgaJpZM4VZbBa .

abvogel commented 6 years ago

It seems odd, as I'm running this against a test folder that only I control- 1) Map folder and download from source control 2) Delete everything in folder 3) Copy zip file into folder 4) Extract zip file into folder, overwriting a few files and adding a few new files 5) Run the TFVC check-in with auto delete/add enabled

And that's when the error hits. Am I missing something obvious?

jessehouwing commented 6 years ago

Any pending changes on that folder in source control? The server is blocking the checkin, it sees conflicting changes.

On Sat, 21 Jul 2018, 20:31 Andrew, notifications@github.com wrote:

It seems odd, as I'm running this against a test folder that only I control-

  1. Map folder and download from source control
  2. Delete everything in folder
  3. Copy zip file into folder
  4. Extract zip file into folder, overwriting a few files and adding a few new files
  5. Run the TFVC check-in with auto delete/add enabled

And that's when the error hits. Am I missing something obvious?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jessehouwing/vsts-tfvc-tasks/issues/66#issuecomment-406814865, or mute the thread https://github.com/notifications/unsubscribe-auth/AD-uS_6WURP7JJ7sZ2Xx66KmFHnHtdgBks5uI3NkgaJpZM4VZbBa .

abvogel commented 6 years ago

Nope. I can get it to work if I delete all content in the folder and check it in via Visual Studio, and then run it for the first time. The second time I run it, it hits that conflict.

jessehouwing commented 6 years ago

Hmmm that's weird. What does tf status say followed by tf checkin?

On Sat, 21 Jul 2018, 20:37 Andrew, notifications@github.com wrote:

Nope. I can get it to work if I delete all content in the folder and check it in via Visual Studio, and then run it for the first time. The second time I run it, it hits that conflict.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jessehouwing/vsts-tfvc-tasks/issues/66#issuecomment-406815217, or mute the thread https://github.com/notifications/unsubscribe-auth/AD-uS7Z_4hCY0FTHGwo2xVrb87FlpDXCks5uI3TUgaJpZM4VZbBa .

abvogel commented 6 years ago

Hm...

Checking in add: Filename.xml C:\vstsagent\a4\externals\vstsom\TF.exe : Conflict: The item $/Collection/Other/AnotherFile.xml already exists. At line:1 char:1

Conflict: The item $/Collection/Other/Filename.xml already exists. TF10141: No files checked in: resolve the conflicts and try again.

jessehouwing commented 6 years ago

It's detected as an add, not as an edit.

On Sat, 21 Jul 2018, 21:44 Andrew, notifications@github.com wrote:

Hm...

Checking in add: Filename.xml C:\vstsagent\a4\externals\vstsom\TF.exe : Conflict: The item $/Collection/Other/AnotherFile.xml already exists. At line:1 char:1

  • C:\vstsagent\a4\externals\vstsom\TF.exe checkin
    • CategoryInfo : NotSpecified: (Conflict: The i...already exists.:String) [], RemoteException
    • FullyQualifiedErrorId : NativeCommandError

Conflict: The item $/Collection/Other/Filename.xml already exists. TF10141: No files checked in: resolve the conflicts and try again.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jessehouwing/vsts-tfvc-tasks/issues/66#issuecomment-406819365, or mute the thread https://github.com/notifications/unsubscribe-auth/AD-uS0vFmAFQsMff4mmggVoHB7QPfCUQks5uI4SGgaJpZM4VZbBa .

abvogel commented 6 years ago

Thanks for the help - I'm not sure why it's doing that still, but it gives me a direction.

abvogel commented 6 years ago

I was able to fix it by performing my extracting in a separate directory, then copying into the mapped folder. Apparently extracting to the directory caused it to register an add instead of update.

jessehouwing commented 6 years ago

Weird. But thanks for the update :).

On Sat, 21 Jul 2018, 22:10 Andrew, notifications@github.com wrote:

I was able to fix it by performing my extracting in a separate directory, then copying into the mapped folder. Apparently extracting to the directory caused it to register an add instead of update.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jessehouwing/vsts-tfvc-tasks/issues/66#issuecomment-406820680, or mute the thread https://github.com/notifications/unsubscribe-auth/AD-uS8nKn5B_wMLgLTshcZR7OcBi78DKks5uI4qegaJpZM4VZbBa .