You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
1.1 KiB
26 lines
1.1 KiB
# -*- coding: utf-8 -*-
|
|
"""票 12 code-review:字节保真拼装审查 diff(git bytes 直写,避免控制台 mojibake)。"""
|
|
import subprocess
|
|
from pathlib import Path
|
|
|
|
OUT = Path('.scratch/opportunity-bugfix/t12-review-diff.txt')
|
|
|
|
def git(*args):
|
|
r = subprocess.run(['git', *args], capture_output=True, check=True)
|
|
return r.stdout
|
|
|
|
parts = []
|
|
parts.append(b"### PART 1: unstaged diff (crm-opportunity + crm-rule) === ticket-12 delta vs staged baseline\n")
|
|
parts.append(git('diff', '--', 'crm-opportunity', 'crm-rule'))
|
|
parts.append(b"\n\n### PART 2: unstaged diff (seed-opportunity.py workplan block)\n")
|
|
parts.append(git('diff', '--', '.scratch/opportunity-e2e/seed-opportunity.py'))
|
|
for f in [
|
|
'crm-opportunity/src/main/java/com/crm/opportunity/domain/dto/OpportunityWorkPlanAddDTO.java',
|
|
'crm-opportunity/src/main/java/com/crm/opportunity/domain/dto/OpportunityWorkPlanUpdateDTO.java',
|
|
]:
|
|
p = Path(f)
|
|
parts.append(f"\n\n### PART 3: untracked NEW FILE (full content): {f}\n".encode('utf-8'))
|
|
parts.append(p.read_bytes())
|
|
|
|
OUT.write_bytes(b''.join(parts))
|
|
print(f'written {OUT} ({OUT.stat().st_size} bytes)')
|
|
|