Skip to content

Commit

Permalink
Change "hg up" to "hg pull -u"
Browse files Browse the repository at this point in the history
Only show commits for default branch
Fix mercurial.updaterepo call
  • Loading branch information
tobami committed Dec 29, 2010
1 parent 7c70196 commit f8efad1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions speedcenter/codespeed/mercurial.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
def updaterepo(repo):
repodir = path + repo.split('/')[-1] + "/"
if os.path.exists(repodir):
cmd = "hg up"
cmd = "hg pull -u"
p = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE, cwd=repodir)
stdout, stderr = p.communicate()
if stderr:
Expand All @@ -30,7 +30,7 @@ def getlogs(endrev, startrev):
if not os.path.exists(repodir):
updaterepo(endrev.project.repo_path)

cmd = "hg log -r %s:%s --template '{rev}:{node|short}\n{author|person} / {author|user}\n{date}\n{desc}\n=newlog=\n'" % (endrev.commitid, startrev.commitid)
cmd = "hg log -r %s:%s -b default --template '{rev}:{node|short}\n{author|person} / {author|user}\n{date}\n{desc}\n=newlog=\n'" % (endrev.commitid, startrev.commitid)
p = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE, cwd=repodir)
stdout, stderr = p.communicate()
if stderr:
Expand Down
2 changes: 1 addition & 1 deletion speedcenter/codespeed/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ def getcommitlogs(rev, startrev, update=False):
elif rev.project.repo_type == 'M':
import mercurial
if update:
resp = mercurial.update(rev.project.repo_path)
resp = mercurial.updaterepo(rev.project.repo_path)
if resp.get('error'):
return resp
logs = mercurial.getlogs(rev, startrev)
Expand Down

0 comments on commit f8efad1

Please sign in to comment.