Skip to content

Conversation

@pvktk
Copy link
Owner

@pvktk pvktk commented Oct 14, 2018

No description provided.

Anton added 16 commits October 2, 2018 23:18
Добавлен скрипт для запуска.
Добавлено сообщение о недостаточном количестве аргументов.
Добавлен базовый тест к нему.
getChangedFiles и getDeletedFiles теперь только на файлы в
текущем пути до корня смотрят.
После merge напоминание о том что надо сделать коммит.
public class BranchProblemException extends Exception {
String message;
public BranchProblemException(String s) {
message = s;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super(message), см конструкторы Exception

.collect(
Collectors.joining("\n")
)
);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String.join("\n", processArgs(args))

try {
revision = Integer.parseInt(args[1]);
res.add("Checkout to revision " + revision);
core.makeCheckout(revision - 1);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

конвертация ревизии в представление для пользователя и обратно должна быть в одном месте (+/-1)

res.add("IOException: " + e.getMessage());
} catch (ArrayIndexOutOfBoundsException e) {
res.add("Lack of arguments");
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лучше ловить исключения как можно ближе к месту появления, например, ArrayIndexOutOfBoundsException может вылететь не по той причине, что будет написана в консоли

}
inform.detachedHeadRevision = currDetachedPosT;

updateRepInformation();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не подчищаются метаданные

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Очищаются файлы, которые добавлены и которые удалены. Остальное сохраняется, как в настоящем git.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

в настоящем гите есть сборщик мусора )


TreeMap<Integer, Integer> branchEnds = new TreeMap<>();

ArrayList<Integer> numberOfStartedBranchesAtRevision = new ArrayList<>();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

по сути не используется


inform.branchNumbers.remove(branchName);

updateRepInformation();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тоже не чистятся метаданные

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Здесь удаляется имя ветки, но коммиты остаются. В git вроде так.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants