-
Notifications
You must be signed in to change notification settings - Fork 93
Доработан функционал смены ветки #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Доработан функционал смены ветки #49
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Предлагаю использовать формат СтрШаблон,
в методы вывода лога я давно добавил возможность использования этой фичи.
например, Лог.Отладка("строка %1", НужнаяСтрока);
очень удобно
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1commands уже научился получать непосредственный вывод от команд.
Поэтому промежуточный файл лога, с использованием СуффиксПеренаправленияВывода
, теперь не нужен.
Пример соответствующего кода есть в методе, выполняющем коммит
Предлагаю доработать и здесь, раз уж начали доработку :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ИМХО в этом случае не нужно управление файлом лога и не нужно доп.функции обертки НовыйКомандныйФайлGit
, ЗакрытьКомандныйФайлGit
ИсполнитьКомандныйФайлGit
вполне можно оставить.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Предлагаю доработать и убрать использование вывода в отдельный лог
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вместо
СтроковыеФункции.ПодставитьПараметрыВСтроку("cd /d ""%1""", ЛокальныйРепозиторий)
предлагаю сразу юзать СтрШаблон, он уже давно поддерживается.
СтрШаблон("cd /d ""%1""", ЛокальныйРепозиторий)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тесты проходят на последних правках?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
И здесь СтрШаблон
Тесты прошли успешно, но все также где-то в серединете теста git-sync-test происходит смена кодировки и выводятся кракозябры в консоль |
@theshadowco Создай ишуз на этот баг, разберемся. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А почему бы регулярки не использовать вместо построчного перебора?
Формат-то все равно един * пробел имяВетки
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вот регулярка \*\s*(.*)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вообще это не самый простой способ получения ветки. В гитраннере есть готовая реализация. Наверное, надо потихоньку переводить на него :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Стоит менять? или в рамках задачи перевода на гитраннер все сделаем?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не обрабатывается неуспешный результат git branch.
Вдруг локальный репо это не репо гит?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тем более, что у нас API-метод
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Название КомандныйФайлСтатуса
уже не отвечает своему назначения, т.к. вместо гит статус юзаем гит бранч
Совсем чуть-чуть осталось :) |
В понедельник гляну
24 февр. 2017 г. 17:13 пользователь "Nikita Gryzlov" <
[email protected]> написал:
… ***@***.**** commented on this pull request.
------------------------------
In src/core/Классы/МенеджерСинхронизации.os
<#49 (comment)>
:
> - Иначе
- КомандныйФайл.ДобавитьКоманду(СтроковыеФункции.ПодставитьПараметрыВСтроку("cd ""%1""", ЛокальныйРепозиторий));
+ Если ЗначениеЗаполнено(ИмяВетки) Тогда
+
+ // надо проверить текущую ветку, совпдает ли она с требуемой
+ КомандныйФайлСтатуса = НовыйКомандныйФайлGit(ЛокальныйРепозиторий);
+
+ ПараметрыКоманды = Новый Массив;
+ ПараметрыКоманды.Добавить("git branch");
+
+ Результат = ИсполнитьКомандныйФайлGit(КомандныйФайлСтатуса, ПараметрыКоманды);
+ Если Результат = 0 Тогда
+
+ // вывод содержит много мусора, поэтому обработаем построчно
+ // нужная нам строка начинается с *
+ СтрокиФайла = СтрРазделить(КомандныйФайлСтатуса.ПолучитьВывод(), Символы.ПС, ЛОЖЬ);
Вообще это не самый простой способ получения ветки. В гитраннере есть
готовая реализация. Наверное, надо потихоньку переводить на него :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#49 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJJbs2l1dk4iSUCzWTFIqw4Gz5wAN4dMks5rfuWbgaJpZM4MInbx>
.
|
… выполнения команды
@artbear up |
Пока некогда было. |
@artbear Удалось посмотреть? |
up. Надо бы слить PR |
@artbear не останавливайся. PR ждут тебя =) |
@theshadowco Еще актуально? :( |
@theshadowco В общем, ждем тебя, твой PR остался последний из незакрытых. |
@artbear ПР висит с первого марта. Ждал тебя. Потом протух. И тут внезапно @theshadowco должен что то поправлять... Плохая политика. |
Ну извините, опенсорс, понимаешь :) |
Посмотрю на днях
10 окт. 2017 г. 10:00 PM пользователь "Artur Ayukhanov" <
[email protected]> написал:
… @theshadowco <https://github.com/theshadowco> В общем, ждем тебя, твой PR
остался последний из незакрытых.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#49 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJJbsxy9TAjPUNdZxBUDrMK4SlUzKVnKks5sq77XgaJpZM4MInbx>
.
|
@theshadowco У тебя получится посмотреть/доработать этот ПР ? |
Доработан функционал смены ветки в ВыполнитьGitPull (сообщение #26)