Ho provato a lanciare git p4 submit su un repository che ho eseguito come ponte provvisorio tra git e perforce. Molteplici persone usano il repository come un telecomando e vengono periodicamente rimandati indietro per forza.git p4 invio fallisce
Sta funzionando per lo più bene, ad eccezione di alcuni commit perforati duplicati il cui bizzarro comportamento non riesco a riprodurre. Poi un giorno fuori dal blu ottengo questo errore. Non riesco più a spingere alcun git a impegnarsi.
[email protected]:~/Source/code$ git p4 submit -M --export-labels
Perforce checkout for depot path //depot/perforce/workspace/ located at /home/user/Source/git-p4-area/perforce/workspace/
Synchronizing p4 checkout...
... - file(s) up-to-date.
Applying ffa390f comments in config xml files
//depot/perforce/workspace/sub/folder/structure/first.xml#3 - opened for edit
//depot/perforce/workspace/sub/folder/structure/second.xml#3 - opened for edit
//depot/perforce/workspace/sub/folder/structure/third.xml#3 - opened for edit
//depot/perforce/workspace/sub/folder/structure/forth.xml#3 - opened for edit
//depot/perforce/workspace/sub/folder/structure/fifth.xml#1 - opened for edit
error: patch failed: sub/folder/structure/first.xml:1
error: sub/folder/structure/first.xml: patch does not apply
error: patch failed: sub/folder/structure/second.xml:1
error: sub/folder/structure/second.xml: patch does not apply
error: patch failed: sub/folder/structure/third.xml:1
error: sub/folder/structure/third.xml: patch does not apply
error: patch failed: sub/folder/structure/forth.xml:1
error: sub/folder/structure/forth.xml: patch does not apply
error: patch failed: sub/folder/structure/fifth.xml:1
error: sub/folder/structure/fifth.xml: patch does not apply
Unfortunately applying the change failed!
//depot/perforce/workspace/sub/folder/structure/first.xml#1 - was edit, reverted
//depot/perforce/workspace/sub/folder/structure/second.xml#3 - was edit, reverted
//depot/perforce/workspace/sub/folder/structure/third.xml#3 - was edit, reverted
//depot/perforce/workspace/sub/folder/structure/forth.xml#3 - was edit, reverted
//depot/perforce/workspace/sub/folder/structure/fifth.xml#3 - was edit, reverted
No commits applied.
Tale errore si presenta un po 'come questo errore:
git-p4 submit fails with patch does not apply
tranne che non sto facendo ogni sostituzione parola chiave, quindi non ho idea di cosa potrebbe essere. l'aggiunta di --verbose
non aiuta a spiegare molto (non ho quell'output di comando a portata di mano)
L'unico cambiamento che ho potuto immaginare è che ho aggiunto un file .gitattributes con il seguente contenuto di seguito nel momento in cui fatto il commit. Tuttavia, commette fatto prima di questo impegno, mentre quella gitattributes file è stato al suo posto ha funzionato, quindi non poteva essere che (allora ho fatto le .gitattributes il file più dettagliate)
* text eol=lf
ho cercato il rollback della si impegna in questo repository remoto a destra prima di questo commit offensivo, quindi ripoffialo dal mio repo a questo repository remoto e quindi di nuovo invio. Stesso comportamento. Ho provato a eseguire il rollback e apportare modifiche diverse allo stesso file, ripugnando, reinoltrando. Stesso comportamento. E sembra solo che accada con questi file. Dal momento che il rollback ho provato a fare modifiche ad altri file e funzionano. Ho provato a eseguire dos2unix per forzare le terminazioni di riga unix sui file offensivi, e non è stato risolto nemmeno.
Quale comando può darmi una spiegazione migliore di cosa sta succedendo qui? C'è un file di log git che potrei tail? Qualsiasi assistenza sarebbe apprezzata.
modifica: ho ritestato il mio problema con e senza il file .gitattributes. questo non ha fatto differenza. attualmente viene introdotta l'impostazione globale core.autocrlf. Ma con il file .gitattributes mancante sembrava non fare alcuna differenza. Ecco come appariva quando l'ho ripetuto con solo uno dei file incriminati con --verbose
attivato.
[email protected]:/code$ git p4 submit -M --export-labels --verbose
Reading pipe: git name-rev HEAD
Reading pipe: ['git', 'config', 'git-p4.allowSubmit']
Reading pipe: git rev-parse --symbolic --remotes
Reading pipe: git rev-parse p4/master
Reading pipe: git cat-file commit 0457c7589ea679dcc0c9114b34f8f30bc2ee08cf
Reading pipe: git cat-file commit HEAD~0
Reading pipe: git cat-file commit HEAD~1
Reading pipe: ['git', 'config', 'git-p4.conflict']
Origin branch is remotes/p4/master
Reading pipe: ['git', 'config', '--bool', 'git-p4.useclientspec']
Opening pipe: ['p4', '-G', 'where', '//depot/perforce/workspace/...']
Perforce checkout for depot path //depot/perforce/workspace/ located at /home/user/Source/git-p4-area/perforce/workspace/
Synchronizing p4 checkout...
... - file(s) up-to-date.
Opening pipe: p4 -G opened ...
Reading pipe: ['git', 'rev-list', '--no-merges', 'remotes/p4/master..master']
Reading pipe: ['git', 'config', '--bool', 'git-p4.skipUserNameCheck']
Reading pipe: ['git', 'config', 'git-p4.detectCopies']
Reading pipe: ['git', 'config', '--bool', 'git-p4.detectCopiesHarder']
Reading pipe: ['git', 'show', '-s', '--format=format:%h %s', 'ef3b95f5fec193fe2612b28e2e3b5e7f8ba9419e']
Applying ef3b95f making test change
Opening pipe: p4 -G users
Reading pipe: ['git', 'log', '--max-count=1', '--format=%ae', 'ef3b95f5fec193fe2612b28e2e3b5e7f8ba9419e']
Reading pipe: git diff-tree -r -M "ef3b95f5fec193fe2612b28e2e3b5e7f8ba9419e^" "ef3b95f5fec193fe2612b28e2e3b5e7f8ba9419e"
//depot/perforce/workspace/sub/folder/structure/first.xml#3 - opened for edit
<stdin>:17: trailing whitespace.
<!-- comment line 1 -->
<stdin>:18: trailing whitespace.
<!-- comment line 2 -->
<stdin>:19: trailing whitespace.
<!-- comment line 3 -->
error: patch failed: sub/folder/structure/first.xml:1
error: sub/folder/structure/first.xml: patch does not apply
Unfortunately applying the change failed!
Reading pipe: ['git', 'config', '--bool', 'git-p4.attemptRCSCleanup']
//depot/perforce/workspace/sub/folder/structure/first.xml#3 - was edit, reverted
No commits applied.
Reading pipe: ['git', 'config', '--bool', 'git-p4.exportLabels']
Opening pipe: ['p4', '-G', 'labels', '//depot/ipstor.maple/automation/...']
Reading pipe: ['git', 'tag']
Reading pipe: ['git', 'config', 'git-p4.labelExportRegexp']
Credo che 'git diff-tree -r -M" ef3b95f5fec193fe2612b28e2e3b5e7f8ba9419e^"" ef3b95f5fec193fe2612b28e2e3b5e7f8ba9419e "' e vedere se è possibile applicare le patch manualmente? –