File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -97,17 +97,17 @@ def _setup_client(self):
9797
9898 self .perforce .save_client (client )
9999
100- if not os .path .isfile (self .p4config ):
101- self .perforce .logger .warning ("p4config missing, flushing workspace to revision zero" )
102- self .perforce .run_flush (['//...@0' ])
103- else :
100+ if os .path .isfile (self .p4config ):
104101 with open (self .p4config ) as infile :
105102 prev_clientname = next (line .split ('=' , 1 )[- 1 ]
106103 for line in infile .read ().splitlines () # removes \n
107104 if line .startswith ('P4CLIENT=' ))
108- if prev_clientname != clientname :
109- self .perforce .logger .warning ("p4config last client was %s, flushing workspace to match" % prev_clientname )
110- self .perforce .run_flush (['//...@%s' % prev_clientname ])
105+ if prev_clientname != clientname :
106+ self .perforce .logger .warning ("p4config last client was %s, flushing workspace to match" % prev_clientname )
107+ self .perforce .run_flush (['//...@%s' % prev_clientname ])
108+ elif 'Update' in client : # client was accessed previously
109+ self .perforce .logger .warning ("p4config missing for previously accessed client workspace. flushing to revision zero" )
110+ self .perforce .run_flush (['//...@0' ])
111111
112112 self ._write_p4config ()
113113 self .created_client = True
You can’t perform that action at this time.
0 commit comments