VSS zookeeper, specify zookeeper to obtain zookeeper transaction (zookeeper inbound transaction)

Source: Internet
Author: User

Option explicit
'Vss provided ini provided already released
Private srcsafe_ini as string
'Vss connected zookeeper ID
Private user_id as string
'Vss is connected to zookeeper without zookeeper
Private user_password as string
'Vss Root
Private vss_root as string
'Worker worker?
Private output_dir as string
'Too many threads have been transferred too many threads have been transferred
Private mobjfilesystem as FileSystemObject
'The Machine name: VSS too large, and the specified parameter was too large to obtain the specified parameter when there were too many connections (too many incoming connections)
'
Sub macro1 ()
On Error goto errorhandler
Dim vssdb as new vssdatabase
Dim objitem as vssitem
Dim rownumber as integer
Dim sheet as Worksheet

Set mobjfilesystem = new FileSystemObject
Set sheet = thisworkbook. worksheets ("vssfm") 'sheet name is vssfm-> VSS's file management
 
'Set a sequence?
Call getsettingvalues

'Line number initial?
Rownumber = 2

'Vss connected?
Vssdb. Open srcsafe_ini, user_id, user_password

While sheet. cells (rownumber, 1) <> ""
'Co images have been released since they have been released.
If sheet. cells (rownumber, 2) = "○" then
Set objitem = vssdb. vssitem (vss_root & sheet. cells (rownumber, 8 ))
Call outputvssitem (objitem)
End if
Rownumber = rownumber + 1
Wend

Set vssdb = nothing
Set mobjfilesystem = nothing

Msgbox "has been completed successfully. "

Exit sub 'commandid when there were too many attempts when there were too many rows when there were too many attempts when the sub was too busy.
Errorhandler: 'zookeeper has been processed successfully.
Select case err. Number 'then there is no limit when there is no limit.
Case-2147166577 'maximum latency was reached.
Msgbox "[" & vss_root & sheet. cells (rownumber, 8) & "] can be seen when there are too many rows. "
Resume next 'has already been used to generate a number of rows before being processed.

Case else
Resume next 'has already been used to generate a number of rows before being processed.
End select

End sub
'Specify the number of parameter numbers.
Private sub getsettingvalues ()
Dim sheet as Worksheet

Set sheet = thisworkbook. worksheets ("set ")

'Srcsafe. ini Workshop
Srcsafe_ini = sheet. cells (3, 2)
'Vss connected zookeeper upload ID
User_id = sheet. cells (4, 2)
'Vss is connected to zookeeper when zookeeper has completed zookeeper
User_password = sheet. cells (5, 2)
'Vss Root
Vss_root = sheet. cells (6, 2)

'Zookeeper outgoing?
Output_dir = sheet. cells (7, 2)

End sub
'Specify the latest Dynamic Route scheduler capacity
Private sub outputvssitem (objitem as vssitem)
'Are you sure you want to configure them first?
Dim dir as string

Dir = createdir (objitem)
Objitem. Get dir & objitem. Name, vssflag_eolcrlf
End sub
'Are you sure you want to do this first?
Private function createdir (objitem as vssitem) as string
Dim I as integer
Dim dirs () as string
Dim dir as string

Dirs = Split (objitem. spec ,"/")
Dir = output_dir

For I = lbound (dirs) to ubound (dirs)-1
Dir = dir & dirs (I)
If not mobjfilesystem. folderexists (DIR) then
Call filesystem. mkdir (DIR)
End if

Dir = dir &"/"
Next I
Createdir = dir
End Function

VSS zookeeper, specify zookeeper to obtain zookeeper transaction (zookeeper inbound transaction)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.