chiark / gitweb /
Improve "cannot represent change" message
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 20 Dec 2016 21:38:34 +0000 (21:38 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 20 Dec 2016 21:38:39 +0000 (21:38 +0000)
Print the git old and new modes too.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
dgit
tests/tests/unrepresentable

index 64ed65c9bc2e6317bd73bd2934fe7d826234c528..846fe2306bdf901a9b88d5fd4fb4d3eda3d62bd6 100644 (file)
@@ -4,6 +4,8 @@ dgit (2.13~) unstable; urgency=medium
     --include-removal to dpkg-source, and tolerating it when we do our
     quilt fixup analysis.  dpkg-source has supported this since at least
     stretch.  Closes:#848901.
+  * Improve "cannot represent change" message: print the git old and new
+    modes too.
 
  --
 
diff --git a/dgit b/dgit
index 9a8d22147a9b0a80e93f54c20b64a5113c7e962a..acb456373190fcd29e555eaf3353befbfc70c4ef 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -4509,7 +4509,7 @@ sub quiltify_trees_differ ($$;$$$) {
            };
            if ($@) {
                local $/="\n"; chomp $@;
-               push @$unrepres, [ $f, $@ ];
+               push @$unrepres, [ $f, "$@ ($oldmode->$newmode)" ];
            }
        }
 
index 9dd2111baac87ff3db7f25c4649866f3e901d63c..5b3e139387aacee13c5bb4af39a0a85f4a444518 100755 (executable)
@@ -21,7 +21,7 @@ badly-1 () {
 
 badly-2 () {
        git commit -m "Commit wrongness $wrongfn ($wrongmsg)"
-       t-expect-fail "cannot represent change: $wrongmsg: $wrongfn" \
+       t-expect-fail E:"cannot represent change: $wrongmsg .*: $wrongfn" \
        attempt
 }