Skip to content

Commit f5637d7

Browse files
committed
Merge branch 'develop'
2 parents 00df139 + bd84bd3 commit f5637d7

File tree

6 files changed

+26
-6
lines changed

6 files changed

+26
-6
lines changed

gitless/cli/gl.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
INTERNAL_ERROR = 3
3030
NOT_IN_GL_REPO = 4
3131

32-
VERSION = '0.8.1'
32+
VERSION = '0.8.2'
3333
URL = 'http://gitless.com'
3434

3535

gitless/cli/gl_branch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def _do_list(repo, list_remote, v=False):
9898
if list_remote:
9999
for r in repo.remotes:
100100
for b in (r.lookup_branch(n) for n in r.listall_branches()):
101-
pprint.item(' {0}'.format(colored.yellow(b.branch_name)))
101+
pprint.item(' {0}'.format(colored.yellow(str(b))))
102102
if v:
103103
pprint.item(' ➜ head is {0}'.format(_ci_str(b.head)))
104104

gitless/cli/gl_commit.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def _op_continue(op, fn):
6868
pprint.blank()
6969
try:
7070
op(op_cb=pprint.OP_CB)
71-
pprint.ok('{0} succeeded'.format(op))
71+
pprint.ok('{0} succeeded'.format(fn))
7272
except core.ApplyFailedError as e:
73-
pprint.ok('{0} succeeded'.format(op))
73+
pprint.ok('{0} succeeded'.format(fn))
7474
raise e

gitless/core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ def merge(self, src, op_cb=None):
792792
raise GlError(stdout(e) + err)
793793
if op_cb and op_cb.save:
794794
op_cb.save()
795-
git.stash.save('--', _stash_msg_merge)
795+
git.stash.save('--', _stash_msg_merge(self))
796796
try:
797797
git.merge(src, '--no-ff')
798798
except ErrorReturnCode as e:

gitless/tests/test_e2e.py

+20
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,26 @@ def test_uncommitted_changes(self):
604604
self.assertEqual('uncommitted', utils.read_file(self.MASTER_FILE))
605605
self.assertEqual('uncommitted', utils.read_file('master_untracked'))
606606

607+
def test_uncommitted_tracked_changes_that_conflict(self):
608+
gl.branch(c='tmp', divergent_point='HEAD~1')
609+
gl.switch('tmp')
610+
utils.write_file(self.MASTER_FILE, contents='uncommitted')
611+
self.assertRaisesRegexp(
612+
ErrorReturnCode, 'failed to apply', gl.merge, 'master')
613+
contents = utils.read_file(self.MASTER_FILE)
614+
self.assertTrue('uncommitted' in contents)
615+
self.assertTrue('contents 2' in contents)
616+
617+
def test_uncommitted_tracked_changes_that_conflict_append(self):
618+
gl.branch(c='tmp', divergent_point='HEAD~1')
619+
gl.switch('tmp')
620+
utils.append_to_file(self.MASTER_FILE, contents='uncommitted')
621+
self.assertRaisesRegexp(
622+
ErrorReturnCode, 'failed to apply', gl.merge, 'master')
623+
contents = utils.read_file(self.MASTER_FILE)
624+
self.assertTrue('uncommitted' in contents)
625+
self.assertTrue('contents 2' in contents)
626+
607627

608628
class TestPerformance(TestEndToEnd):
609629

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from setuptools import setup
88

99

10-
VERSION = '0.8.1'
10+
VERSION = '0.8.2'
1111

1212

1313
# Build helper

0 commit comments

Comments
 (0)