[PATCH] Display symlink or executable bit with manifest -v

Patrick Mezard pmezard at gmail.com
Fri Oct 5 17:56:40 CDT 2007


# HG changeset patch
# User Patrick Mezard <pmezard at gmail.com>
# Date 1191624801 -7200
# Node ID 72a6b343c7298359ea83406588d041d2c5584254
# Parent  e73a83af79267ea9f08a8b7fe7498dbd5f4539c5
Display symlink or executable bit with manifest -v

New output looks like:

644   a
755 * b/a
644 @ l

It changes manifest -v output format. If this is an issue, we can add a suppressing options like --hide-type for 0.9.5 and let people add it to [defaults], and drop it in next release.

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1902,7 +1902,9 @@ def manifest(ui, repo, node=None, rev=No
         if ui.debugflag:
             ui.write("%40s " % hex(m[f]))
         if ui.verbose:
-            ui.write("%3s " % (m.execf(f) and "755" or "644"))
+            type = m.execf(f) and "*" or m.linkf(f) and "@" or " "
+            perm = m.execf(f) and "755" or "644"
+            ui.write("%3s %1s " % (perm, type))
         ui.write("%s\n" % f)
 
 def merge(ui, repo, node=None, force=None, rev=None):


More information about the Mercurial-devel mailing list