Project

General

Profile

Actions

Bug #6913

closed

pbchk throws an error with git rm'd files

Added by Matthew Ahrens over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Start date:
2016-04-14
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

If a file is removed with git rm, running pbchk causes an error to be thrown during operation. The output is otherwise correct, but the error is annoying.

Actions #1

Updated by Matthew Ahrens over 6 years ago

The error being thrown is an internal error in pbchk:

Traceback (most recent call last):
  File "/var/tmp/jenkins/workspace/openzfs-build-nightly/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/git-nits", line 380, in <module>
    main(os.path.basename(sys.argv[0]), sys.argv[1:])
  File "/var/tmp/jenkins/workspace/openzfs-build-nightly/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/git-nits", line 376, in main
    func(git_root(), parent_branch, args)
  File "/var/tmp/jenkins/workspace/openzfs-build-nightly/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/git-nits", line 337, in nits
    run_checks(root, parent, cmds, paths)
  File "/var/tmp/jenkins/workspace/openzfs-build-nightly/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/git-nits", line 320, in run_checks
    output=s)
  File "/var/tmp/jenkins/workspace/openzfs-build-nightly/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/git-nits", line 245, in copyright
    for f in flist():
  File "/var/tmp/jenkins/workspace/openzfs-build-nightly/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/git-nits", line 202, in ret
    for f in git_file_list(parent, paths):
  File "/var/tmp/jenkins/workspace/openzfs-build-nightly/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/git-nits", line 167, in git_file_list
    res = git("diff %s HEAD %s" % (parent, fname))
  File "/var/tmp/jenkins/workspace/openzfs-build-nightly/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/git-nits", line 80, in git
    raise GitError(p.stdout.read())
AttributeError: 'NoneType' object has no attribute 'read'

Actions #2

Updated by Electric Monk over 6 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 93d2a904d17ac0073fa98bf62f89294d980c8b3d

commit  93d2a904d17ac0073fa98bf62f89294d980c8b3d
Author: Paul Dagnelie <pcd@delphix.com>
Date:   2016-04-15T16:45:27.000Z

    6913 pbchk throws an error with git rm'd files
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Prakash Surya <prakash.surya@delphix.com>
    Reviewed by: Dan McDonald <danmcd@omniti.com>
    Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Actions #3

Updated by Electric Monk over 6 years ago

git commit 380fd671753dd199e149f10e9f73ec52cdfe4230

commit  380fd671753dd199e149f10e9f73ec52cdfe4230
Author: Matthew Ahrens <mahrens@delphix.com>
Date:   2016-04-15T21:07:19.000Z

    6913 pbchk throws an error with git rm'd files (use right fd)

Actions

Also available in: Atom PDF