summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCezary Baginski <cezary.baginski@gmail.com>2012-04-23 23:55:35 +0200
committerShawn O. Pearce <sop@google.com>2012-05-24 08:58:10 -0700
commitccf86432b39ce2506fca472bbdbe379fdc53d3e3 (patch)
tree8066007b25cc9b245add60ca08055ee0bb09b91b
parent79770d269e319dee578beed682669703d4c764ba (diff)
downloadgit-repo-ccf86432b39ce2506fca472bbdbe379fdc53d3e3.tar.gz
Avoid failing concat for multi-encoding filenames
repo status should output filenames one by one instead of trying to build a string from incompatible encodings (like utf-8 and sjis filenames) Change-Id: I52282236ececa562f109f9ea4b2e971d2b4bc045
-rw-r--r--subcmds/status.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/subcmds/status.py b/subcmds/status.py
index 7187f4b1..69e2dbfc 100644
--- a/subcmds/status.py
+++ b/subcmds/status.py
@@ -111,14 +111,21 @@ the following meanings:
111 threads_and_output = [] 111 threads_and_output = []
112 for project in all: 112 for project in all:
113 sem.acquire() 113 sem.acquire()
114 output = StringIO.StringIO() 114
115 class BufList(StringIO.StringIO):
116 def dump(self, ostream):
117 for entry in self.buflist:
118 ostream.write(entry)
119
120 output = BufList()
121
115 t = _threading.Thread(target=self._StatusHelper, 122 t = _threading.Thread(target=self._StatusHelper,
116 args=(project, counter, sem, output)) 123 args=(project, counter, sem, output))
117 threads_and_output.append((t, output)) 124 threads_and_output.append((t, output))
118 t.start() 125 t.start()
119 for (t, output) in threads_and_output: 126 for (t, output) in threads_and_output:
120 t.join() 127 t.join()
121 sys.stdout.write(output.getvalue()) 128 output.dump(sys.stdout)
122 output.close() 129 output.close()
123 if len(all) == counter.next(): 130 if len(all) == counter.next():
124 print 'nothing to commit (working directory clean)' 131 print 'nothing to commit (working directory clean)'