self.useClientSpec = False
+ self.haveSingleFileClientViews = False
if gitConfig("git-p4.syncFromOrigin") == "false":
self.syncWithOrigin = False
# will end up putting all foo/branch files into
for val in self.clientSpecDirs:
+ if self.haveSingleFileClientViews and len(path) == abs(val) and path == val:
+ # since 'path' is a depot file path, if it matches the LeftMap,
+ # then the View is a single file mapping, so use the entire rightMap
+ # first two tests above avoid the last == test for common cases
+ # now strip out the client (//client/...)
+ path = re.sub("^(//[^/]+/)", '', path)
+ # the rest is local client path
# replace the depot path with the client path
path = path.replace(val, val)
# save the "client view"; i.e the RHS of the view
# line that tells the client where to put the
- cv = v[index+3:].strip() # +3 to remove previous '...'
- # if the client view doesn't end with a
- # ... wildcard, then we're going to mess up the
- # output directory, so fail gracefully.
- if not cv.endswith('...'):
- print 'Sorry, client view in "%s" needs to end with wildcard' % (k)
+ # check for individual file mappings - those which have no '...'
+ v,cv = v.strip().split()
+ self.haveSingleFileClientViews = True
+ cv = v[index+3:].strip() # +3 to remove previous '...'
# now save the view; +index means included, -index
# means it should be filtered out.