Renames don't show up on commit page

See e.g. https://hg.sr.ht/~ngoldbaum/rug/rev/6cbbe3b16834. This commit has two renames in it:

$ hg log -p -r 6cbbe3b16834
changeset:   21:6cbbe3b16834
user:        Nathan Goldbaum <nathan12343@gmail.com>
date:        Mon Jun 10 11:29:04 2019 -0400
summary:     move content and header into entry module

diff --git a/src/revlogs/content.rs b/src/revlogs/entry/content.rs
rename from src/revlogs/content.rs
rename to src/revlogs/entry/content.rs
diff --git a/src/revlogs/header.rs b/src/revlogs/entry/header.rs
rename from src/revlogs/header.rs
rename to src/revlogs/entry/header.rs
diff --git a/src/revlogs/entry.rs b/src/revlogs/entry/mod.rs
rename from src/revlogs/entry.rs
rename to src/revlogs/entry/mod.rs
--- a/src/revlogs/entry.rs
+++ b/src/revlogs/entry/mod.rs
@@ -4,8 +4,11 @@ use std::fs::File;
 use std::io;
 use std::io::Read;

-use super::content::RevlogContent;
-use super::header::RevlogHeader;
+pub mod content;
+pub mod header;
+use content::RevlogContent;
+use header::RevlogHeader;

 pub struct RevlogEntry {
diff --git a/src/revlogs/mod.rs b/src/revlogs/mod.rs
--- a/src/revlogs/mod.rs
+++ b/src/revlogs/mod.rs
@@ -5,13 +5,11 @@ use std::io::Read;
 use std::io::Seek;
 use std::io::SeekFrom;

-pub mod content;
 pub mod entry;
-pub mod header;

-pub use content::RevlogContent;
+pub use entry::content::RevlogContent;
+pub use entry::header::RevlogHeader;
 pub use entry::RevlogEntry;
-pub use header::RevlogHeader;

 pub struct Revlog {
Assigned to
1 year, 4 months ago
a month ago
No labels applied.

~ngoldbaum 1 year, 4 months ago

durin42 points out that this is likely because sourcehut is doing e.g. hg diff (which does not include rename information to be backward compatible with the unix diff/patch utilties) when it should be doing hg diff --git.

~ludovicchabant 1 year, 4 months ago

Ah great, thanks for the info!

~ludovicchabant 1 year, 4 months ago

So yeah we do pass the git flag but we also use unidiff to make sense of the output (i.e. parse the patch format into hunks and stuff), and it doesn't support Git-specific syntaxes :(

~sircmpwn REPORTED FIXED a month ago

Register here or Log in to comment, or comment via email.