This project is read-only.

git-tf checkin with moved files.

Apr 10, 2014 at 3:16 PM
I am trying to do a deep checkin of a git repository that has a commit where multiple files were moved between folders. I am running into the error "... already has pending changes".

I have tried
"git-tf checkin --deep --autosquash"
"git-tf checkin --deep --autosquash --renamemode=all"
"git-tf checkin --deep --autosquash --renamemode=justFiles"
"git-tf checkin --deep --autosquash --renamemode=none"

and all of them seem to get stuck on this commit. Visualizing the git history, I see TFS_xxxxx tags all the way up to this commit.

We are using TFS2010.

Any suggestions on what I can do to get around this?

Thanks!
Apr 10, 2014 at 5:36 PM
Hi,

Which version of Git-TF do you use? Could you collect a detailed log for this issue and send it to my private e-mail address arukhlin@microsoft.com?

To collect an extended log you should create the log4j-git-tf.properties file:
# Set root category priority to DEBUG and its only appender to LOGFILE.
log4j.rootCategory=DEBUG, LOGFILE

#
#     Workspace class
#
# Set logging to TRACE for the Workspace class
log4j.logger.com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Workspace=TRACE, LOGFILE
log4j.additivity.com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Workspace=false

# Set SOAP logging to INFO
log4j.logger.com.microsoft.tfs.core.ws.runtime.client.SOAPService=INFO, SOAP-LOGFILE
log4j.additivity.com.microsoft.tfs.core.ws.runtime.client.SOAPService=false

# CONSOLE log (default)
#log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
#log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
#log4j.appender.CONSOLE.layout.ConversionPattern=%-5p %m%n

# LOGFILE log
log4j.appender.LOGFILE=com.microsoft.gittf.client.clc.util.logging.LogAppender
log4j.appender.LOGFILE.File=git-tf
log4j.appender.LOGFILE.Append=false
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%d %-5p [%t] (%c) %m%n

# SOAP-LOGFILE log
log4j.appender.SOAP-LOGFILE=com.microsoft.gittf.client.clc.util.logging.LogAppender
log4j.appender.SOAP-LOGFILE.File=git-tf-soap
log4j.appender.SOAP-LOGFILE.Append=false
log4j.appender.SOAP-LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.SOAP-LOGFILE.layout.ConversionPattern=%d %m%n
For Git-TF, this file should be installed at:
Windows: %LOCALAPPDATA%\Microsoft\Team Foundation\4.0\Configuration\log4j-git-tf.properties
Ubuntu:  ~/.microsoft/Team Foundation/4.0/Configuration/log4j-git-tf.properties
Mac:     ~/Library/Application Support/Microsoft/Team Foundation/4.0/Configuration/log4j-git-tf.properties

Where:

    %LOCALAPPDATA% = C:\Users\user-name\AppData\Local 
and log files could be found at:
Windows: %LOCALAPPDATA%\Microsoft\Team Foundation\4.0\Logs\git-tf-*.log
Ubuntu:  ~/.microsoft/Team Foundation/4.0/Logs/git-tf-*.log
Mac:     ~/Library/Application Support/Microsoft/Team Foundation/4.0/Logs/git-tf-*.log

Where:
    %LOCALAPPDATA% = C:\Users\user-name\AppData\Local 
Thanks,
Alex
Apr 10, 2014 at 10:48 PM
Hi Cameron,

It looks like you've renamed the file server\controller\trajectory\utils\axistocart.cpp to server\controller\trajectory\utils\AxisToCart.cpp. Did you also change its content significantly (i.e. more than 60% of lines)?

JGit that is used to determine changes in repository has not recognized this rename and generated two changes "delete" and "add". On the other hand, TFS is case-insensitive (while case-preserving) and when we submitted "add" change after "delete" one without intermediate "check-in", it reported an error - the file ... already has pending changes.

I guess, you cannot change the history in the local repository to avoid this situation, can you? That's possible theoretically, but I'm afraid is not feasible practically. I'll try to find a way to fix Git-TF code and provide you wiath a private build. Is that OK with you?

Alex
Apr 11, 2014 at 2:48 PM
It is a historical code-base that was inherited, and I want to preserve the history as much as possible. I can try a private build to see if it works.

Thanks,

Cameron
Apr 11, 2014 at 7:47 PM
Hi Cameron,

I've sent you the new build of Git-TF to your e-mail address (...par.com). Also I've shared it with you on OneDrive.live.com

Alex
Sep 2, 2014 at 1:45 AM
Alex,

I think I am having the same problem that Cameron had. Any chance you could share the new Build with me as well? I am migrating a large SVN repository via Git and Git-TF to TFSVC while preserving history. The comment conversion and fetch from SVN went well but on the Git-Tf checkin, I get an error saying that "... already had pending changes. ". This seems to be on files that are being moved from one directory to another.

I would appreciate any insights or assistance that you can provide.

Thank you,
Deborah