Skip to content

Spelling #251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gitless/cli/file_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def f(args, repo):
fp, 'n' if subcmd.startswith(VOWELS) else '', subcmd,
'' if subcmd.endswith('e') else 'e'))
except KeyError:
pprint.err('Can\'t {0} non-existent file {1}'.format(subcmd, fp))
pprint.err('Can\'t {0} nonexistent file {1}'.format(subcmd, fp))
success = False
except ValueError as e:
pprint.err(e)
Expand Down
2 changes: 1 addition & 1 deletion gitless/cli/gl_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def main(args, repo):
try:
patch = curr_b.diff_file(fp)
except KeyError:
pprint.err('Can\'t diff non-existent file {0}'.format(fp))
pprint.err('Can\'t diff nonexistent file {0}'.format(fp))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's a word, but this repository appears to be using US spelling:

Track or untrack files to control what changes to commit. Changes to tracked files are committed by default, but you can easily customize the set of files to commit using flags

https://dictionary.cambridge.org/dictionary/english/customize
https://dictionary.cambridge.org/dictionary/english/nonexistent

Happy to drop.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I can not merge this anyway, so.. Just find non-existent easier to read. Unlike colour etc.

success = False
continue

Expand Down
2 changes: 1 addition & 1 deletion gitless/cli/gl_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def _do_rename(rename_r, remotes):
errors_found = False
if len(rename_r) != 2:
pprint.err(
'Expected 2 arguments in the folllowing format: '
'Expected 2 arguments in the following format: '
'gl remote -rn current_remote_name new_remote_name')
errors_found = True
else:
Expand Down
2 changes: 1 addition & 1 deletion gitless/cli/gl_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def _print_untracked_files(untracked_list, relative_paths, repo):
def _print_conflict_exp(op):
pprint.msg(
'You are in the middle of a {0}; all conflicts must be resolved before '
'commiting'.format(op))
'committing'.format(op))
pprint.exp(
'use gl {0} --abort to go back to the state before the {0}'.format(op))
pprint.exp('use gl resolve f to mark file f as resolved')
Expand Down
4 changes: 2 additions & 2 deletions gitless/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def lookup_tag(self, tag_name):
def listall_tags(self):
"""Returns a list with the names of all tags in this repository.

Use lookup_tag to get the Tag object corresponding to eacn name.
Use lookup_tag to get the Tag object corresponding to each name.
"""
for ref in self.git_repo.listall_references():
if ref.startswith('refs/tags/'):
Expand Down Expand Up @@ -1051,7 +1051,7 @@ def fuse(self, src, ip, only=None, exclude=None, op_cb=None):
are inserted after this commit. ip has to correspond to one of the
divergent commits from self or the divergent point.
only: ids of commits to use only.
exclude: ids of commtis to exclude.
exclude: ids of commits to exclude.
op_cb: see OpCb.
"""
self._check_is_current()
Expand Down
4 changes: 2 additions & 2 deletions gitless/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ class TestFileDiff(TestFile):
@assert_status_unchanged(
UNTRACKED_FP, UNTRACKED_FP_WITH_SPACE,
IGNORED_FP, IGNORED_FP_WITH_SPACE)
def test_diff_nontracked(self):
def test_diff_untracked(self):
fps = [
UNTRACKED_FP, UNTRACKED_FP_WITH_SPACE,
IGNORED_FP, IGNORED_FP_WITH_SPACE]
Expand Down Expand Up @@ -947,7 +947,7 @@ def test_switch_contents_still_there_tracked_commit(self):
self.repo.switch_current_branch(self.repo.lookup_branch('master'))
self.assertEqual('commit', utils_lib.read_file(TRACKED_FP))

def test_switch_file_classification_is_mantained(self):
def test_switch_file_classification_is_maintained(self):
self.curr_b.untrack_file(TRACKED_FP)
self.repo.switch_current_branch(self.repo.lookup_branch(BRANCH))
st = self.curr_b.status_file(TRACKED_FP)
Expand Down
20 changes: 10 additions & 10 deletions gitless/tests/test_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ def test_basic_functionality(self):
# Track
utils.gl('track', 'file1')
self.assertRaises(CalledProcessError, utils.gl, 'track', 'file1')
self.assertRaises(CalledProcessError, utils.gl, 'track', 'non-existent')
self.assertRaises(CalledProcessError, utils.gl, 'track', 'nonexistent')
# Untrack
utils.gl('untrack', 'file1')
self.assertRaises(CalledProcessError, utils.gl, 'untrack', 'file1')
self.assertRaises(CalledProcessError, utils.gl, 'untrack', 'non-existent')
self.assertRaises(CalledProcessError, utils.gl, 'untrack', 'nonexistent')
# Commit
utils.gl('track', 'file1')
utils.gl('commit', '-m', 'file1 commit')
Expand Down Expand Up @@ -155,7 +155,7 @@ def test_basic_functionality(self):
self.assertRaises(
CalledProcessError, utils.gl, 'commit', '-m', 'resolve not called')
self.assertRaises(
CalledProcessError, utils.gl, 'resolve', 'non-existent')
CalledProcessError, utils.gl, 'resolve', 'nonexistent')
utils.gl('resolve', 'file1')
utils.gl('commit', '-m', 'fixed conflicts')

Expand Down Expand Up @@ -222,13 +222,13 @@ def test_commit_no_files(self):
CalledProcessError, utils.gl, 'commit', '--exclude',
self.TRACKED_FP, self.DIR_TRACKED_FP, '-m', 'msg')
self.assertRaises(
CalledProcessError, utils.gl, 'commit', 'non-existent', '-m', 'msg')
CalledProcessError, utils.gl, 'commit', 'nonexistent', '-m', 'msg')
self.assertRaises(
CalledProcessError, utils.gl, 'commit', '-m', 'msg',
'--exclude', 'non-existent')
'--exclude', 'nonexistent')
self.assertRaises(
CalledProcessError, utils.gl, 'commit', '-m', 'msg',
'--include', 'non-existent')
'--include', 'nonexistent')

def test_commit_dir(self):
fp = 'dir/f'
Expand Down Expand Up @@ -313,9 +313,9 @@ def test_remove(self):
def test_upstream(self):
self.assertRaises(CalledProcessError, utils.gl, 'branch', '-uu')
self.assertRaises(
CalledProcessError, utils.gl, 'branch', '-su', 'non-existent')
CalledProcessError, utils.gl, 'branch', '-su', 'nonexistent')
self.assertRaises(
CalledProcessError, utils.gl, 'branch', '-su', 'non-existent/non-existent')
CalledProcessError, utils.gl, 'branch', '-su', 'nonexistent/nonexistent')

def test_list(self):
utils.gl('branch', '-c', self.BRANCH_1)
Expand Down Expand Up @@ -487,7 +487,7 @@ def test_basic(self):

def test_only_errors(self):
self.assertRaises(
CalledProcessError, utils.gl, 'fuse', self.OTHER, '-o', 'non-existent-id')
CalledProcessError, utils.gl, 'fuse', self.OTHER, '-o', 'nonexistent-id')
self.assertRaises(
CalledProcessError, utils.gl, 'fuse', self.OTHER,
'-o', self.commits['master'][1])
Expand All @@ -504,7 +504,7 @@ def test_only_some(self):

def test_exclude_errors(self):
self.assertRaises(
CalledProcessError, utils.gl, 'fuse', self.OTHER, '-e', 'non-existent-id')
CalledProcessError, utils.gl, 'fuse', self.OTHER, '-e', 'nonexistent-id')
self.assertRaises(
CalledProcessError, utils.gl, 'fuse', self.OTHER,
'-e', self.commits['master'][1])
Expand Down
2 changes: 1 addition & 1 deletion gitless/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def assertRaisesRegexp(self, exc, r, fun, *args, **kwargs):

def rmtree(path):
# On Windows, running shutil.rmtree on a folder that contains read-only
# files throws errors. To workaround this, if removing a path fails, we make
# files throws errors. To work around this, if removing a path fails, we make
# the path writable and then try again
def onerror(func, path, unused_exc_info): # error handler for rmtree
if not os.access(path, os.W_OK):
Expand Down