Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
bug 617350 - hgtool.py shouldn't update shared checkout. r=bhearsum/c…
Browse files Browse the repository at this point in the history
…atlee
  • Loading branch information
Syed Albiz committed Dec 23, 2010
1 parent 33ecc7b commit b9e6944
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/python/util/hg.py
Expand Up @@ -177,7 +177,7 @@ def push(src, remote, **kwargs):
cmd.append(remote)
run_cmd(cmd, cwd=src)

def mercurial(repo, dest, branch=None, revision=None,
def mercurial(repo, dest, branch=None, revision=None, update_dest=True,
shareBase=DefaultShareBase):
"""Makes sure that `dest` is has `revision` or `branch` checked out from
`repo`.
Expand All @@ -194,7 +194,7 @@ def mercurial(repo, dest, branch=None, revision=None,
if os.path.exists(dest):
if not os.path.exists(os.path.join(dest, ".hg", "sharedpath")):
try:
return pull(repo, dest, branch=branch, revision=revision)
return pull(repo, dest, update_dest=update_dest, branch=branch, revision=revision)
except subprocess.CalledProcessError:
log.warning("Error pulling changes into %s from %s; clobbering", dest, repo)
log.debug("Exception:", exc_info=True)
Expand All @@ -207,7 +207,7 @@ def mercurial(repo, dest, branch=None, revision=None,
sharedRepo = os.path.join(shareBase, get_repo_path(repo))
try:
mercurial(repo, sharedRepo, branch=branch, revision=revision,
shareBase=None)
update_dest=False, shareBase=None)
if os.path.exists(dest):
return update(dest, branch=branch, revision=revision)
else:
Expand Down

0 comments on commit b9e6944

Please sign in to comment.