mercurialmercurial-subrepos

Mercurial path bug, or am I doing something wrong


I'm trying to use subrepos but I keep having strange issues when pushing/pulling changes to the server. I feel like this is a bug, but I'm not sure.

I've determined that after committing my changes locally, the best way to get my changes to the server is with hg pull -u on the server drive. What I do is cd to the root of my repo on c:, and cd to the root of the server repo on z:, and then use the command hg pull -u c: from z:.

(The reason I've found is that you can't use -u with push, and if you don't update, then the current revision ends up being behind the most recent (say the one you pushed is 100, but it will still be on 99), and then later when you commit more changes you get weird merge problems because you worked off of 99 which now has to be merged back into 100+.)

Ok but that's not the bug. The bug is that when I do hg pull -u c:, it seems to be working but then errors out like this:

Z:\>hg pull -u c:
pulling from c:
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
new changesets e8003f274ea0
abort: repository c:/SomeProject not found!

So, this seems like a bug to me, because the path c:/SomeProject is just wrong, the path should be c:SomeProject. Once this happens I have to manually update the errored subrepo.

Maybe it has something to do with how I've setup the subrepos? I make my .hgsub file by enumerating the folders in my project directory and writing FolderName = FolderName to a text file for each one. So it looks like:

SomeProject = SomeProject
SomeOtherProject = SomeOtherProject
etc.

Maybe it should be formatted differently?

I recently upgraded from version 2.something to version 4.4.2 and was surprised to find that this still happened.


Solution

  • I ended up reporting it as a bug and it was fixed in the next version.