Skip to content

Commit

Permalink
Trac #15420: Borken git doctests.
Browse files Browse the repository at this point in the history
Github master, at 094712a (head)

http://patchbot.sagemath.org/log/0/Ubuntu/12.10/x86_64/3.5.0-17-generic/
pi/2013-11-14%2002:54:22%20-0800?short

Looks like we just need to sort this list.

URL: http://trac.sagemath.org/15420
Reported by: robertwb
Ticket author(s): Robert Bradshaw, R. Andrew Ohana
Reviewer(s): R. Andrew Ohana
  • Loading branch information
Release Manager authored and vbraun committed Dec 16, 2013
2 parents 9941537 + 2e77868 commit 3ec5f9a
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/sage/dev/git_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import os

from sage.env import (
SAGE_DOT_GIT, SAGE_REPO_AUTHENTICATED, SAGE_ROOT,
SAGE_DOT_GIT, SAGE_REPO_AUTHENTICATED, SAGE_ROOT,
SAGE_REPO_ANONYMOUS
)

Expand Down Expand Up @@ -105,10 +105,10 @@ def _run_git(self, cmd, args, git_kwds, popen_kwds=dict()):
sage: os.chdir(config['git']['src'])
sage: git._run_git('status', (), {})
(0,
(0,
'# On branch master\n#\n# Initial commit\n#\nnothing to commit
(create/copy files and use "git add" to track)\n',
'',
(create/copy files and use "git add" to track)\n',
'',
'git -c user.email=doc@test.test -c user.name=doctest status')
TESTS:
Expand Down Expand Up @@ -968,21 +968,22 @@ def local_branches(self):
Create some branches::
sage: os.chdir(config['git']['src'])
sage: git.silent.commit('-m','initial commit','--allow-empty')
sage: env = {'GIT_COMMITTER_DATE': time.strftime("%Y-%m-%dT%H:%M:10")}
sage: git.silent.commit('-m','initial commit','--allow-empty', env=env)
sage: git.super_silent.checkout('-b', 'branch')
sage: time.sleep(1)
sage: git.silent.commit('-m','second commit','--allow-empty')
sage: env['GIT_COMMITTER_DATE'] = time.strftime("%Y-%m-%dT%H:%M:20")
sage: git.silent.commit('-m','second commit','--allow-empty', env=env)
sage: git.super_silent.checkout('-b', 'other', 'master')
sage: time.sleep(1)
sage: git.silent.commit('-m','third commit','--allow-empty')
sage: env['GIT_COMMITTER_DATE'] = time.strftime("%Y-%m-%dT%H:%M:30")
sage: git.silent.commit('-m','third commit','--allow-empty', env=env)
Use this repository as a remote repository::
sage: config2 = DoctestConfig()
sage: git2 = GitInterface(config2["git"], DoctestUserInterface(config["UI"]))
sage: os.chdir(config2['git']['src'])
sage: time.sleep(1)
sage: git2.silent.commit('-m','initial commit','--allow-empty')
sage: env['GIT_COMMITTER_DATE'] = time.strftime("%Y-%m-%dT%H:%M:40")
sage: git2.silent.commit('-m','initial commit','--allow-empty', env=env)
sage: git2.silent.remote('add', 'git', config['git']['src'])
sage: git2.super_silent.fetch('git')
sage: git2.super_silent.checkout("branch")
Expand Down

0 comments on commit 3ec5f9a

Please sign in to comment.