##// END OF EJS Templates
commit: if interactive, look elsewhere for whitespace settings (BC)...
Kyle Lippincott -
r41701:66399f2e default
parent child Browse files
Show More
@@ -282,7 +282,9 b' def dorecord(ui, repo, commitfunc, cmdsu'
282 status = repo.status(match=match)
282 status = repo.status(match=match)
283 if not force:
283 if not force:
284 repo.checkcommitpatterns(wctx, vdirs, match, status, fail)
284 repo.checkcommitpatterns(wctx, vdirs, match, status, fail)
285 diffopts = patch.difffeatureopts(ui, opts=opts)
285 diffopts = patch.difffeatureopts(ui, opts=opts, whitespace=True,
286 section='commands',
287 configprefix='commit.interactive.')
286 diffopts.nodates = True
288 diffopts.nodates = True
287 diffopts.git = True
289 diffopts.git = True
288 diffopts.showfunc = True
290 diffopts.showfunc = True
@@ -3126,7 +3128,9 b' def _performrevert(repo, parents, ctx, n'
3126 # Prompt the user for changes to revert
3128 # Prompt the user for changes to revert
3127 torevert = [f for f in actions['revert'][0] if f not in excluded_files]
3129 torevert = [f for f in actions['revert'][0] if f not in excluded_files]
3128 m = scmutil.matchfiles(repo, torevert)
3130 m = scmutil.matchfiles(repo, torevert)
3129 diffopts = patch.difffeatureopts(repo.ui)
3131 diffopts = patch.difffeatureopts(repo.ui, whitespace=True,
3132 section='commands',
3133 configprefix='revert.interactive.')
3130 diffopts.nodates = True
3134 diffopts.nodates = True
3131 diffopts.git = True
3135 diffopts.git = True
3132 operation = 'discard'
3136 operation = 'discard'
@@ -201,6 +201,7 b" coreconfigitem('color', 'mode',"
201 coreconfigitem('color', 'pagermode',
201 coreconfigitem('color', 'pagermode',
202 default=dynamicdefault,
202 default=dynamicdefault,
203 )
203 )
204 _registerdiffopts(section='commands', configprefix='commit.interactive.')
204 coreconfigitem('commands', 'grep.all-files',
205 coreconfigitem('commands', 'grep.all-files',
205 default=False,
206 default=False,
206 )
207 )
@@ -213,6 +214,7 b" coreconfigitem('commands', 'resolve.expl"
213 coreconfigitem('commands', 'resolve.mark-check',
214 coreconfigitem('commands', 'resolve.mark-check',
214 default='none',
215 default='none',
215 )
216 )
217 _registerdiffopts(section='commands', configprefix='revert.interactive.')
216 coreconfigitem('commands', 'show.aliasprefix',
218 coreconfigitem('commands', 'show.aliasprefix',
217 default=list,
219 default=list,
218 )
220 )
@@ -1808,7 +1808,7 b' even if none of mode, size and timestamp'
1808 $ hg status -A subdir/f1
1808 $ hg status -A subdir/f1
1809 M subdir/f1
1809 M subdir/f1
1810
1810
1811 Test diff.unified=0
1811 Test commands.commit.interactive.unified=0
1812
1812
1813 $ hg init $TESTTMP/b
1813 $ hg init $TESTTMP/b
1814 $ cd $TESTTMP/b
1814 $ cd $TESTTMP/b
@@ -1829,7 +1829,7 b' Test diff.unified=0'
1829 > 4
1829 > 4
1830 > 5
1830 > 5
1831 > EOF
1831 > EOF
1832 $ printf 'y\ny\ny\n' | hg ci -im initial --config diff.unified=0
1832 $ printf 'y\ny\ny\n' | hg ci -im initial --config commands.commit.interactive.unified=0
1833 diff --git a/foo b/foo
1833 diff --git a/foo b/foo
1834 2 hunks, 2 lines changed
1834 2 hunks, 2 lines changed
1835 examine changes to 'foo'? [Ynesfdaq?] y
1835 examine changes to 'foo'? [Ynesfdaq?] y
@@ -26,6 +26,8 b''
26 > [diff]
26 > [diff]
27 > git=1
27 > git=1
28 > unified=0
28 > unified=0
29 > [commands]
30 > commit.interactive.unified=0
29 > [alias]
31 > [alias]
30 > glog=log -G -T '{rev}:{node|short} {desc} {bookmarks}\n'
32 > glog=log -G -T '{rev}:{node|short} {desc} {bookmarks}\n'
31 > EOF
33 > EOF
@@ -105,10 +107,10 b' Split a head'
105
107
106 This function splits a bit strangely primarily to avoid changing the behavior of
108 This function splits a bit strangely primarily to avoid changing the behavior of
107 the test after a bug was fixed with how split/commit --interactive handled
109 the test after a bug was fixed with how split/commit --interactive handled
108 `diff.unified=0`: when there were no context lines, it kept only the last diff
110 `commands.commit.interactive.unified=0`: when there were no context lines,
109 hunk. When running split, this meant that runsplit was always recording three commits,
111 it kept only the last diff hunk. When running split, this meant that runsplit
110 one for each diff hunk, in reverse order (the base commit was the last diff hunk
112 was always recording three commits, one for each diff hunk, in reverse order
111 in the file).
113 (the base commit was the last diff hunk in the file).
112 $ runsplit() {
114 $ runsplit() {
113 > cat > $TESTTMP/messages <<EOF
115 > cat > $TESTTMP/messages <<EOF
114 > split 1
116 > split 1
General Comments 0
You need to be logged in to leave comments. Login now