0

I am migrating from TFS to GIT. Salvation is so near but so far ;)

I have a Project P that contains many folders, trunks and branches. I am interested in cloning one of the trunks and associated branches.

All branches below the trunk are branches of the trunk. Nothing has been rebased or renamed. All branches correctly configured parents as far as I can see.


Method 1: Clone With Branches

git tfs clone [TFS URL] $/[Path]/[To]/[Trunk] repo --with-branches --debug --resumable --workspace="repo-ws"

When the first merge changeset is encountered, git tfs looks for other branches, confirms the parentage of each of the branches it finds (all this looks fine) and correctly identifies the branch commit. I see 'changeset x fetched' then the process exits with a warning and a list of the branches that could not be fetched (including the branch involved in the first merge changeset)

LOGS

C6345 = 01a40cfde6632218d5b95f3fed494b3c9913f74b  
GC Countdown: 190  
Looking for changeset 6346 in git repository...  
=> Commit not found!  
Looking for changeset 6346 in git repository...
Tfs branches found:  
- $/[Team Project]/[The Branch]  
Looking to find branch '$/[Team Project]/[The Branch]' in all TFS branches...  
Looking for all branches...  
Found parent branch : $/[Team Project]/[The Trunk]  
Found C5051 on branch $/[Team Project]/[The Branch]

-- other branch logs in here --

=> Working on TFS branch : $/[Team Project]/[The Branch]  
Looking for changeset 5051 in git repository...

-- other branch logs in here --

Fetching remote :default  
Try fetching changesets...  
info: refs/remotes/tfs/default: Getting changesets from 6346 to current ...  
Looking for changeset 6346 in git repository...  
Looking for changeset 6346 in git repository...  
Changeset fetched!

-- gc logs in here --

warning: Some Tfs branches could not have been initialized:
- $/[Team Project]/[The Branch]

-- other branch logs in here --

Process exits here referencing issue 461


Method 2: Clone then init all branches git tfs clone [TFS URL] $/[Path]/[To]/[Trunk] repo --debug --resumable --workspace="repo-ws" cd repo && git tfs branch --init --all

The logs here are in effect identical to the above. When I do the branch init I see git-tfs searching for branches, then finding the parents, then the branching changesets finishing up with the branch init warning as above.


Verification on a separate trunk/branch To test things behave themselves, I created a similar scenario on a clean trunk. A few commits on trunk (T) then branch (B), a few commits on B and a few commits on T, then merge B to T, then a commit on T and a commit on B (just to mirror my prod scenario). Using either method above Git TFS correctly clones the TFS repo and manages branches (method 2 doesn't show the merge in the same way as it'd have to rebase the trunk).


My next move is stepping through the git-tfs code to see if I can work out the issue, but it is a time-consuming given that I am working over a VPN, about 4000 commits into the code-base. It takes forever.

I am looking for pointers as to what might be fouling the git tfs process. What can I look at, any common scenarios? Any methods to quickly debug?

trickbooter
  • 136
  • 6

1 Answers1

1

Building latest from source has resolved this particular problem. Many commits have been made since the last release (0.20).

trickbooter
  • 136
  • 6