Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 38160:c974320d20b9
terse: pconvert() entries added to the temporary terse dict for Windows
Recent additional testing revealed this problem on Windows:
--- tests/test-status.t.err
+++ tests/test-status.t.err
@@ -109,7 +109,7 @@
tweaking defaults works
$ hg status --cwd a --config ui.tweakdefaults=yes
- ? .
+ ? ../a/
? ../b/
? ../in_root
$ HGPLAIN=1 hg status --cwd a --config ui.tweakdefaults=yes
@@ -120,7 +120,7 @@
? b/in_b (glob)
? in_root
$ HGPLAINEXCEPT=tweakdefaults hg status --cwd a --config ui.tweakdefaults=yes
- ? .
+ ? ..\a\
? ../b/
? ../in_root (glob)
AFAICT, the status list (input and output here) is always in '/' format. The
'\' printed output on Windows is because each file is run through repo.pathto()
-> dirstate.pathto() -> util.pathto(). (And that function states that the
argument uses '/' separators.)
I fixed a similar issue in 362096cfdb1f, and given the apparent need for these
strings to be in '/' format, I wonder if cmdutil.dirnode() should be rewritten
to avoid os.path.join(). But it looks like all entries added to the temporary
terse dict should use '/' now, and cmdutil.tersedir() looks like the only user.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 22 May 2018 23:22:15 -0400 |
parents | dabc2237963c |
children | aac4be30e250 |
comparison
equal
deleted
inserted
replaced
38159:dea3903175ee | 38160:c974320d20b9 |
---|---|
550 tersedict[st].append(fpath) | 550 tersedict[st].append(fpath) |
551 | 551 |
552 # process each sub-directory and build tersedict | 552 # process each sub-directory and build tersedict |
553 for subdir in rootobj.subdirs.values(): | 553 for subdir in rootobj.subdirs.values(): |
554 for st, f in subdir.tersewalk(terseargs): | 554 for st, f in subdir.tersewalk(terseargs): |
555 tersedict[st].append(f) | 555 tersedict[st].append(util.pconvert(f)) |
556 | 556 |
557 tersedlist = [] | 557 tersedlist = [] |
558 for st in allst: | 558 for st in allst: |
559 tersedict[st].sort() | 559 tersedict[st].sort() |
560 tersedlist.append(tersedict[st]) | 560 tersedlist.append(tersedict[st]) |