We use SurroundSCM for our version control and for all kinds of antiquated reasons, we often use repositories to create our folder structure. We go so far as to create some empty repositories just for build steps that will populate those eventually.
This causes a problem with the cached repos as I believe Mercurial doesn’t track repos, but files. I’m sure at this point the only solution is to create files in those folders, but are you aware of any other way to get around this?
Hi Jeremy,
Which version of Continua are you running? The latest version handles empty changesets by adding a marker file to the repository cache which is excluded when exporting the files.
I just upgraded today to 1.5.1.23 (we were running 1.0.something really old). It’s not the change of a repo with no files, but existing empty repos that are the cause of build problems. Our post build steps expect folders to exist and then they don’t and build failures.
I can look at the source on disk in the continua cache and see there are missing folders.
Well, I guess I can’t edit my previous post, looks like I got the image path wrong: http://www.codemonkeycodes.com/images/capture.png
Hi Jeremy,
You can fix the old repository caches by resetting the repositories on the administration page at http://hostname/administration/ci/repositories
I just looked at the image you’ve posted and it seems I misunderstood the issue. It’s not that the root repository is empty - it’s that folders within the repository are empty. The confusion here is due to Surround SCM calling every folder a repository.
Currently we only add an empty changeset marker to the root of a new empty repository. We’ll look into whether we can add these a marker files to empty folders before checking them into our repository cache.
We’ve investigated further and the problem here is not only that Mercurial does not track folders. There is also a problem with the Surround command line options that we use. “sscm cruisecontrol -r” does not list changes to folders and “sscm get -r” does not get folders. There may be a way around this be querying each subrepository individually but this would not be a small piece of work.
For now we recommend that you add a your own marker file e.g. .keepThisFolder to each empty repository.
Thanks for looking into this. For now I’ve addressed it by having a stage that creates all the necessary folders, but long term I think a “empty_folder.txt” or something like that is the “correct” solution.
As I recall, doesn’t Mercurial treat “dot files” (.keepthis) as special files, or have you guys already come up with ways to get around this?
Hi Jeremy,
Mercurial treats .hg* files as special files. We can however tell it to ignore other file patterns.