Esempio n. 1
0
    def gwt_to_depot_path(self, gwt_path):
        '''
        Optimized version of ctx.gwt_path(gwt).to_depot().

        Avoid creating the convert and goes straight to P4.Map.translate().

        We call this once for every row in G2PMatrix. This function runs in
        about 60% of ctx.gwt_path(x).to_depot() time. That works out to about 5%
        of total wall clock time for many-file repos such as james.
        '''
        gwt_esc = p4gf_util.escape_path(gwt_path)
        client_path = '//{}/'.format(self.config.p4client) + gwt_esc
        return self.clientmap.translate(client_path, self.clientmap.RIGHT2LEFT)
Esempio n. 2
0
    def gwt_to_depot_path(self, gwt_path):
        '''
        Optimized version of ctx.gwt_path(gwt).to_depot().

        Avoid creating the convert and goes straight to P4.Map.translate().

        We call this once for every row in G2PMatrix. This function runs in
        about 60% of ctx.gwt_path(x).to_depot() time. That works out to about 5%
        of total wall clock time for many-file repos such as james.
        '''
        gwt_esc = p4gf_util.escape_path(gwt_path)
        client_path = '//{}/'.format(self.config.p4client) + gwt_esc
        return self.clientmap.translate(client_path, self.clientmap.RIGHT2LEFT)
 def to_client(self):
     gwt_esc = escape_path(self.to_gwt())
     return '//{}/'.format(self.client_name) + gwt_esc
Esempio n. 4
0
 def to_client(self):
     gwt_esc = escape_path(self.to_gwt())
     return '//{}/'.format(self.client_name) + gwt_esc