Add Pull
This commit is contained in:
21
main.pb
21
main.pb
@@ -1156,6 +1156,21 @@ Procedure DoPush()
|
||||
EndIf
|
||||
EndProcedure
|
||||
|
||||
Procedure DoPull()
|
||||
If Trim(GetGadgetText(#GdtFieldRemote))=""
|
||||
MessageRequester("Git Pull", "Échec: " + #LF$ + "You Must tu have a remote", #PB_MessageRequester_Error)
|
||||
EndIf
|
||||
AddRemoteRepo(Trim(GetGadgetText(#GdtFieldRemote)))
|
||||
main\Gitcall\args = "pull origin "+GetGadgetText(#GdtSlctBranch)+" --allow-unrelated-histories"
|
||||
If RunExe(@main\Gitcall) = 0
|
||||
MessageRequester("Git Pull", "OK:" + #LF$ + main\Gitcall\output, #PB_MessageRequester_Info)
|
||||
ProcedureReturn #True
|
||||
Else
|
||||
MessageRequester("Git Pull", "Échec: " + #LF$ + main\Gitcall\errors, #PB_MessageRequester_Error)
|
||||
ProcedureReturn #False
|
||||
EndIf
|
||||
EndProcedure
|
||||
|
||||
Procedure DoStatus()
|
||||
Protected *status.GitStatus=@main\GitStatus
|
||||
|
||||
@@ -1764,6 +1779,8 @@ Procedure OpenGUI()
|
||||
; EndIf
|
||||
Case #GdtBtnPush
|
||||
DoPush()
|
||||
Case #GdtBtnPull
|
||||
DoPull()
|
||||
Case #GdtListStatus
|
||||
Case #GdtBtnIgnore
|
||||
ToggleGitIgnoreForSelection()
|
||||
@@ -1802,8 +1819,8 @@ OpenGUI()
|
||||
|
||||
|
||||
; IDE Options = PureBasic 6.21 (Windows - x64)
|
||||
; CursorPosition = 1765
|
||||
; FirstLine = 1728
|
||||
; CursorPosition = 1158
|
||||
; FirstLine = 1152
|
||||
; Folding = -------
|
||||
; Optimizer
|
||||
; EnableThread
|
||||
|
Reference in New Issue
Block a user