{"thread":{"id":"37097","subject":"git p4 diff-tree ambiguous argument error","startedAt":"2014-07-10T17:30:28Z","lastAt":"2014-07-12T19:19:17Z","messageCount":7,"participants":["Bill Door","Luke Diamand","Duane Murphy","Pete Wyckoff"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"245697","messageId":"1405013428825-7614774.post@n2.nabble.com","threadId":"37097","inReplyTo":null,"subject":"git p4 diff-tree ambiguous argument error","fromName":"Bill Door","fromEmail":"duanemurphy@mac.com","sentAt":"2014-07-10T17:30:28Z","receivedAt":"2014-07-10T17:30:28Z","isPatch":false,"sender":{"key":"duanemurphy@mac.com","avatar":"https://gravatar.com/avatar/5b2fbb04ffc1895105750bf2989760c065e01596b8bd65059de774d4c1d0a963?d=mp&s=160"},"body":"$ git p4 sync --detect-branches --import-labels //main@all\n... Lots of useful information elided\nfatal: ambiguous argument 'git-p4-tmp/8031': unknown revision or path not in\nthe working tree.\nUse '--' to separate paths from revisions, like this:\n'git <command> [<revision>...] -- [<file>...]'\nCommand failed: ['git', 'diff-tree',\n'6b3ef26a3e2635a5ff0170e15fdadb386672f8b9', 'git-p4-tmp/8031']\n\nIf I re-run the command, it works the second time. Of course there are\n73000+ commits. This is gonna take a while.\n\nI've done some debugging. It appears there is a timing problem between\ngit-p4 and git. \n\nThe failure occurs in P4Sync.searchParent(). Even though a checkpoint is\nsent to git (for fast-import) just prior to the call to searchParent() in\nimportChanges(), the file does not yet exist. I used pdb, paused the program\njust before the call to diff-tree and the file was missing. After the\nprogram exits due to the error the file exists (i.e. the OS flushed the\nfile). This is why re-running continues to work, there is an \"old\" file with\nbasically the same information laying around (dangerous).\n\nHow can I get git (fast-import) to flush the file at the right time?\n\n$ git --version\ngit version 1.7.12.4\n$ python --version\nPython 2.6.6\nOS: GNU/Linux 2.6.32-431.el6.x86_64\n\n\n\n\n--\nView this message in context: http://git.661346.n2.nabble.com/git-p4-diff-tree-ambiguous-argument-error-tp7614774.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"245701","messageId":"53BED67D.8080006@diamand.org","threadId":"37097","inReplyTo":"1405013428825-7614774.post@n2.nabble.com","subject":"Re: git p4 diff-tree ambiguous argument error","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2014-07-10T18:07:57Z","receivedAt":"2014-07-10T18:07:57Z","isPatch":false,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"Is this using NFS, or local storage?\n\n\n\nOn 10/07/14 18:30, Bill Door wrote:\n> $ git p4 sync --detect-branches --import-labels //main@all\n> ... Lots of useful information elided\n> fatal: ambiguous argument 'git-p4-tmp/8031': unknown revision or path not in\n> the working tree.\n> Use '--' to separate paths from revisions, like this:\n> 'git <command> [<revision>...] -- [<file>...]'\n> Command failed: ['git', 'diff-tree',\n> '6b3ef26a3e2635a5ff0170e15fdadb386672f8b9', 'git-p4-tmp/8031']\n>\n> If I re-run the command, it works the second time. Of course there are\n> 73000+ commits. This is gonna take a while.\n>\n> I've done some debugging. It appears there is a timing problem between\n> git-p4 and git.\n>\n> The failure occurs in P4Sync.searchParent(). Even though a checkpoint is\n> sent to git (for fast-import) just prior to the call to searchParent() in\n> importChanges(), the file does not yet exist. I used pdb, paused the program\n> just before the call to diff-tree and the file was missing. After the\n> program exits due to the error the file exists (i.e. the OS flushed the\n> file). This is why re-running continues to work, there is an \"old\" file with\n> basically the same information laying around (dangerous).\n>\n> How can I get git (fast-import) to flush the file at the right time?\n>\n> $ git --version\n> git version 1.7.12.4\n> $ python --version\n> Python 2.6.6\n> OS: GNU/Linux 2.6.32-431.el6.x86_64\n>\n>\n>\n>\n> --\n> View this message in context: http://git.661346.n2.nabble.com/git-p4-diff-tree-ambiguous-argument-error-tp7614774.html\n> Sent from the git mailing list archive at Nabble.com.\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n"},{"id":"245702","messageId":"4EECAC73-DACA-4C0F-AE97-944F0DEE490B@mac.com","threadId":"37097","inReplyTo":"53BED67D.8080006@diamand.org","subject":"Re: git p4 diff-tree ambiguous argument error","fromName":"Duane Murphy","fromEmail":"duanemurphy@mac.com","sentAt":"2014-07-10T18:08:59Z","receivedAt":"2014-07-10T18:08:59Z","isPatch":false,"sender":{"key":"duanemurphy@mac.com","avatar":"https://gravatar.com/avatar/5b2fbb04ffc1895105750bf2989760c065e01596b8bd65059de774d4c1d0a963?d=mp&s=160"},"body":"All local storage.\n\n …Duane\n\nOn Jul 10, 2014, at 11:07 AM, Luke Diamand <luke@diamand.org> wrote:\n\n> Is this using NFS, or local storage?\n> \n> \n> \n> On 10/07/14 18:30, Bill Door wrote:\n>> $ git p4 sync --detect-branches --import-labels //main@all\n>> ... Lots of useful information elided\n>> fatal: ambiguous argument 'git-p4-tmp/8031': unknown revision or path not in\n>> the working tree.\n>> Use '--' to separate paths from revisions, like this:\n>> 'git <command> [<revision>...] -- [<file>...]'\n>> Command failed: ['git', 'diff-tree',\n>> '6b3ef26a3e2635a5ff0170e15fdadb386672f8b9', 'git-p4-tmp/8031']\n>> \n>> If I re-run the command, it works the second time. Of course there are\n>> 73000+ commits. This is gonna take a while.\n>> \n>> I've done some debugging. It appears there is a timing problem between\n>> git-p4 and git.\n>> \n>> The failure occurs in P4Sync.searchParent(). Even though a checkpoint is\n>> sent to git (for fast-import) just prior to the call to searchParent() in\n>> importChanges(), the file does not yet exist. I used pdb, paused the program\n>> just before the call to diff-tree and the file was missing. After the\n>> program exits due to the error the file exists (i.e. the OS flushed the\n>> file). This is why re-running continues to work, there is an \"old\" file with\n>> basically the same information laying around (dangerous).\n>> \n>> How can I get git (fast-import) to flush the file at the right time?\n>> \n>> $ git --version\n>> git version 1.7.12.4\n>> $ python --version\n>> Python 2.6.6\n>> OS: GNU/Linux 2.6.32-431.el6.x86_64\n>> \n>> \n>> \n>> \n>> --\n>> View this message in context: http://git.661346.n2.nabble.com/git-p4-diff-tree-ambiguous-argument-error-tp7614774.html\n>> Sent from the git mailing list archive at Nabble.com.\n>> --\n>> To unsubscribe from this list: send the line \"unsubscribe git\" in\n>> the body of a message to majordomo@vger.kernel.org\n>> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>> \n> \n"},{"id":"245703","messageId":"BEE93DDF-7F3E-423D-AA3F-0D72E8FD08B3@mac.com","threadId":"37097","inReplyTo":"4EECAC73-DACA-4C0F-AE97-944F0DEE490B@mac.com","subject":"Re: git p4 diff-tree ambiguous argument error","fromName":"Duane Murphy","fromEmail":"duanemurphy@mac.com","sentAt":"2014-07-10T19:19:11Z","receivedAt":"2014-07-10T19:19:11Z","isPatch":false,"sender":{"key":"duanemurphy@mac.com","avatar":"https://gravatar.com/avatar/5b2fbb04ffc1895105750bf2989760c065e01596b8bd65059de774d4c1d0a963?d=mp&s=160"},"body":"Some additional investigation. \n\nI am working in a copy of a repository that was originally used to pull the data \nfrom Perforce. As part of my experiments to figure out this problem, I deleted \nthe contents of .git/git-p4-tmp/. \n\nI noticed that git-p4 would continue if those files were present. I have now \ncopied the files that were in .git/git-p4-tmp/ from the other repository. \n\ngit-p4 is not crashing now, but I also noticed that none of the dates on these files\nhave changed. These files should have been touched each time that a branch is taken,\nbut these files have not changed while the sync is running.\n\nThat seems significant. \n\nI expect git-p4 to crash again on a new commit that is not in .git/git-p4-tmp/. \nThen I have to start the 8-12 hour process over again (did I mention 70k commits?).\n\n …Duane\n\nOn Jul 10, 2014, at 11:08 AM, Duane Murphy <duanemurphy@mac.com> wrote:\n\n> All local storage.\n> \n> …Duane\n> \n> On Jul 10, 2014, at 11:07 AM, Luke Diamand <luke@diamand.org> wrote:\n> \n>> Is this using NFS, or local storage?\n>> \n>> \n>> \n>> On 10/07/14 18:30, Bill Door wrote:\n>>> $ git p4 sync --detect-branches --import-labels //main@all\n>>> ... Lots of useful information elided\n>>> fatal: ambiguous argument 'git-p4-tmp/8031': unknown revision or path not in\n>>> the working tree.\n>>> Use '--' to separate paths from revisions, like this:\n>>> 'git <command> [<revision>...] -- [<file>...]'\n>>> Command failed: ['git', 'diff-tree',\n>>> '6b3ef26a3e2635a5ff0170e15fdadb386672f8b9', 'git-p4-tmp/8031']\n>>> \n>>> If I re-run the command, it works the second time. Of course there are\n>>> 73000+ commits. This is gonna take a while.\n>>> \n>>> I've done some debugging. It appears there is a timing problem between\n>>> git-p4 and git.\n>>> \n>>> The failure occurs in P4Sync.searchParent(). Even though a checkpoint is\n>>> sent to git (for fast-import) just prior to the call to searchParent() in\n>>> importChanges(), the file does not yet exist. I used pdb, paused the program\n>>> just before the call to diff-tree and the file was missing. After the\n>>> program exits due to the error the file exists (i.e. the OS flushed the\n>>> file). This is why re-running continues to work, there is an \"old\" file with\n>>> basically the same information laying around (dangerous).\n>>> \n>>> How can I get git (fast-import) to flush the file at the right time?\n>>> \n>>> $ git --version\n>>> git version 1.7.12.4\n>>> $ python --version\n>>> Python 2.6.6\n>>> OS: GNU/Linux 2.6.32-431.el6.x86_64\n>>> \n>>> \n>>> \n>>> \n>>> --\n>>> View this message in context: http://git.661346.n2.nabble.com/git-p4-diff-tree-ambiguous-argument-error-tp7614774.html\n>>> Sent from the git mailing list archive at Nabble.com.\n>>> --\n>>> To unsubscribe from this list: send the line \"unsubscribe git\" in\n>>> the body of a message to majordomo@vger.kernel.org\n>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>>> \n>> \n> \n"},{"id":"245804","messageId":"1405100449405-7614882.post@n2.nabble.com","threadId":"37097","inReplyTo":"1405013428825-7614774.post@n2.nabble.com","subject":"Re: git p4 diff-tree ambiguous argument error","fromName":"Bill Door","fromEmail":"duanemurphy@mac.com","sentAt":"2014-07-11T17:40:49Z","receivedAt":"2014-07-11T17:40:49Z","isPatch":false,"sender":{"key":"duanemurphy@mac.com","avatar":"https://gravatar.com/avatar/5b2fbb04ffc1895105750bf2989760c065e01596b8bd65059de774d4c1d0a963?d=mp&s=160"},"body":"More data points. I have reproduced the problem on\n\n$ git --version\ngit version 1.8.5.2 (Apple Git-48)\n$ python --version\nPython 2.7.5\n$ uname -a\nDarwin Kernel Version 13.3.0: Tue Jun  3 21:27:35 PDT 2014;\nroot:xnu-2422.110.17~1/RELEASE_X86_64 x86_64\n\nHowever, it the command is used on a new empty repository, there is no\nfailure. Running a second time causes the failure. \n\nThanks for any help you can offer in tracking down this problem!\n\n\n\n--\nView this message in context: http://git.661346.n2.nabble.com/git-p4-diff-tree-ambiguous-argument-error-tp7614774p7614882.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"245898","messageId":"20140712181034.GB26857@padd.com","threadId":"37097","inReplyTo":"BEE93DDF-7F3E-423D-AA3F-0D72E8FD08B3@mac.com","subject":"Re: git p4 diff-tree ambiguous argument error","fromName":"Pete Wyckoff","fromEmail":"pw@padd.com","sentAt":"2014-07-12T18:10:34Z","receivedAt":"2014-07-12T18:10:34Z","isPatch":false,"sender":{"key":"pw@padd.com","avatar":null},"body":"duanemurphy@mac.com wrote on Thu, 10 Jul 2014 12:19 -0700:\n> Some additional investigation. \n> \n> I am working in a copy of a repository that was originally used to pull the data \n> from Perforce. As part of my experiments to figure out this problem, I deleted \n> the contents of .git/git-p4-tmp/. \n> \n> I noticed that git-p4 would continue if those files were present. I have now \n> copied the files that were in .git/git-p4-tmp/ from the other repository. \n> \n> git-p4 is not crashing now, but I also noticed that none of the dates on these files\n> have changed. These files should have been touched each time that a branch is taken,\n> but these files have not changed while the sync is running.\n> \n> That seems significant. \n> \n> I expect git-p4 to crash again on a new commit that is not in .git/git-p4-tmp/. \n> Then I have to start the 8-12 hour process over again (did I mention 70k commits?).\n\nBizarre.  That directory is really supposed to be temporary, and\nlive only during a single git p4 invocation.  It's just a bunch\nof branch heads for the temporary commits.  I don't know why\nthose branches, and the git-p4-tmp directory, hang around after\nyou run git p4.  Might be worth your investigation.\n\nThe second weirdness is why a new run doesn't create the branch.\nThis maybe points to self.checkpoint() not really checkpointing.\nIt does send a \"checkpoint\" down the git fast-import stream,\nwhich is supposed to make it write the branches out.  You might\nconsider grabbing the fast-import process in a debugger and see\nwhy it's not writing out the branch head.\n\nThere's lots of changes since v1.7.12.4, but nothing obvious I\ncan see that would cause this.  Sorry,\n\n\t\t-- Pete\n"},{"id":"245901","messageId":"C7987A96-1BC3-4551-BC35-2040A96D20A5@mac.com","threadId":"37097","inReplyTo":"20140712181034.GB26857@padd.com","subject":"Re: git p4 diff-tree ambiguous argument error","fromName":"Duane Murphy","fromEmail":"duanemurphy@mac.com","sentAt":"2014-07-12T19:19:17Z","receivedAt":"2014-07-12T19:19:17Z","isPatch":false,"sender":{"key":"duanemurphy@mac.com","avatar":"https://gravatar.com/avatar/5b2fbb04ffc1895105750bf2989760c065e01596b8bd65059de774d4c1d0a963?d=mp&s=160"},"body":"On Jul 12, 2014, at 11:10 AM, Pete Wyckoff <pw@padd.com> wrote:\n\n>> Some additional investigation. \n>> \n>> I am working in a copy of a repository that was originally used to pull the data \n>> from Perforce. As part of my experiments to figure out this problem, I deleted \n>> the contents of .git/git-p4-tmp/. \n>> \n>> I noticed that git-p4 would continue if those files were present. I have now \n>> copied the files that were in .git/git-p4-tmp/ from the other repository. \n>> \n>> git-p4 is not crashing now, but I also noticed that none of the dates on these files\n>> have changed. These files should have been touched each time that a branch is taken,\n>> but these files have not changed while the sync is running.\n>> \n>> That seems significant. \n>> \n>> I expect git-p4 to crash again on a new commit that is not in .git/git-p4-tmp/. \n>> Then I have to start the 8-12 hour process over again (did I mention 70k commits?).\n> \n> Bizarre.  That directory is really supposed to be temporary, and\n> live only during a single git p4 invocation.  It's just a bunch\n> of branch heads for the temporary commits.  I don't know why\n> those branches, and the git-p4-tmp directory, hang around after\n> you run git p4.  Might be worth your investigation.\n\nThe reason the files are still there is because git-p4 crashes (exits with an error) and doesn't clean them up.\n\nWhen git-p4 exits cleanly, the directory is fine. My experience is that git-p4 exists abnormally often enough. \n\n> The second weirdness is why a new run doesn't create the branch.\n> This maybe points to self.checkpoint() not really checkpointing.\n> It does send a \"checkpoint\" down the git fast-import stream,\n> which is supposed to make it write the branches out.  You might\n> consider grabbing the fast-import process in a debugger and see\n> why it's not writing out the branch head.\n\nI started looking at the code for fast-import. There's a lot of code there, so didn't go down that path.\n\nI've posted another message indicating that I sincerely believe the problem is in git-fast-import. My current working theory is that \nbecause the file matches another commit (that's the point of writing the commit) git-fast-import doesn't flush the file. I've clearly \nstopped git-p4 immediately after the checkpoint and there is no file. When the program exits (abnormally of course), the file appears\n(thanks to the file system). Seems like a flush problem somewhere.\n\nI was hoping someone who knows git-fast-import would have a clue as to the problem.\n\n> There's lots of changes since v1.7.12.4, but nothing obvious I\n> can see that would cause this.  Sorry,\n\nThanks for taking a look.\n"}]}