From: "Liu, Xuhui (Jackson)" <Xuhui.Liu@amd.com>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Bug Report: git-p4 unshelve failed
Date: Tue, 15 Sep 2020 01:09:07 +0000 [thread overview]
Message-ID: <DM6PR12MB3194C9B3A462968FA5A05B4CFA200@DM6PR12MB3194.namprd12.prod.outlook.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 739 bytes --]
Hi Git,
When I use "git p4 unshelve 4495953", it failed.
I have fixed this issue locally. You can check the attached for details.
What have I done to fix this:
It's because the line#4240 in function "findLastP4Revision" of git-p4.py:
log = extractLogMessageFromGitCommit("{0}^{1}".format(starting_point, parent))
I think it should be:
log = extractLogMessageFromGitCommit("{0}~{1}".format(starting_point, parent))
Best Regards,
Jackson(Xuhui) Liu
-------------------------------------------------------------------------------------
1-14F, Tower 1, Candor Plaza No.669 Huanke Rd., Pudong District, Shanghai 201210, China
Facebook | Twitter | amd.com
[-- Attachment #2: git-bugreport-2020-09-15-0828.txt --]
[-- Type: text/plain, Size: 2778 bytes --]
Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.
What did you do before the bug happened? (Steps to reproduce your issue)
git p4 unshelve -v 4495953
What did you expect to happen? (Expected behavior)
I want to get shelved changelist 4495953.
What happened instead? (Actual behavior)
It failed.
Here is the output log:
Reading pipe: ['git', '--git-dir', '/mnt/c/workSpace/project/git4perforce/ispDevelop/stg_3_0/.git', 'rev-parse', '--git-dir']
Reading pipe: ['git', '--git-dir', '/mnt/c/workSpace/project/git4perforce/ispDevelop/stg_3_0/.git', 'rev-parse', '--git-dir']
Reading pipe: ['git', 'config', 'git-p4.largeFileSystem']
Reading pipe: ['git', 'config', 'git-p4.syncFromOrigin']
Reading pipe: ['git', 'cat-file', 'commit', 'HEAD^0']
Reading pipe: ['git', 'cat-file', 'commit', 'HEAD^1']
Reading pipe: ['git', 'cat-file', 'commit', 'HEAD^2']
fatal: Not a valid object name HEAD^2
Traceback (most recent call last):
File "/home/xuhuiliu/gitp4/git-p4.py", line 4438, in <module>
main()
File "/home/xuhuiliu/gitp4/git-p4.py", line 4432, in main
if not cmd.run(args):
File "/home/xuhuiliu/gitp4/git-p4.py", line 4295, in run
settings = self.findLastP4Revision(self.origin)
File "/home/xuhuiliu/gitp4/git-p4.py", line 4240, in findLastP4Revision
log = extractLogMessageFromGitCommit("{0}^{1}".format(starting_point, parent))
File "/home/xuhuiliu/gitp4/git-p4.py", line 875, in extractLogMessageFromGitCommit
for log in read_pipe_lines(["git", "cat-file", "commit", commit]):
File "/home/xuhuiliu/gitp4/git-p4.py", line 349, in read_pipe_lines
die('Command failed: %s' % str(c))
File "/home/xuhuiliu/gitp4/git-p4.py", line 156, in die
raise Exception(msg)
Exception: Command failed: ['git', 'cat-file', 'commit', 'HEAD^2']
What's different between what you expected and what actually happened?
I want it to sync 4495953, but it failed.
Anything else you want to add:
I have fixed it locally.
It's because the line#4240 in function "findLastP4Revision" of git-p4.py:
log = extractLogMessageFromGitCommit("{0}^{1}".format(starting_point, parent))
I think it should be:
log = extractLogMessageFromGitCommit("{0}~{1}".format(starting_point, parent))
Please review the rest of the bug report below.
You can delete any lines you don't wish to share.
[System Info]
git version:
git version 2.28.0
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 4.4.0-18362-Microsoft #836-Microsoft Mon May 05 16:04:00 PST 2020 x86_64
compiler info: gnuc: 9.3
libc info: glibc: 2.31
$SHELL (typically, interactive shell): /bin/bash
[Enabled Hooks]
next reply other threads:[~2020-09-15 1:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-15 1:09 Liu, Xuhui (Jackson) [this message]
2020-09-16 12:59 ` Bug Report: git-p4 unshelve failed Luke Diamand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DM6PR12MB3194C9B3A462968FA5A05B4CFA200@DM6PR12MB3194.namprd12.prod.outlook.com \
--to=xuhui.liu@amd.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).