Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
spderosso committed Sep 10, 2015
2 parents 00df139 + bd84bd3 commit f5637d7
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gitless/cli/gl.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
INTERNAL_ERROR = 3
NOT_IN_GL_REPO = 4

VERSION = '0.8.1'
VERSION = '0.8.2'
URL = 'http://gitless.com'


Expand Down
2 changes: 1 addition & 1 deletion gitless/cli/gl_branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def _do_list(repo, list_remote, v=False):
if list_remote:
for r in repo.remotes:
for b in (r.lookup_branch(n) for n in r.listall_branches()):
pprint.item(' {0}'.format(colored.yellow(b.branch_name)))
pprint.item(' {0}'.format(colored.yellow(str(b))))
if v:
pprint.item(' ➜ head is {0}'.format(_ci_str(b.head)))

Expand Down
4 changes: 2 additions & 2 deletions gitless/cli/gl_commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def _op_continue(op, fn):
pprint.blank()
try:
op(op_cb=pprint.OP_CB)
pprint.ok('{0} succeeded'.format(op))
pprint.ok('{0} succeeded'.format(fn))
except core.ApplyFailedError as e:
pprint.ok('{0} succeeded'.format(op))
pprint.ok('{0} succeeded'.format(fn))
raise e
2 changes: 1 addition & 1 deletion gitless/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ def merge(self, src, op_cb=None):
raise GlError(stdout(e) + err)
if op_cb and op_cb.save:
op_cb.save()
git.stash.save('--', _stash_msg_merge)
git.stash.save('--', _stash_msg_merge(self))
try:
git.merge(src, '--no-ff')
except ErrorReturnCode as e:
Expand Down
20 changes: 20 additions & 0 deletions gitless/tests/test_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,26 @@ def test_uncommitted_changes(self):
self.assertEqual('uncommitted', utils.read_file(self.MASTER_FILE))
self.assertEqual('uncommitted', utils.read_file('master_untracked'))

def test_uncommitted_tracked_changes_that_conflict(self):
gl.branch(c='tmp', divergent_point='HEAD~1')
gl.switch('tmp')
utils.write_file(self.MASTER_FILE, contents='uncommitted')
self.assertRaisesRegexp(
ErrorReturnCode, 'failed to apply', gl.merge, 'master')
contents = utils.read_file(self.MASTER_FILE)
self.assertTrue('uncommitted' in contents)
self.assertTrue('contents 2' in contents)

def test_uncommitted_tracked_changes_that_conflict_append(self):
gl.branch(c='tmp', divergent_point='HEAD~1')
gl.switch('tmp')
utils.append_to_file(self.MASTER_FILE, contents='uncommitted')
self.assertRaisesRegexp(
ErrorReturnCode, 'failed to apply', gl.merge, 'master')
contents = utils.read_file(self.MASTER_FILE)
self.assertTrue('uncommitted' in contents)
self.assertTrue('contents 2' in contents)


class TestPerformance(TestEndToEnd):

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from setuptools import setup


VERSION = '0.8.1'
VERSION = '0.8.2'


# Build helper
Expand Down

0 comments on commit f5637d7

Please sign in to comment.