git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / 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

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

* Re: Bug Report: git-p4 unshelve failed
  2020-09-15  1:09 Bug Report: git-p4 unshelve failed Liu, Xuhui (Jackson)
@ 2020-09-16 12:59 ` Luke Diamand
  0 siblings, 0 replies; 2+ messages in thread
From: Luke Diamand @ 2020-09-16 12:59 UTC (permalink / raw)
  To: Liu, Xuhui (Jackson); +Cc: git

On Tue, 15 Sep 2020 at 02:09, Liu, Xuhui (Jackson) <Xuhui.Liu@amd.com> wrote:
>
> 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

This is indeed a bug. I will see if I can put together a patch.

Thanks
Luke

^ 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

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for the project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git