Add Pull
This commit is contained in:
21
main.pb
21
main.pb
@@ -1156,6 +1156,21 @@ Procedure DoPush()
|
|||||||
EndIf
|
EndIf
|
||||||
EndProcedure
|
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()
|
Procedure DoStatus()
|
||||||
Protected *status.GitStatus=@main\GitStatus
|
Protected *status.GitStatus=@main\GitStatus
|
||||||
|
|
||||||
@@ -1764,6 +1779,8 @@ Procedure OpenGUI()
|
|||||||
; EndIf
|
; EndIf
|
||||||
Case #GdtBtnPush
|
Case #GdtBtnPush
|
||||||
DoPush()
|
DoPush()
|
||||||
|
Case #GdtBtnPull
|
||||||
|
DoPull()
|
||||||
Case #GdtListStatus
|
Case #GdtListStatus
|
||||||
Case #GdtBtnIgnore
|
Case #GdtBtnIgnore
|
||||||
ToggleGitIgnoreForSelection()
|
ToggleGitIgnoreForSelection()
|
||||||
@@ -1802,8 +1819,8 @@ OpenGUI()
|
|||||||
|
|
||||||
|
|
||||||
; IDE Options = PureBasic 6.21 (Windows - x64)
|
; IDE Options = PureBasic 6.21 (Windows - x64)
|
||||||
; CursorPosition = 1765
|
; CursorPosition = 1158
|
||||||
; FirstLine = 1728
|
; FirstLine = 1152
|
||||||
; Folding = -------
|
; Folding = -------
|
||||||
; Optimizer
|
; Optimizer
|
||||||
; EnableThread
|
; EnableThread
|
||||||
|
Reference in New Issue
Block a user