git-tfs icon indicating copy to clipboard operation
git-tfs copied to clipboard

git-tfs stuck in an infinite loop when pulling a particular branch

Open danielstocker opened this issue 6 years ago • 3 comments

Hi there,

I am facing an issue while trying to clone a TFVC repo from a TFS server using git-tfs, and was hoping to get some help in debugging/fixing it.

Everything works fine until the process hits $/TheWarehouse/dev_stream1-100416-Favourite Station, where the process gets trapped in an infinite loop.

I am not familiar with the enlistment itself, but it looks like "$/TheWarehouse/dev_stream1-100416-Favourite Station" is a renamed branch at was "$/TheWarehouse/dev_stream1-100416 - Favourite Station" at some point in time.

If I am reading the log correctly it looks as though git-tfs was pulling down a changeset, realised it already existed in the renamed version of the branch. As a result no new commit gets created and the iterative process continues to try and pull the same changeset. Please correct me if I am misinterpreting it. (log below)

I am happy to try and fix this, if you could help me figure out where I'd need to look and what is exactly going on based on the log.

2018-05-24 12:31:21.2544 [Debug] Begin process of creating branch for remote :$/TheWarehouse/dev_stream1-100721-DimCard 2018-05-24 12:31:21.2544 [Info] The name of the local branch will be : dev_stream1-100721-DimCard 2018-05-24 12:31:21.2687 [Debug] Git local branch will be :dev_stream1-100721-DimCard 2018-05-24 12:31:21.2687 [Debug] Looking for changeset 84849 in git repository... 2018-05-24 12:31:30.6555 [Debug] Looking for root changeset tree on $/TheWarehouse/dev_stream1-100416-Favourite Station 2018-05-24 12:31:30.6555 [Debug] Looking for root changeset for branch:$/TheWarehouse/dev_stream1-100416-Favourite Station 2018-05-24 12:31:30.6555 [Debug] Looking to find branch '$/TheWarehouse/dev_stream1-100416-Favourite Station' in all TFS branches... 2018-05-24 12:31:30.6711 [Debug] Found parent branch : $/TheWarehouse/dev_stream1 2018-05-24 12:31:32.3906 [Debug] Merge: Delete, SourceRename C84849 $/TheWarehouse/dev_stream1-100416 - Favourite Station Source Delete, SourceRename C84849 $/TheWarehouse/dev_stream1-100416-Favourite Station 2018-05-24 12:31:32.3906 [Debug] Found C84849 on branch $/TheWarehouse/dev_stream1-100416 - Favourite Station 2018-05-24 12:31:32.4062 [Debug] Found original branch '$/TheWarehouse/dev_stream1-100416 - Favourite Station' (renamed in branch '$/TheWarehouse/dev_stream1-100416-Favourite Station') 2018-05-24 12:31:32.4062 [Debug] Looking for root changeset for branch:$/TheWarehouse/dev_stream1-100416 - Favourite Station 2018-05-24 12:31:32.4062 [Debug] Looking to find branch '$/TheWarehouse/dev_stream1-100416 - Favourite Station' in all TFS branches... 2018-05-24 12:31:32.4219 [Debug] Found parent branch : $/TheWarehouse/dev_stream1 2018-05-24 12:31:34.5242 [Debug] Merge: Delete, SourceRename C84794 $/TheWarehouse/dev_stream1-100416 - Favourite Station Source Delete C84772 $/TheWarehouse/dev_stream1 2018-05-24 12:31:34.5242 [Debug] Found C84772 on branch $/TheWarehouse/dev_stream1 2018-05-24 12:31:34.5398 [Debug] Begin process of creating branch for remote :$/TheWarehouse/dev_stream1-100416-Favourite Station 2018-05-24 12:31:34.5398 [Info] The name of the local branch will be : dev_stream1-100416-FavouriteStation 2018-05-24 12:31:34.5398 [Debug] Git local branch will be :dev_stream1-100416-FavouriteStation 2018-05-24 12:31:34.5398 [Debug] Looking for changeset 84772 in git repository... 2018-05-24 12:31:34.5554 [Debug] Found commit 8e9a8b34f7d180531d92bddbff1fc4623e5f429b for changeset :84772 2018-05-24 12:31:34.5554 [Debug] Remote already exist 2018-05-24 12:31:34.5554 [Debug] warning: TFS repository path is different 2018-05-24 12:31:34.5710 [Debug] Remote created! 2018-05-24 12:31:34.6648 [Debug] info: refs/remotes/tfs/dev_stream1-100416-FavouriteStation: Getting changesets from 84653 to -1 ... 2018-05-24 12:31:38.1231 [Debug] Setting up a TFS workspace at .git~w 2018-05-24 12:31:38.6075 [Debug] TFS Workspace 'git-tfs-475d48cb-5db2-4e62-9cff-88a0376e421d;Daniel Stocker' was removed. 2018-05-24 12:31:38.6075 [Debug] Cleaning... 2018-05-24 12:31:38.6075 [Debug] Begin process of creating branch for remote :$/TheWarehouse/dev_stream1-100416-Favourite Station 2018-05-24 12:31:38.6231 [Info] The name of the local branch will be : dev_stream1-100416-FavouriteStation 2018-05-24 12:31:38.6231 [Debug] Git local branch will be :dev_stream1-100416-FavouriteStation 2018-05-24 12:31:38.6231 [Debug] Looking for changeset 84849 in git repository... 2018-05-24 12:31:48.5769 [Debug] Looking for root changeset tree on $/TheWarehouse/dev_stream1-100416-Favourite Station 2018-05-24 12:31:48.5925 [Debug] Looking for root changeset for branch:$/TheWarehouse/dev_stream1-100416-Favourite Station 2018-05-24 12:31:48.5925 [Debug] Looking to find branch '$/TheWarehouse/dev_stream1-100416-Favourite Station' in all TFS branches... 2018-05-24 12:31:48.5925 [Debug] Found parent branch : $/TheWarehouse/dev_stream1 2018-05-24 12:31:50.1864 [Debug] Merge: Delete, SourceRename C84849 $/TheWarehouse/dev_stream1-100416 - Favourite Station Source Delete, SourceRename C84849 $/TheWarehouse/dev_stream1-100416-Favourite Station 2018-05-24 12:31:50.1864 [Debug] Found C84849 on branch $/TheWarehouse/dev_stream1-100416 - Favourite Station 2018-05-24 12:31:50.2019 [Debug] Found original branch '$/TheWarehouse/dev_stream1-100416 - Favourite Station' (renamed in branch '$/TheWarehouse/dev_stream1-100416-Favourite Station') 2018-05-24 12:31:50.2019 [Debug] Looking for root changeset for branch:$/TheWarehouse/dev_stream1-100416 - Favourite Station 2018-05-24 12:31:50.2019 [Debug] Looking to find branch '$/TheWarehouse/dev_stream1-100416 - Favourite Station' in all TFS branches... 2018-05-24 12:31:50.2176 [Debug] Found parent branch : $/TheWarehouse/dev_stream1 2018-05-24 12:31:52.1790 [Debug] Merge: Delete, SourceRename C84794 $/TheWarehouse/dev_stream1-100416 - Favourite Station Source Delete C84772 $/TheWarehouse/dev_stream1 2018-05-24 12:31:52.1790 [Debug] Found C84772 on branch $/TheWarehouse/dev_stream1 2018-05-24 12:31:52.1790 [Debug] Begin process of creating branch for remote :$/TheWarehouse/dev_stream1-100416-Favourite Station 2018-05-24 12:31:52.1946 [Info] The name of the local branch will be : dev_stream1-100416-FavouriteStation

