I've been trying to make my .mailmap file to work globally in Windows, without having to put it at the root of each repository.
So I've moved it to C:\Users\.mailmap and added in the config file the following:
[mailmap]
file = 'C:/Users/<username>/.mailmap'
But it doesn't work.
I've tried all variations of no-quotes, single quotes, double quotes, single slash, double backslash... and I haven't been able to make it work. I've also tried using a more Windows-friendly file name, like MailMapGlobal.txt (similar to the GitignoreGlobal.txt I have that works just fine).
While researching the problem I've found this apparently unresolved question from 2011, which is pretty much the same, and I was wondering if there's been any news on this issue in the last 6 years or if there's a known solution that is not listed in that question.
I'm using Windows 7, with git 2.13.2.windows.1
Related
I'm working in a project that stores files with very long paths.
I need to use network paths such as \\server\share\files.. paths. But I cannot figure out why its not working. I'm running Win7
\\server\share\path\file.exe ( This works but not for very long paths ~266 char long)
This wiki page https://en.wikipedia.org/wiki/Path_%28computing%29 specifies that syntax \\?\UNC\server\share\path\file.exe should work for longer paths but I can't get it to work for either long or short paths.. Not supported for Win7 ?
Anyone has a solution of how i can point to long network paths using a \\xxx syntax with length ~266 characters?
Thanks to Harry Johnston, as a summary to how I solved my problem:
Windows Explorer does not support then \\?\UNC\.. syntax.
Using \\?\UNC\server\folder\.. together with Python 3.4 and shutil.copy2() works perfectly fine. (Which I assume uses the mentioned Unicode API from comments above)
when presenting the user with a directory path i remove ?\UNC\ and leave them with a simple \\server\path\.. path.. (which they, if they want to, copy paste into windows explorer and open the directory.
I'm using Maven to generate an archetype. I'm able to get the archetype to generate fine and the project template it generates works as expected. The only problem is in my shell scripts. Anything commented out in the script gets stripped leaving behind only commands. I've searched high and low and all I've been able to find was another user facing a similar issue with java comments. https://stackoverflow.com/questions/18797333/maven-archetype-generation-is-stripping-java-comments That question remains unanswered, so I figure I'll ask again. Does anyone know why Maven archetypes strip comments or how to prevent this from happening?
Using the #set command itself to set a #hash variable equal to "#" worked, allowing me to maintain shell comments in scripts generated by the archetype. This can get relatively ugly when using 80 # symbols in a row in a header, but that's another matter...
I also had a similar problem with hashes. On page http://johnjianfang.blogspot.com/2009/03/escape-properties-in-maven-archetypes.html I found answer.
Something like this works fine in my case:
#set($hash = '#')
${hash}
Output:
#
Maven uses Apache Velocity to perform substitutions/replacements when copying your archetype's template files to the project locations. The '#' character is used to begin directives, e.g. #set, in Velocity. My guess is that Velocity doesn't recognize your comment as a valid directive and silently deletes it during the replacement process.
Though I haven't verified this works - I would try escaping the comments with using a backslash (\) as defined in Velocity's user manual to solve the issue.
I am using ColdFusion 10 on a Windows machine. I am creating a directory for storing generated excel reports using directoryCreate() and spreadsheetWrite() cfscript functions. It works fine on Windows.
I have a work colleague who is developing on a mac with OS X mavericks. When the code is executed on his machine, one of two things happens. Either the file includes the full path name in the actual file name (e.g. "/folder/anotherfolder/thefile.xls" as single file name) and is placed in the root of the web project folder, or a single folder is created with the forward slashes as part of the folder name (e.g. "/folder/anotherfolder/" as single folder name).
Here are a couple of examples that I have tried for creating the initial root folder structure:
request.rootPath = ExpandPath("*.*");
request.rootDirectory = GetDirectoryFromPath(request.rootPath);
OR
request.rootPath = ExpandPath("./");
request.rootDirectory = GetDirectoryFromPath(request.rootPath);
OR
request.rootPath = ExpandPath("/");
request.rootDirectory = GetDirectoryFromPath(request.rootPath);
I then use request.rootDirectory in the directoryCreate() function, e.g.:
// within my fw/1 cfc...
rc.userReportPath = "#request.rootDirectory#folder\anotherfolder\";
if (!directoryExists(rc.userReportPath)) {
directoryCreate(rc.userReportPath);
}
And then create the spreadsheet file (where rc.excelFileName is my dynamic file name based on the logged in user:
spreadsheetWrite(rc.s, "#rc.userReportPath##rc.excelFileName#", true);
The only possible clue I've found so far is something to do with forward slashes being unicode characters that are only being displayed as forward slashes, not actual forward slashes for folder path creation (I hope that makes sense). Although, it may have nothing to do with this. The production environment is on a Windows environment so this isn't a major issue going forward, but being a bit obsessive, I'd really like to know what's really causing this behaviour so that I can avoid it in future.
Thanks in advance to anyone that can help me figure this one out :)
(From comments ...)
What is the actual value of the path ie #rc.userReportPath##rc.excelFileName#? Is it actually valid for OSX? It looks like windows style separators are being used ie \.
Try using / instead, which is valid for both windows and mac.
Sorry for what seems like a silly question: But I've never, ever worked with boost, until tonight, and I'm finding that getting it configured seems to be harder to use than it should be.
I wanted experiment with it tonight. So I downloaded the zip file, and unzipped it to a directory here:
F:/boost_1_44_0
Then I created an empty c++ project in visual studio 2010 (not using pch either). So all I wanted to do was to include a header file. But not even a silly thing like that seems to work. Now I've been using visual studio for years, though at work we are still stuck on vs 2008 (That is another story). So usually what you do is set an include directory, and then you can include files in at will right?
So I set the global include directory to include the boost root. i.e. Property Manager -> My configuration (debug|win32) -> Microsoft.Cpp.Win32.user -> Common Properties -> C++ Directories -> Include Directories. There I added my path to f:/boost_1_44_0.
I also went to the project properties and set the C++ include directory for the project to point to the boost root like in vs 2008.
I then added a silly include declaration like so:
#include <boost/lambda/lambda.hpp>
But, amazingly it fails to compile!!! with the following error:
Error 1 error C1083: Cannot open include file: 'boost/type_traits/transform_traits.hpp': No such file or directory f:\boost_1_44_0\boost\lambda\core.hpp 25 1 test_boost
Which when I double click it, it opens up in f:\boost_1_44_0\boost\lambda\core.hpp, and takes me to this line:
#include "boost/type_traits/transform_traits.hpp"
So I have no idea what's happening. Is visual studio just not delivering up my global include paths that I set? It seems also that the include directive in core.hpp should be using angle brackets and not quotes.
If I'm doing something wrong what?
EDIT:
!! SOLVED !!
Before I didn't have all the files unzipped. I don't know what happened. So I re-downloaded the zip file, and unzipped it again. This time the zip file took much longer to unzip, and it extracted much more files: Including the missing files.
Problem solved, my hello world app compiles just fine now.
The behaviour of compilers in locating header files is implementation defined for both the <> and "" variants.
However, based on this page for VC2010, it appears the quoted form searches a superset of the angle bracket form so I'm not sure that's the problem.
I suppose it would be a silly question to ask if the following file actually existed?
f:\boost_1_44_0\boost\type_traits\transform_traits.hpp
So, a couple of investigative jobs:
Make sure that f:\boost_1_44_0\boost\type_traits\transform_traits.hpp exists.
Try changing your top-level include to use quotes.
Try changing the include in f:\boost_1_44_0\boost\lambda\core.hpp to use angle brackets.
Make sure you try all four possibilities for those last two.
Is f: a network-mounted drive? What happens if you put it all on c:?
That last one is just in case Windows is doing some shenanigans under the covers :-)
While it's a bit overkill for this, learning to use SysInternals' Process Monitor will pay off over time. It will show you what files are actually opened, and which attempts failed. Look where Visual Studio tries to read transform_traits.hpp from, and you'll probably have the answer.
So far it only looks like the bookmarks you make become available inside Filezilla1 but I want to make them show up on the desktop like shortcut links.
Maybe a shell script would work? I am trying to find (arguments/parameters/options) what I can pass into filezilla via a command line but no luck so far here/google/etc. I'm checking out their documentation and wiki right now but, nothing seems to be mentioning how to do this.
I've done similar things with WINE and Editpadpro in Linux Mint in the past but I wish I could just find a way to get the parameters listed. It wouldn't be any different on OSX than it would anywhere else right? My friend needs it for that, but I think it could easily be ported to Linux and windows as well afterward.
The documentation for command line parameters for FileZilla is here.
It looks like the closest you can get is to do:
-c, --site
Connect to the given site from the Site Manager. Site has to be
given as complete path, with a slash
as separation character. Any slash or
backslash that is part of a segment
has to be escaped with a backslash.
Path has to be prefixed with 0 for
user defined entries or 1 for default
entries. Site path may not contain
double quotation marks. Example:
0/foo/bar/sl/ash connects to the user
site sl/ash in the site directory
foo/bar Start with Site Manager
opened. May not be used together with
-s nor with URL parameter. May not be used together with -c nor with URL
parameter.----