P4D3::Support ability to AddRemove an empty directory

JD Fagan avatarJD Fagan created an issue

I can't seem to be able to add a directory from MacHG to repo. The Add/Remove button is grayed out when I have a non-versioned folder selected. Its an empty directory at this point. I read up on Mercurial's lack of ability to handle adding of an empty directory - http://mercurial.selenic.com/bts/issue521 (a bad limitation IMO - particularly for non-coder based repos where no build system necessarily exists - or if one simply wants to slowly build up a directory structure initially as a design to share with team and work on flushing out hierarchy design before settling what that final structure is for where things go, etc.).

Anyways, the workaround (http://code.google.com/p/markemptydirs/) seems to be to create a dummy file just so one can add in an otherwise empty directory. Would be great if MacHG did this for us behind the scenes - perhaps a ".emptyDir" file will auto-create at time one tries to add an empty directory so as to satisfy Mercurial's lack of ability to add empty directory. And then when second file added to this directory, it would be smart enough to delete the .emptyDir file. I know its a hack, but unless underlying Mercurial is changed, this is not a pleasant GUI experience for end users at the moment IMO.

Comments (3)

  1. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.