Mercurial > hg
comparison hgext/convert/cvs.py @ 5306:7256cc396bbf
convert: workaround for cvsps.cache under Windows
In non-cygwin environment, cvsps fails to create its cache directory and redirect its output to stderr. Just ignore the error and capture stderr as well.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Fri, 14 Sep 2007 22:17:53 +0200 |
parents | 87348cdce88c |
children | 9400d677efc7 |
comparison
equal
deleted
inserted
replaced
5305:87348cdce88c | 5306:7256cc396bbf |
---|---|
32 d = os.getcwd() | 32 d = os.getcwd() |
33 try: | 33 try: |
34 os.chdir(self.path) | 34 os.chdir(self.path) |
35 id = None | 35 id = None |
36 state = 0 | 36 state = 0 |
37 for l in os.popen("cvsps -A -u --cvs-direct -q"): | 37 for l in os.popen("cvsps -A -u --cvs-direct -q 2>&1"): |
38 if state == 0: # header | 38 if state == 0: # header |
39 if l.startswith("PatchSet"): | 39 if l.startswith("PatchSet"): |
40 id = l[9:-2] | 40 id = l[9:-2] |
41 elif l.startswith("Date"): | 41 elif l.startswith("Date"): |
42 date = util.parsedate(l[6:-1], ["%Y/%m/%d %H:%M:%S"]) | 42 date = util.parsedate(l[6:-1], ["%Y/%m/%d %H:%M:%S"]) |