input
stringlengths
10
828
output
stringlengths
5
107
private string move message text ipath path if path equals current project path return non nls 1 return policy bind connect project page project will move non nls 1
returns the text to be shown when the project is moved
public ipath get location try iwhere result where result get server where folder sync info get depot file name if where result null return null string local path where result get local filename return new path local path substring 0 local path length catch perforce exception e perforce core plugin log e get status return null
returns the location
public void set action string action policy assert not null action if action equals action add flags flag have all flags flag have add else if action equals action branch flags flag have all flags flag have branch else if action equals action delete flags flag have all flags flag have delete else if action equals action edit flags flag have all flags flag have edit else flags flag have all
sets the action
public boolean is deleted return get sync info null is deleted
checks whether the remote file is deleted
public void shutdown perforce core plugin get server manager remove perforce listener this try lock acquire for iterator cache store it server to cache store values iterator it has next cache store cache store it next try cache store close catch ioexception e perforce core plugin log error failed to close cache store e finally lock release
call this method for shutting down the perforce synchronizer
public string get client file name return client file name
gets the depot file name
public string get full name if get parent null return get parent get full name get name return get name
returns the full name
public void set client file name string client file name policy assert not null client file name this client file name client file name
sets the client file name
public remote folder get parent return parent
gets the parent
public void sync string revision iprogress monitor monitor throws perforce exception ipath location get location if location null string spec location to osstring file separator char non nls 1 get server sync spec revision monitor else perforce core plugin get plugin info unable to find location and sync for get full name
sync the resource to the given revision
public void set parent remote folder parent this parent parent
sets the parent
public void set server iperforce server server this server server
sets the server
public void begin operation iprogress monitor monitor lock acquire if lock get nesting count 1 prepare cache
begins a batch of operations
public string get name return get location last segment
call this method to retrieve the name of the file
public folder sync info get folder sync try return perforce synchronizer get instance get folder sync icontainer to resource catch perforce exception e perforce core plugin log e get status return null
returns the folder sync info of the container
public void end operation iprogress monitor monitor throws perforce exception try istatus status status ok if lock get nesting count 1 if changed folder sync is empty changed resource sync is empty status commit cache monitor if status status ok status is ok throw new perforce exception status finally lock release
ends a batch of operations
public string get head action switch flags flag head all case 0 return case flag head add return action add case flag head branch return action branch case flag head delete return action delete case flag head edit return action edit default throw new illegal state exception
gets the head action
public boolean exists return to resource exists
checks whether the local resource exists
public void set head action string action policy assert not null action if action equals action add flags flag head all flags flag head add else if action equals action branch flags flag head all flags flag head branch else if action equals action delete flags flag head all flags flag head delete else if action equals action edit flags flag head all flags flag head edit else flags flag head all
sets the head action
public folder sync info get folder sync icontainer folder throws perforce exception policy assert not null folder if folder get type iresource root folder exists return null if folder get type iresource project try begin operation null return get cached project sync iproject folder finally end operation null icontainer parent folder get parent if parent null parent exists parent get type iresource root return null try begin operation null cache folder sync for children parent return get cached folder sync folder finally end operation null
call this method to retrieve the folder sync info of the given container
public string get absolute path return get location to osstring
returns the absolute pathname string of this abstract pathname
public void revert throws perforce exception iperforce server manager manager perforce core plugin get server manager iperforce server server manager get perforce server to resource server revert new string get sync info get client file name null iresource resource to resource if resource null p4 team provider provider p4 team provider repository provider get provider resource get project perforce core plugin get type id try resource refresh local iresource depth one null provider refresh state new iresource resource iresource depth one null catch core exception e throw new perforce exception e get status
reverts the file
public ipath get location return resource get location
call this method to retrieve the location
public string get head type return head type
gets the head type
public void delete throws perforce exception iperforce server manager manager perforce core plugin get server manager iperforce server server manager get perforce server to resource server delete new string get sync info get client file name
opens the file for delete
public istatus sync string revision iprogress monitor monitor throws perforce exception iperforce server manager manager perforce core plugin get server manager iperforce server server manager get perforce server to resource string spec get sync info get client file name return server sync spec revision monitor
syncs the file
public void set head type string head type policy assert not null head type this head type head type
sets the head type
public void set folder sync icontainer folder folder sync info sync info throws perforce exception if folder get type iresource root folder exists return if folder get type iresource project try begin operation null set cached project sync iproject folder sync info return finally end operation null icontainer parent folder get parent if parent null parent exists parent get type iresource root return try begin operation null cache folder sync for children parent set cached folder sync folder sync info finally end operation null
sets the folder sync info of the given folder
public void startup if thread null throw new runtime exception only one such thread per execution new thread this perforce background addition marker manager start non nls 1
call this method to start the background update monitor
public void shutdown running false try synchronized wait lock wait lock notify thread join catch interrupted exception e ignored
call this method to shutdown the connection monitor
public int get head rev return head rev
gets the head rev
public void delete folder sync icontainer container throws perforce exception policy assert not null container icontainer parent container get parent if parent null parent exists parent get type iresource root return if container get type iresource project try begin operation null remove project sync info iproject container finally end operation null try begin operation null cache folder sync for children parent remove folder sync info container finally end operation null if container get type iresource root container exists return
deletes the folder sync info for the given container
public void set head rev int head rev this head rev head rev
sets the head rev
public void set last access date new last access last access new last access
called to set the date of last access
public void set last update date new last update last update new last update
sets the date of the last update
public void set locked boolean new locked locked new locked
changes the labels lock state indicator
public istatus get status return status
returns the status of the cache store
public void set owner string new owner owner new owner
sets the owner
public int get head change return head change
gets the head change
public void startup new thread this perforce connection monitor start
call this method to start the connection monitor
public resource sync info get resource sync iresource file throws perforce exception policy assert not null file icontainer parent file get parent if parent null parent exists parent get type iresource root return null try begin operation null cache resource sync for children parent return get cached resource sync file finally end operation null
call this method to request the resource sync info of the given resource
public void shutdown running false try thread interrupt thread join catch interrupted exception e ignored
call this method to shutdown the connection monitor
public boolean is dirty return project folder sync cache is dirty folder sync cache is dirty resource sync cache is dirty
call this method to check whether the cache has any pending changes
public void set head change int head change this head change head change
sets the head change
private void create folder ifolder folder handle file folder new file folder handle get location to osstring folder mkdirs
called to create the folder
public void commit throws ioexception if is dirty return if debug system out println system out print started committing cache store for server name non nls 1 system out println new date non nls 1 project folder sync cache commit folder sync cache commit resource sync cache commit if debug system out print finished committing cache store for server name non nls 1 system out println new date non nls 1
called to commit the cache stores dirty data
public int get change return change
gets the change
public void close throws ioexception commit project folder sync cache dispose folder sync cache dispose resource sync cache dispose record manager close record manager cache dispose
call this method to close the cache store
public void set change int change this change change
sets the change
public void delete file db file new file path to osstring db non nls 1 db file delete file lg file new file path to osstring lg non nls 1 lg file delete
call this method to remove the cache store from the system
public iperforce server get perforce server policy assert not null perforce server return perforce server
returns the associated perforce server instance
public int get have rev return have rev
gets the have rev
public void delete resource sync iresource resource throws perforce exception policy assert not null resource icontainer parent resource get parent if parent null parent exists parent get type iresource root return try begin operation null cache resource sync for children parent remove resource sync info resource finally end operation null
deletes the resource sync info of the given resource
public folder sync info get project sync info iproject project try string key create cache key from path project get location return folder sync info project folder sync cache get key catch ioexception e perforce core plugin log error e get message e return null
gets the projects folder sync info
public void set have rev int have rev this have rev have rev
sets the have rev
public folder sync info set project sync info iproject project folder sync info sync info try folder sync info result null string key create cache key from path project get location result folder sync info project folder sync cache get key if sync info null project folder sync cache remove key else project folder sync cache put key sync info return result catch ioexception e perforce core plugin log error e get message e return null
persistently stores the specified folder sync info for the given project
public date get head time return head time
gets the head time
public resource sync info get new resource sync info return new resource sync info
returns the new resource sync info
public resource sync info get old resource sync info return old resource sync info
returns the old resource sync info
public void set head time date head time policy assert not null head time this head time head time
sets the head time
public boolean is resolved return flags flag resolved 0
checks whether the file is resolved
public void meta files changed icontainer roots throws perforce exception try for int i 0 i roots length i icontainer root roots i root set session property ignore sync key null list resource state delta possible ignores new array list resource state delta accumulate non managed children root possible ignores iresource state delta deltas new iresource state delta possible ignores size possible ignores to array deltas perforce core plugin get plugin broadcast resource state changes deltas catch core exception e throw new perforce exception e get status
called to indicate that the meta files of the given containers have
private string create cache key from path ipath path if efs get local file system is case sensitive return path to osstring else return path to osstring to lower case
creates the resource sync cache key from the given path
public void set resolved boolean resolved if resolved this flags flag resolved else this flags flag resolved
sets whether the file is resolved
private persistent map get persistent map string name throws ioexception long record id record manager get named object name if record id 0 btree tree new btree record manager record manager cache new string comparator record id tree get recid record manager set named object name record id record manager commit return new persistent map record manager record manager cache record id
called to retrieve the persistent map with the given name
public boolean is other open return flags flag other open 0
checks whether the file is opened by another one
public void set other open boolean other open if other open this flags flag other open else this flags flag other open
sets the other open value
private void handle resource added iresource resource throws core exception if resource get type iresource folder addition marker manager create necessary markers new iresource resource else if resource get type iresource file try p4 team provider provider p4 team provider repository provider get provider resource get project perforce core plugin get type id if provider null if perforce synchronizer get instance get resource sync resource null provider refresh state new iresource resource iresource depth one null addition marker manager create necessary markers new iresource resource catch team exception e throw new core exception e get status
called to handle resource adds
public boolean has our lock return flags flag our lock 0
returns if the resource is locked by us or not
private void handle resource removed iresource resource throws perforce exception perforce synchronizer synchronizer perforce core plugin get synchronizer if resource get type iresource file synchronizer delete resource sync resource else synchronizer delete folder sync icontainer resource
called to handle resource deletions
public void put object key object value throws ioexception cache map put key new cache map entry value true is dirty true
associates the specified value with the specified key
public void set has our lock boolean our lock if our lock this flags flag our lock else this flags flag our lock
changes the value that indicates whether the resource is locked locally or
public boolean is null return flags flag null info 0
checks whether this is a null resource sync info
public void startup new thread this perforce background update monitor start non nls 1
call this method to start the background update monitor
public object get object key throws ioexception object result cache map get key if result null result cache map entry result get value else persistent map entry entry persistent map entry tree find key result entry null entry get null cache map put key new cache map entry result false return result
returns the value which is associated with the given key
public string get name string name get client file name return name substring name last index of file separator 1
returns the name of the resource
private int get last changelist number iperforce server server string key server get unique name integer result counter map get key if result null result new integer get current changelist number server counter map put key result return result int value
returns the number of the changelist we synchronized last
private int get current changelist number iperforce server server try icounters result counters result server counters integer result counters result get counter value change return result null result int value 0 catch perforce exception e perforce core plugin log e get status return 0
retrieves the current server side changelist number
public void remove object key throws ioexception cache map remove key tree remove key is dirty true
remove the value which is associated with the given key
private void update cache map iresource resource sync info resource map if resource map is empty return try perforce synchronizer get instance begin operation null for iterator iresource it resource map key set iterator it has next iresource resource it next resource sync info sync info resource map get resource perforce synchronizer get instance set resource sync resource sync info catch perforce exception e perforce core plugin log e get status finally try perforce synchronizer get instance end operation null catch perforce exception e perforce core plugin log e get status
call this method to update the persistence cache with the information
public boolean is deleted if flags flag have add 0 flags flag have branch 0 return false return have rev 0 head rev have rev flags flag head delete 0 flags flag have all 0
checks whether the resource is deleted
public void commit throws ioexception if is dirty for map entry object cache map entry entry cache map entry set final cache map entry value entry get value if value is dirty tree insert entry get key new persistent map entry value get value true cache map clear record manager commit is dirty false
commit dirty data
public void dispose throws ioexception commit cache map null tree null record manager null
disposes from this hashtable instance and frees associated resources
private void remove project sync info iproject project throws perforce exception icontainer parent project get parent if parent null return if get cached project sync project null set cached project sync project null
removes the folder sync info of the given project
public object get try if object null byte array null final byte array input stream bin new byte array input stream byte array final object input stream in new object input stream bin try object in read object finally in close byte array null return object catch class not found exception e return null catch stream corrupted exception e return null catch ioexception e return null
called to get the real object
private void remove folder sync info icontainer container throws perforce exception icontainer parent container get parent if parent null return cache folder sync for children parent if get cached folder sync container null set cached folder sync container null
removes the folder sync info of the given container
private int calculate third start string info string list integer positions lists new array list int pos info string last index of non nls 1 while pos info string index of pos 1 1 positions add integer value of pos integer result positions get positions size 2 return result int value 1
calculates the position of the third local path
private void remove resource sync info iresource file throws perforce exception icontainer parent file get parent if parent null parent exists parent get type iresource root return cache resource sync for children parent if get cached resource sync file null set cached resource sync file null
removes the resource sync info of the given resource
private void handle resolve skipped re re resolve skipped comes as addition to previous output result resolve result result result peek resolve result set is skipped true
handle infostring matching regular expression re resolve skipped
private void handle with revision re re result resolve result new result resolve result set local filename re get paren 1 resolve result set depot filename re get paren 3 resolve result set revision new integer re get paren 5 if result is empty result push resolve result else result top result result peek if top get depot filename equals resolve result get depot filename result push resolve result
handle infostring matching regular expression re with both revisions and
private void handle without revisions re re result resolve result new result resolve result set local filename re get paren 1 resolve result set depot filename re get paren 3 if result is empty result push resolve result else result top result result peek if top get depot filename equals resolve result get depot filename result push resolve result
handle infostring matching regular expression re without revisions
public iclient form get result return result
returns the client form
public idescribe result get result return result
returns the result of the operation
public void refresh state iresource resources int depth iprogress monitor monitor final list ifile files to refresh get files for resources resources depth policy sub monitor for monitor resources length final int resource count files to refresh size monitor policy monitor for monitor monitor begin task refreshing resource count resources resource count trace refresh state is passing s resources to resource refresher job files to refresh size job refresh job new resource refresher job get perforce server files to refresh to array new iresource 0 refresh job schedule monitor done
call this method to refresh the team provider state of the given resources
public iinfo result get result return result
returns the result of the operation
protected iprogress monitor get progress monitor return monitor
call this method to retrieve the progress monitor
protected multi status get multi status return status
returns the associated multi status object
private void prepare cache changed resource sync clear changed folder sync clear
prepares the cache
protected void set multi status multi status value status value
sets a new value for mutli status
private string get display name string file ipath path new path file string segments path segments if segments length 4 return file string builder result new string builder for int i segments length 3 i segments length i result append file separator char append segments i return result to string
called to generate the display name for the given file string