##// END OF EJS Templates
cmdutil: use internal separators when building the terse list...
Matt Harbison -
r38221:51e420a7 default
parent child Browse files
Show More
@@ -416,7 +416,7 b' class dirnode(object):'
416 Represent a directory in user working copy with information required for
416 Represent a directory in user working copy with information required for
417 the purpose of tersing its status.
417 the purpose of tersing its status.
418
418
419 path is the path to the directory
419 path is the path to the directory, without a trailing '/'
420
420
421 statuses is a set of statuses of all files in this directory (this includes
421 statuses is a set of statuses of all files in this directory (this includes
422 all the files in all the subdirectories too)
422 all the files in all the subdirectories too)
@@ -453,7 +453,7 b' class dirnode(object):'
453
453
454 # does the dirnode object for subdir exists
454 # does the dirnode object for subdir exists
455 if subdir not in self.subdirs:
455 if subdir not in self.subdirs:
456 subdirpath = os.path.join(self.path, subdir)
456 subdirpath = pathutil.join(self.path, subdir)
457 self.subdirs[subdir] = dirnode(subdirpath)
457 self.subdirs[subdir] = dirnode(subdirpath)
458
458
459 # try adding the file in subdir
459 # try adding the file in subdir
@@ -468,7 +468,7 b' class dirnode(object):'
468 def iterfilepaths(self):
468 def iterfilepaths(self):
469 """Yield (status, path) for files directly under this directory."""
469 """Yield (status, path) for files directly under this directory."""
470 for f, st in self.files:
470 for f, st in self.files:
471 yield st, os.path.join(self.path, f)
471 yield st, pathutil.join(self.path, f)
472
472
473 def tersewalk(self, terseargs):
473 def tersewalk(self, terseargs):
474 """
474 """
@@ -482,7 +482,7 b' class dirnode(object):'
482
482
483 1) All the files in the directory (including all the files in its
483 1) All the files in the directory (including all the files in its
484 subdirectories) share the same status and the user has asked us to terse
484 subdirectories) share the same status and the user has asked us to terse
485 that status. -> yield (status, dirpath)
485 that status. -> yield (status, dirpath). dirpath will end in '/'.
486
486
487 2) Otherwise, we do following:
487 2) Otherwise, we do following:
488
488
@@ -499,7 +499,7 b' class dirnode(object):'
499 # Making sure we terse only when the status abbreviation is
499 # Making sure we terse only when the status abbreviation is
500 # passed as terse argument
500 # passed as terse argument
501 if onlyst in terseargs:
501 if onlyst in terseargs:
502 yield onlyst, self.path + pycompat.ossep
502 yield onlyst, self.path + '/'
503 return
503 return
504
504
505 # add the files to status list
505 # add the files to status list
@@ -551,7 +551,7 b' def tersedir(statuslist, terseargs):'
551 # process each sub-directory and build tersedict
551 # process each sub-directory and build tersedict
552 for subdir in rootobj.subdirs.values():
552 for subdir in rootobj.subdirs.values():
553 for st, f in subdir.tersewalk(terseargs):
553 for st, f in subdir.tersewalk(terseargs):
554 tersedict[st].append(util.pconvert(f))
554 tersedict[st].append(f)
555
555
556 tersedlist = []
556 tersedlist = []
557 for st in allst:
557 for st in allst:
General Comments 0
You need to be logged in to leave comments. Login now