[PATCH] Copied files sources were not shown by status -C under Win32

Patrick Mezard pmezard at gmail.com
Sun Jan 14 11:11:50 CST 2007


# HG changeset patch
# User Patrick Mezard <pmezard at gmail.com>
# Date 1168798235 -3600
# Node ID 2d880b88cec65942fb90397b15851d9b48fbb8e1
# Parent  41935a956dd1b589c5f7fbfeff59b62d75e1cc4a
Copied files sources were not shown by status -C under Win32.

repo.dirstate.copied() takes a normalized paths while local paths were passed.

diff -r 41935a956dd1 -r 2d880b88cec6 mercurial/commands.py
--- a/mercurial/commands.py	Sun Jan 14 18:57:00 2007 +0100
+++ b/mercurial/commands.py	Sun Jan 14 19:10:35 2007 +0100
@@ -2373,8 +2373,7 @@ def status(ui, repo, *pats, **opts):
     files, matchfn, anypats = cmdutil.matchpats(repo, pats, opts)
     cwd = (pats and repo.getcwd()) or ''
     modified, added, removed, deleted, unknown, ignored, clean = [
-        [util.pathto(cwd, x) for x in n]
-        for n in repo.status(node1=node1, node2=node2, files=files,
+        n for n in repo.status(node1=node1, node2=node2, files=files,
                              match=matchfn,
                              list_ignored=all or opts['ignored'],
                              list_clean=all or opts['clean'])]
@@ -2399,11 +2398,11 @@ def status(ui, repo, *pats, **opts):
             format = "%s %%s%s" % (char, end)
 
         for f in changes:
-            ui.write(format % f)
+            ui.write(format % util.pathto(cwd, f))
             if ((all or opts.get('copies')) and not opts.get('no_status')):
                 copied = repo.dirstate.copied(f)
                 if copied:
-                    ui.write('  %s%s' % (copied, end))
+                    ui.write('  %s%s' % (util.pathto(cwd, copied), end))
 
 def tag(ui, repo, name, rev_=None, **opts):
     """add a tag for the current or given revision


More information about the Mercurial-devel mailing list