Why are my dlls not included in my exported patches?
Asked Answered
G

1

7

I have used TortoiseHg to export a few changesets from a Mercurial repository.

This went fine, except that the SignalR dlls were not included in the patch of the changeset where I added those dlls.

Why are they not being included? If I look at the changeset on my machine, I can see the dlls are added in the changeset.

How can I add these dlls to the patch!?

I installed SignalR through nuget.

Thanks in advance.

EDIT: I also noticed that another change to a file is also not included in the patch of that changeset.

EDIT: When I open the patch in notepad++, I saw mention of the files:
diff -r b10c68a2d387 -r 74aa5e71d315 MyProject/_sln/packages/SignalR.Server.0.5.3/lib/net40/SignalR.dll
Binary file MyProject/_sln/packages/SignalR.Server.0.5.3/lib/net40/SignalR.dll has changed

Globigerina answered 21/9, 2012 at 13:45 Comment(7)
Are they perhaps ignored by the .hgignore file?Geometrize
Nope. It's so strange, when I click on the changeset in workbench on my PC, I see the files among the changed files. When I click on the changeset on my colleage's PC after importing. I don't see them among the changed files.Globigerina
What happens if you clone the project to a different folder on the computer on which you do see the files. Are the files cloned or are they missing?Geometrize
The file is present in the clone. I noticed that in the changeset the source file whose change didn't get exported is marked as binary. While it's just a .cs file.Globigerina
I'm sorry, I have no idea of what could be causing that. It sounds as if you're using different servers, but then again, you would'nt be able to see each others changesets. :-/Geometrize
You don't have any strange configuration in the hgrc file I suppose?Geometrize
Well, I export the changeset and sent it by mail. I have 0 experience with Mercurial, so I wouldn't know if any configuration is strange :). I updated the question with another observation.Globigerina
C
9

It looks like you're not passing the --git option to hg export. Without --git hg export will not include changes to binary files (or permissions, etc).

Personally, I think this should be the default now for everything that produces a diff in some form, but it's still not.

File -> Settings

enter image description here

Clarita answered 21/9, 2012 at 20:28 Comment(5)
Add git=True to section [diff] in the mercurial.ini/.hgrc to turn in on by default.Truda
Yeah - should have mentioned that - but theres no way of turning it off on the command line other than --config diff.git=False which is ugly. I feel that the support for git diffs is good enough now that it should be the default mode (with --nogit to turn it off). That would remove this type of confusion and errors from tools that don't support git diffs would lead people to --no-git since it won't pass silently.Clarita
Mercurial tries hard to maintain backwards-compatibility, so that's likely why it hasn't changed.Truda
Ahh, sounds like this is the solution, thanks!. I will try it out tomorrow or otherwise on Monday. PS: why is one of my .cs files treated as binary? Or should that be a whole new question :)?Globigerina
Yes! It works, thanks a million! In addition, I noticed that in TortoiseHg, the setting can be set in the UI: Settings->Diff and Annotate->Git Format->True.Globigerina

© 2022 - 2024 — McMap. All rights reserved.