tags:

views:

58

answers:

1

I have a repo on the server named "Gold" that exists as my production repo, a repo named "Silver" on the server that acts as a dev repo, and then obviously one or more repos on my local client. Strangely enough, when I push a changeset from my local dev machine to Gold, Silver also somehow gets the changeset. We are running Mercurial on Windows Server 2008R2 on IIS7.5.

Example:

Server (create Gold on server)

  • mkdir Gold
  • cd ./Gold
  • hg init

Client (clone Gold to client)

  • hg clone http://server/Gold Dev
  • cd Dev
  • echo "Foo" > bar.txt
  • hg ci -Am "added file bar.txt"
  • hg push

At this point the client and server are in synch, each with one changeset.

Server (clone Gold into Silver - a new dev repo - on server)

  • cd ..
  • hg clone ./Gold Silver

Client (commit & push change to Gold - not touching Silver)

  • echo "Fizz" > buzz.txt
  • hg ci -Am "added file buzz.txt"
  • hg push

Now I would expect Gold to have two changesets and Silver to have one. In our environment here, Gold & Silver both somehow have both changesets! Any change we push to Gold automatically shows up in Silver. This seems incredibly unexpected to me - has anyone run into this before?

+1  A: 

Hrm. That certainly shouldn't happen. There are ways you could make it happen (using hooks), but it shouldn't happen on its own.

In the case of a local clone (your hg clone ./Gold Silver line) mercurial uses hardlinks under the covers to save on disk space, but it breaks those links on write.

As a test, however, you could change that line to:

hg clone --pull ./Gold Silver

which will use more diskspace, but be otherwise identical.

I don't expect that to fix anything, but I guess it's a good datapoint to have.

Ry4an
Your suggestion actually *does* work, which is great. I'd love to know why it is necessary though...
Troy