git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Bug Report: git-p4 unshelve failed
@ 2020-09-15  1:09 Liu, Xuhui (Jackson)
  2020-09-16 12:59 ` Luke Diamand
  0 siblings, 1 reply; 2+ messages in thread
From: Liu, Xuhui (Jackson) @ 2020-09-15  1:09 UTC (permalink / raw)
  To: git@vger.kernel.org

[-- 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]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-16 20:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-15  1:09 Bug Report: git-p4 unshelve failed Liu, Xuhui (Jackson)
2020-09-16 12:59 ` Luke Diamand

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).