|
|
@ -142,10 +142,11 @@ def user_action(hunk: Sequence[Command], context=None) -> Sequence[Command]:
|
|
|
|
tmpfile.file.seek(0)
|
|
|
|
tmpfile.file.seek(0)
|
|
|
|
new_hunk = []
|
|
|
|
new_hunk = []
|
|
|
|
for line in tmpfile.file.readlines():
|
|
|
|
for line in tmpfile.file.readlines():
|
|
|
|
line = line.strip()
|
|
|
|
|
|
|
|
if line == '':
|
|
|
|
if line == '':
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
parts = line.split('\t', maxsplit=2)
|
|
|
|
parts = line.split('\t', maxsplit=2)
|
|
|
|
|
|
|
|
# Change user to None if it is not specified
|
|
|
|
|
|
|
|
parts[0] = parts[0].strip() if parts[0].strip() != '' else None
|
|
|
|
# Change directory to None if it is not specified
|
|
|
|
# Change directory to None if it is not specified
|
|
|
|
parts[1] = parts[1].strip() if parts[1].strip() != '' else None
|
|
|
|
parts[1] = parts[1].strip() if parts[1].strip() != '' else None
|
|
|
|
new_hunk.append(Command(user=parts[0],directory=parts[1],command=parts[2],context=None))
|
|
|
|
new_hunk.append(Command(user=parts[0],directory=parts[1],command=parts[2],context=None))
|
|
|
|