This continues until the stack overflows...

danielstocker avatar May 25 '18 10:05 danielstocker

submitted too early by accident, reopening after adding the proper description

danielstocker avatar May 25 '18 10:05 danielstocker

This is a duplicate of #873. See the discussions there. I think there was even a PR to attempt to resolve the issue--but as you have noticed, the issue is still not 100% resolved.

fourpastmidnight avatar Jul 12 '18 15:07 fourpastmidnight

Same bug? Mine looks like this, using git-tfs 0.29.0 on a project I'm not familiar with. Right before the repeating starts:

C7451 = 3cf407a1d29ff9527e83d37c65cdd632a553758f
GC Countdown: 192
Looking for changeset 7437 in git repository...
 => Commit 7437 not found! 

Then this section repeats until "Process terminated due to StackOverflowException":

Looking for root changeset tree on $/TheProjectName/TheBranchName
Looking for root changeset for branch:$/TheProjectName/TheBranchName
Looking to find branch '$/TheProjectName/TheBranchName' in all TFS branches...
Looking for all branches...
Found parent branch : $/TheProjectName/Dev
Merge: `Delete, SourceRename` C7437 `$/TheProjectName/Root` Source `Rename` C7437 `$/TheProjectName/TheBranchName`
Found C7437 on branch $/TheProjectName/Root
Found original branch '$/TheProjectName/Root' (renamed in branch '$/TheProjectName/TheBranchName')
Looking for root changeset for branch:$/TheProjectName/Root
Looking to find branch '$/TheProjectName/Root' in all TFS branches...
There is no parent branch for $/TheProjectName/Root. Ignoring.
Begin process of creating branch for remote :$/TheProjectName/TheBranchName
The name of the local branch will be : TheBranchName
Git local branch will be :TheBranchName
Looking for changeset 7437 in git repository...
Looking for changeset 7437 in git repository: CacheIsFull, stopped looking.

jnm2 avatar Aug 25 '18 18:08 jnm2