D6123: similar: add condition to avoid Zerodivisonerror in function _score() (issue6099)
akshjain.jain74 updated this revision to Diff 14508. akshjain.jain74 marked 2 inline comments as done. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6123?vs=14487=14508 REVISION DETAIL https://phab.mercurial-scm.org/D6123 AFFECTED FILES mercurial/similar.py CHANGE DETAILS diff --git a/mercurial/similar.py b/mercurial/similar.py --- a/mercurial/similar.py +++ b/mercurial/similar.py @@ -63,7 +63,9 @@ equal += len(line) lengths = len(text) + len(orig) -return equal * 2.0 / lengths +if lengths: +return equal * 2.0 / lengths +return 0 def score(fctx1, fctx2): return _score(fctx1, _ctxdata(fctx2)) To: akshjain.jain74, durin42, #hg-reviewers Cc: av6, pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6123: similar: add condition to avoid Zerodivisonerror in function _score() (issue6099)
akshjain.jain74 added inline comments. INLINE COMMENTS > pulkit wrote in similar.py:68 > no need for this else. you can `return 0` without else. yes actually i did'nt noticed that REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6123 To: akshjain.jain74, durin42, #hg-reviewers Cc: av6, pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6123: similar: add condition to avoid Zerodivisonerror in function _score() (issue6099)
akshjain.jain74 added a comment. thanks for the review REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6123 To: akshjain.jain74, durin42, #hg-reviewers Cc: av6, pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6123: similar: add condition to avoid Zerodivisonerror in function _score() (issue6099)
akshjain.jain74 added a comment. In https://phab.mercurial-scm.org/D6123#89410, @pulkit wrote: > Can you try to add a test for this? yes i can definitely try to add test for this REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6123 To: akshjain.jain74, durin42, #hg-reviewers Cc: av6, pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6123: similar: add condition to avoid Zerodivisonerror in function _score() (issue6099)
akshjain.jain74 updated this revision to Diff 14487. akshjain.jain74 retitled this revision from "ZeroDivisionError: Add condition to avoid Zerodivisonerror due to float number (issue6099)" to "similar: add condition to avoid Zerodivisonerror in function _score() (issue6099)". REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6123?vs=14482=14487 REVISION DETAIL https://phab.mercurial-scm.org/D6123 AFFECTED FILES mercurial/similar.py CHANGE DETAILS diff --git a/mercurial/similar.py b/mercurial/similar.py --- a/mercurial/similar.py +++ b/mercurial/similar.py @@ -63,7 +63,10 @@ equal += len(line) lengths = len(text) + len(orig) -return equal * 2.0 / lengths +if lengths != 0: +return equal * 2.0 / lengths +else: +return 0 def score(fctx1, fctx2): return _score(fctx1, _ctxdata(fctx2)) To: akshjain.jain74, durin42, #hg-reviewers Cc: av6, pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6128: chistedit:improve location of highlighted cursor.(issue6073)
akshjain.jain74 created this revision. Herald added a reviewer: durin42. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6128 AFFECTED FILES hgext/histedit.py hgext/pager.py mercurial/dispatch.py mercurial/scmutil.py CHANGE DETAILS diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -45,6 +45,7 @@ vfs, ) + from .utils import ( procutil, stringutil, diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -18,7 +18,6 @@ import time import traceback - from .i18n import _ from hgdemandimport import tracing diff --git a/hgext/pager.py b/hgext/pager.py --- a/hgext/pager.py +++ b/hgext/pager.py @@ -31,6 +31,7 @@ registrar, ) + # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should # be specifying the version(s) of Mercurial they are tested with, or diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -1124,7 +1124,7 @@ if next: index += 1 else: -index -= 1 +index += 1 changeaction(state, pos, KEY_LIST[index % len(KEY_LIST)]) def changeview(state, delta, unit): @@ -1164,12 +1164,12 @@ if action is None: return if action in ('down', 'move-down'): -newpos = min(oldpos + 1, len(rules) - 1) +newpos = min(oldpos+1 , len(rules) - 1) movecursor(state, oldpos, newpos) if selected is not None or action == 'move-down': swap(state, oldpos, newpos) elif action in ('up', 'move-up'): -newpos = max(0, oldpos - 1) +newpos = max(0, oldpos-1) movecursor(state, oldpos, newpos) if selected is not None or action == 'move-up': swap(state, oldpos, newpos) To: akshjain.jain74, durin42, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6123: ZeroDivisionError: Add condition to avoid Zerodivisonerror due to float number (issue6099)
akshjain.jain74 added a comment. actually i am not getting what can be the proper topic for this :( REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6123 To: akshjain.jain74, durin42, #hg-reviewers Cc: av6, pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6123: ZeroDivisionError: Add condition to avoid Zerodivisonerror due to float number (issue6099)
akshjain.jain74 added a comment. sorry for that , but can you tell me in what condition this function will return none value? REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6123 To: akshjain.jain74, durin42, #hg-reviewers Cc: av6, pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6123: ZeroDivisionError: Add condition to avoid Zerodivisonerror due to float number (issue6099)
akshjain.jain74 updated this revision to Diff 14482. akshjain.jain74 retitled this revision from "Experimental features: Add condition to for float number (issue6099)" to "ZeroDivisionError: Add condition to avoid Zerodivisonerror due to float number (issue6099)". REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6123?vs=14477=14482 REVISION DETAIL https://phab.mercurial-scm.org/D6123 AFFECTED FILES mercurial/similar.py CHANGE DETAILS diff --git a/mercurial/similar.py b/mercurial/similar.py --- a/mercurial/similar.py +++ b/mercurial/similar.py @@ -63,7 +63,8 @@ equal += len(line) lengths = len(text) + len(orig) -return equal * 2.0 / lengths +if lengths > 0: +return equal * 2.0 / lengths def score(fctx1, fctx2): return _score(fctx1, _ctxdata(fctx2)) To: akshjain.jain74, durin42, #hg-reviewers Cc: av6, pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6123: Experimental features: Add condition to for float number (issue6099)
akshjain.jain74 added a comment. Sorry for the various mistake I will correct everything in an hour thanks REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6123 To: akshjain.jain74, durin42, #hg-reviewers Cc: av6, pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6123: Experimental features: Add condition to for float number (issue6099)
akshjain.jain74 added a comment. Oh sorry ,my bad I think that is by mistake I will correct it now Ithink while committing I added that file by mistake REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6123 To: akshjain.jain74, durin42, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6123: Experimental features: Add condition to for float number (issue6099)
akshjain.jain74 created this revision. Herald added a reviewer: durin42. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6123 AFFECTED FILES hgext/histedit.py mercurial/similar.py CHANGE DETAILS diff --git a/mercurial/similar.py b/mercurial/similar.py --- a/mercurial/similar.py +++ b/mercurial/similar.py @@ -63,6 +63,7 @@ equal += len(line) lengths = len(text) + len(orig) +if lengths > 0: return equal * 2.0 / lengths def score(fctx1, fctx2): diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -1124,7 +1124,7 @@ if next: index += 1 else: -index += 1 +index -= 1 changeaction(state, pos, KEY_LIST[index % len(KEY_LIST)]) def changeview(state, delta, unit): To: akshjain.jain74, durin42, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
akshjain.jain74 added a comment. In https://phab.mercurial-scm.org/D6026#88552, @pulkit wrote: > I am not sure the new message is much helpful. As JordiGH and others pointed out on IRC, it will definitely be helpful if we can show which operation has the lock right now. > > Something like: > > `waiting for lock on working directory of b held by process '*' running on host '*'` So for which commands we can show this message, like i got message when i run hg commit --amend sometimes REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6026 To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
akshjain.jain74 added a comment. okay @pulkit let me work upon your suggestion and INLINE COMMENTS > pulkit wrote in test-lock-badness.t:18 > still here are unrealted changes. I accept these changes while running test, if i am not changing this then it will cause test failing REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6026 To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6043: UnicodeEncoding:change the default encoding of the whole script to be 'UTF-8'(issue6040)
akshjain.jain74 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6043 AFFECTED FILES hg hgext/pager.py hgext/phabricator.py mercurial/dispatch.py mercurial/scmutil.py mercurial/util.py CHANGE DETAILS diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -54,6 +54,9 @@ stringutil, ) +reload(sys) +sys.setdefaultencoding('utf8') + base85 = policy.importmod(r'base85') osutil = policy.importmod(r'osutil') parsers = policy.importmod(r'parsers') diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -45,6 +45,11 @@ vfs, ) +import sys +reload(sys) +sys.setdefaultencoding('utf8') + + from .utils import ( procutil, stringutil, diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -18,6 +18,9 @@ import time import traceback +reload(sys) +sys.setdefaultencoding('utf8') + from .i18n import _ diff --git a/hgext/phabricator.py b/hgext/phabricator.py --- a/hgext/phabricator.py +++ b/hgext/phabricator.py @@ -41,6 +41,7 @@ from __future__ import absolute_import +import sys import contextlib import itertools import json @@ -72,6 +73,9 @@ procutil, stringutil, ) +reload(sys) +sys.setdefaultencoding('utf8') + # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should diff --git a/hgext/pager.py b/hgext/pager.py --- a/hgext/pager.py +++ b/hgext/pager.py @@ -23,14 +23,20 @@ ''' from __future__ import absolute_import +import sys + from mercurial import ( cmdutil, commands, dispatch, extensions, registrar, ) +reload(sys) +sys.setdefaultencoding('utf8') + + # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should # be specifying the version(s) of Mercurial they are tested with, or diff --git a/hg b/hg --- a/hg +++ b/hg @@ -14,7 +14,7 @@ if os.environ.get('HGUNICODEPEDANTRY', False): try: reload(sys) -sys.setdefaultencoding("undefined") +sys.setdefaultencoding("utf8") except NameError: pass To: akshjain.jain74, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
akshjain.jain74 updated this revision to Diff 14291. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6026?vs=14279=14291 REVISION DETAIL https://phab.mercurial-scm.org/D6026 AFFECTED FILES hgext/journal.py mercurial/lock.py tests/test-check-pyflakes.t tests/test-clone.t tests/test-extdiff.t tests/test-lock-badness.t tests/test-phases-exchange.t tests/test-remotefilelog-bgprefetch.t CHANGE DETAILS diff --git a/tests/test-remotefilelog-bgprefetch.t b/tests/test-remotefilelog-bgprefetch.t --- a/tests/test-remotefilelog-bgprefetch.t +++ b/tests/test-remotefilelog-bgprefetch.t @@ -282,8 +282,13 @@ $ hg prefetch --repack waiting for lock on prefetching in $TESTTMP/shallow held by process * on host * (glob) (?) got lock after * seconds (glob) (?) + Another Mercurial process seems to be running in + * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) (?) + this repository, e.g. an editor opened by 'hg commit'. + Please make sure all processes are terminated then + try again. + got lock after 1 seconds (running background incremental repack) - * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) (?) $ sleep 0.5 $ hg debugwaitonrepack >/dev/null 2>%1 diff --git a/tests/test-phases-exchange.t b/tests/test-phases-exchange.t --- a/tests/test-phases-exchange.t +++ b/tests/test-phases-exchange.t @@ -1319,6 +1319,10 @@ $ hg push ../Phi --config ui.timeout=1 pushing to ../Phi waiting for lock on repository $TESTTMP/Upsilon held by '' + Another Mercurial process seems to be running in + this repository, e.g. an editor opened by 'hg commit'. + Please make sure all processes are terminated then + try again. abort: repository $TESTTMP/Upsilon: timed out waiting for lock held by '' (lock might be very busy) [255] diff --git a/tests/test-lock-badness.t b/tests/test-lock-badness.t --- a/tests/test-lock-badness.t +++ b/tests/test-lock-badness.t @@ -15,17 +15,14 @@ $ cat > testlock.py << EOF > from mercurial import error, registrar - > > cmdtable = {} > command = registrar.command(cmdtable) - > > def acquiretestlock(repo, releaseexc): > def unlock(): > if releaseexc: > raise error.Abort(b'expected release exception') > l = repo._lock(repo.vfs, b'testlock', False, unlock, None, b'test lock') > return l - > > @command(b'testlockexc') > def testlockexc(ui, repo): > testlock = acquiretestlock(repo, True) @@ -62,6 +59,10 @@ $ cat preup-stdout $ cat preup-stderr waiting for lock on working directory of b held by process '*' on host '*' (glob) + Another Mercurial process seems to be running in + this repository, e.g. an editor opened by 'hg commit'. + Please make sure all processes are terminated then + try again. got lock after * seconds (glob) $ cat stdout adding b @@ -105,6 +106,10 @@ $ cat preup-stdout calling hook pre-update: hghook_pre-update.sleephalf waiting for lock on working directory of b held by process '*' on host '*' (glob) + Another Mercurial process seems to be running in + this repository, e.g. an editor opened by 'hg commit'. + Please make sure all processes are terminated then + try again. got lock after * seconds (glob) 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat preup-stderr @@ -122,6 +127,10 @@ $ cat preup-stdout calling hook pre-update: hghook_pre-update.sleephalf waiting for lock on working directory of b held by process '*' on host '*' (glob) + Another Mercurial process seems to be running in + this repository, e.g. an editor opened by 'hg commit'. + Please make sure all processes are terminated then + try again. got lock after * seconds (glob) 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat preup-stderr diff --git a/tests/test-extdiff.t b/tests/test-extdiff.t --- a/tests/test-extdiff.t +++ b/tests/test-extdiff.t @@ -151,8 +151,8 @@ Test --per-file option for gui tool: $ hg --config extdiff.gui.alabalaf=True alabalaf -c 6 --per-file --debug + diffing */extdiff.*/a.46c0e4daeb72/b a.81906f2b98ac/b (glob) diffing */extdiff.*/a.46c0e4daeb72/a a.81906f2b98ac/a (glob) - diffing */extdiff.*/a.46c0e4daeb72/b a.81906f2b98ac/b (glob) making snapshot of 2 files from rev 46c0e4daeb72 a b diff --git a/tests/test-clone.t b/tests/test-clone.t --- a/tests/test-clone.t +++ b/tests/test-clone.t @@ -1141,6 +1141,10 @@ $ (grep 'existing pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock (sharing
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
akshjain.jain74 marked an inline comment as done. akshjain.jain74 added a comment. @pulkit done changes as per your suggestion in lock file too but what did you meant by storelock? REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6026 To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
akshjain.jain74 updated this revision to Diff 14279. akshjain.jain74 marked 2 inline comments as done. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6026?vs=14277=14279 REVISION DETAIL https://phab.mercurial-scm.org/D6026 AFFECTED FILES hgext/journal.py mercurial/lock.py tests/test-lock-badness.t CHANGE DETAILS diff --git a/tests/test-lock-badness.t b/tests/test-lock-badness.t --- a/tests/test-lock-badness.t +++ b/tests/test-lock-badness.t @@ -15,17 +15,17 @@ $ cat > testlock.py << EOF > from mercurial import error, registrar - > + > > cmdtable = {} > command = registrar.command(cmdtable) - > + > > def acquiretestlock(repo, releaseexc): > def unlock(): > if releaseexc: > raise error.Abort(b'expected release exception') > l = repo._lock(repo.vfs, b'testlock', False, unlock, None, b'test lock') > return l - > + > > @command(b'testlockexc') > def testlockexc(ui, repo): > testlock = acquiretestlock(repo, True) diff --git a/mercurial/lock.py b/mercurial/lock.py --- a/mercurial/lock.py +++ b/mercurial/lock.py @@ -113,11 +113,19 @@ # show more details for new-style locks if ':' in locker: host, pid = locker.split(":", 1) -msg = (_("waiting for lock on %s held by process %r on host %r\n") +msg = (_("waiting for lock on %s held by process %r on host %r\n" +"""Another Mercurial process seems to be running in + this repository, e.g. an editor opened by 'hg commit'. + Please make sure all processes are terminated then + try again.\n""") % (pycompat.bytestr(l.desc), pycompat.bytestr(pid), pycompat.bytestr(host))) else: -msg = (_("waiting for lock on %s held by %r\n") +msg = (_("waiting for lock on %s held by %r\n" + """Another Mercurial process seems to be running in + this repository, e.g. an editor opened by 'hg commit'. + Please make sure all processes are terminated then + try again.\n""") % (l.desc, pycompat.bytestr(locker))) printer(msg) diff --git a/hgext/journal.py b/hgext/journal.py --- a/hgext/journal.py +++ b/hgext/journal.py @@ -307,7 +307,11 @@ l = lock.lock(vfs, 'namejournal.lock', 0, desc=desc) except error.LockHeld as inst: self.ui.warn( -_("waiting for lock on %s held by %r\n") % (desc, inst.locker)) +_("waiting for lock on %s held by %r\n" +"""Another Mercurial process seems to be running in + this repository, e.g. an editor opened by 'hg commit'. + Please make sure all processes are terminated then + try again.\n""") % (desc, inst.locker)) # default to 600 seconds timeout l = lock.lock( vfs, 'namejournal.lock', To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
akshjain.jain74 updated this revision to Diff 14277. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6026?vs=14274=14277 REVISION DETAIL https://phab.mercurial-scm.org/D6026 AFFECTED FILES hgext/journal.py tests/test-lock-badness.t CHANGE DETAILS diff --git a/tests/test-lock-badness.t b/tests/test-lock-badness.t --- a/tests/test-lock-badness.t +++ b/tests/test-lock-badness.t @@ -15,17 +15,14 @@ $ cat > testlock.py << EOF > from mercurial import error, registrar - > > cmdtable = {} > command = registrar.command(cmdtable) - > > def acquiretestlock(repo, releaseexc): > def unlock(): > if releaseexc: > raise error.Abort(b'expected release exception') > l = repo._lock(repo.vfs, b'testlock', False, unlock, None, b'test lock') > return l - > > @command(b'testlockexc') > def testlockexc(ui, repo): > testlock = acquiretestlock(repo, True) @@ -107,6 +104,7 @@ waiting for lock on working directory of b held by process '*' on host '*' (glob) got lock after * seconds (glob) 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cat preup-stderr $ cat stdout adding e @@ -124,6 +122,7 @@ waiting for lock on working directory of b held by process '*' on host '*' (glob) got lock after * seconds (glob) 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cat preup-stderr $ cat stdout adding f diff --git a/hgext/journal.py b/hgext/journal.py --- a/hgext/journal.py +++ b/hgext/journal.py @@ -307,7 +307,13 @@ l = lock.lock(vfs, 'namejournal.lock', 0, desc=desc) except error.LockHeld as inst: self.ui.warn( -_("waiting for lock on %s held by %r\n") % (desc, inst.locker)) +_("waiting for lock on %s held by %r\n" "on host %r\n" +"""Another Mercurial process seems to be running in + this repository, e.g. an editor opened by 'hg commit'. + Please make sure all processes are terminated then + try again. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue.\n""") % (desc, inst.locker)) # default to 600 seconds timeout l = lock.lock( vfs, 'namejournal.lock', To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
akshjain.jain74 updated this revision to Diff 14274. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6026?vs=14273=14274 REVISION DETAIL https://phab.mercurial-scm.org/D6026 AFFECTED FILES hgext/journal.py tests/test-lock-badness.t CHANGE DETAILS diff --git a/tests/test-lock-badness.t b/tests/test-lock-badness.t --- a/tests/test-lock-badness.t +++ b/tests/test-lock-badness.t @@ -15,17 +15,17 @@ $ cat > testlock.py << EOF > from mercurial import error, registrar - > + > > cmdtable = {} > command = registrar.command(cmdtable) - > + > > def acquiretestlock(repo, releaseexc): > def unlock(): > if releaseexc: > raise error.Abort(b'expected release exception') > l = repo._lock(repo.vfs, b'testlock', False, unlock, None, b'test lock') > return l - > + > > @command(b'testlockexc') > def testlockexc(ui, repo): > testlock = acquiretestlock(repo, True) @@ -106,6 +106,12 @@ calling hook pre-update: hghook_pre-update.sleephalf waiting for lock on working directory of b held by process '*' on host '*' (glob) got lock after * seconds (glob) + + Another Mercurial process seems to be running in this repository, e.g. + an editor opened by 'hg commit'. Please make sure all processes + are terminated then try again. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue. 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat preup-stderr $ cat stdout @@ -123,6 +129,12 @@ calling hook pre-update: hghook_pre-update.sleephalf waiting for lock on working directory of b held by process '*' on host '*' (glob) got lock after * seconds (glob) + + Another Mercurial process seems to be running in this repository, e.g. + an editor opened by 'hg commit'. Please make sure all processes + are terminated then try again. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue. 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat preup-stderr $ cat stdout diff --git a/hgext/journal.py b/hgext/journal.py --- a/hgext/journal.py +++ b/hgext/journal.py @@ -307,7 +307,13 @@ l = lock.lock(vfs, 'namejournal.lock', 0, desc=desc) except error.LockHeld as inst: self.ui.warn( -_("waiting for lock on %s held by %r\n") % (desc, inst.locker)) +_("waiting for lock on %s held by %r\n" "on host %r\n" +"""Another Mercurial process seems to be running in + this repository, e.g. an editor opened by 'hg commit'. + Please make sure all processes are terminated then + try again. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue.\n""") % (desc, inst.locker)) # default to 600 seconds timeout l = lock.lock( vfs, 'namejournal.lock', To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
akshjain.jain74 updated this revision to Diff 14273. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6026?vs=14272=14273 REVISION DETAIL https://phab.mercurial-scm.org/D6026 AFFECTED FILES hgext/journal.py tests/test-lock-badness.t CHANGE DETAILS diff --git a/tests/test-lock-badness.t b/tests/test-lock-badness.t --- a/tests/test-lock-badness.t +++ b/tests/test-lock-badness.t @@ -15,17 +15,17 @@ $ cat > testlock.py << EOF > from mercurial import error, registrar - > + > > cmdtable = {} > command = registrar.command(cmdtable) - > + > > def acquiretestlock(repo, releaseexc): > def unlock(): > if releaseexc: > raise error.Abort(b'expected release exception') > l = repo._lock(repo.vfs, b'testlock', False, unlock, None, b'test lock') > return l - > + > > @command(b'testlockexc') > def testlockexc(ui, repo): > testlock = acquiretestlock(repo, True) @@ -106,6 +106,12 @@ calling hook pre-update: hghook_pre-update.sleephalf waiting for lock on working directory of b held by process '*' on host '*' (glob) got lock after * seconds (glob) + + Another Mercurial process seems to be running in this repository, e.g. + an editor opened by 'hg commit'. Please make sure all processes + are terminated then try again. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue. 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat preup-stderr $ cat stdout @@ -123,6 +129,12 @@ calling hook pre-update: hghook_pre-update.sleephalf waiting for lock on working directory of b held by process '*' on host '*' (glob) got lock after * seconds (glob) + + Another Mercurial process seems to be running in this repository, e.g. + an editor opened by 'hg commit'. Please make sure all processes + are terminated then try again. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue. 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat preup-stderr $ cat stdout diff --git a/hgext/journal.py b/hgext/journal.py --- a/hgext/journal.py +++ b/hgext/journal.py @@ -307,7 +307,11 @@ l = lock.lock(vfs, 'namejournal.lock', 0, desc=desc) except error.LockHeld as inst: self.ui.warn( -_("waiting for lock on %s held by %r\n") % (desc, inst.locker)) +_("waiting for lock on %s held by %r\n" "on host %r\n" """Another Mercurial process seems to be running in this repository, e.g. + an editor opened by 'hg commit'. Please make sure all processes + are terminated then try again. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue.\n""") % (desc, inst.locker)) # default to 600 seconds timeout l = lock.lock( vfs, 'namejournal.lock', To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
akshjain.jain74 updated this revision to Diff 14272. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6026?vs=14271=14272 REVISION DETAIL https://phab.mercurial-scm.org/D6026 AFFECTED FILES hgext/journal.py tests/test-lock-badness.t CHANGE DETAILS diff --git a/tests/test-lock-badness.t b/tests/test-lock-badness.t --- a/tests/test-lock-badness.t +++ b/tests/test-lock-badness.t @@ -15,17 +15,17 @@ $ cat > testlock.py << EOF > from mercurial import error, registrar - > + > > cmdtable = {} > command = registrar.command(cmdtable) - > + > > def acquiretestlock(repo, releaseexc): > def unlock(): > if releaseexc: > raise error.Abort(b'expected release exception') > l = repo._lock(repo.vfs, b'testlock', False, unlock, None, b'test lock') > return l - > + > > @command(b'testlockexc') > def testlockexc(ui, repo): > testlock = acquiretestlock(repo, True) @@ -106,6 +106,12 @@ calling hook pre-update: hghook_pre-update.sleephalf waiting for lock on working directory of b held by process '*' on host '*' (glob) got lock after * seconds (glob) + + Another Mercurial process seems to be running in this repository, e.g. + an editor opened by 'hg commit'. Please make sure all processes + are terminated then try again. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue. 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat preup-stderr $ cat stdout @@ -123,6 +129,12 @@ calling hook pre-update: hghook_pre-update.sleephalf waiting for lock on working directory of b held by process '*' on host '*' (glob) got lock after * seconds (glob) + + Another Mercurial process seems to be running in this repository, e.g. + an editor opened by 'hg commit'. Please make sure all processes + are terminated then try again. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue. 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat preup-stderr $ cat stdout diff --git a/hgext/journal.py b/hgext/journal.py --- a/hgext/journal.py +++ b/hgext/journal.py @@ -307,7 +307,11 @@ l = lock.lock(vfs, 'namejournal.lock', 0, desc=desc) except error.LockHeld as inst: self.ui.warn( -_("waiting for lock on %s held by %r\n") % (desc, inst.locker)) +_("waiting for lock on %s held by %r\n" "on host %r\n" """Another Mercurial process seems to be running in this repository, e.g. + an editor opened by 'hg commit'. Please make sure all processes + are terminated then try again. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue.""") % (desc, inst.locker)) # default to 600 seconds timeout l = lock.lock( vfs, 'namejournal.lock', To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
akshjain.jain74 updated this revision to Diff 14271. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6026?vs=14244=14271 REVISION DETAIL https://phab.mercurial-scm.org/D6026 AFFECTED FILES hgext/journal.py tests/test-lock-badness.t CHANGE DETAILS diff --git a/tests/test-lock-badness.t b/tests/test-lock-badness.t --- a/tests/test-lock-badness.t +++ b/tests/test-lock-badness.t @@ -15,17 +15,17 @@ $ cat > testlock.py << EOF > from mercurial import error, registrar - > + > > cmdtable = {} > command = registrar.command(cmdtable) - > + > > def acquiretestlock(repo, releaseexc): > def unlock(): > if releaseexc: > raise error.Abort(b'expected release exception') > l = repo._lock(repo.vfs, b'testlock', False, unlock, None, b'test lock') > return l - > + > > @command(b'testlockexc') > def testlockexc(ui, repo): > testlock = acquiretestlock(repo, True) @@ -106,6 +106,12 @@ calling hook pre-update: hghook_pre-update.sleephalf waiting for lock on working directory of b held by process '*' on host '*' (glob) got lock after * seconds (glob) + + Another Mercurial process seems to be running in this repository, e.g. + an editor opened by 'hg commit'. Please make sure all processes + are terminated then try again. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue. 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat preup-stderr $ cat stdout @@ -123,6 +129,12 @@ calling hook pre-update: hghook_pre-update.sleephalf waiting for lock on working directory of b held by process '*' on host '*' (glob) got lock after * seconds (glob) + + Another Mercurial process seems to be running in this repository, e.g. + an editor opened by 'hg commit'. Please make sure all processes + are terminated then try again. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue. 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat preup-stderr $ cat stdout diff --git a/hgext/journal.py b/hgext/journal.py --- a/hgext/journal.py +++ b/hgext/journal.py @@ -307,7 +307,11 @@ l = lock.lock(vfs, 'namejournal.lock', 0, desc=desc) except error.LockHeld as inst: self.ui.warn( -_("waiting for lock on %s held by %r\n") % (desc, inst.locker)) +_("waiting for lock on %s held by %r\n" "on host %r\n" """Another Mercurial process seems to be running in this repository, e.g. + an editor opened by 'hg commit'. Please make sure all processes + are terminated then try again. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue.\n""") % (desc, inst.locker)) # default to 600 seconds timeout l = lock.lock( vfs, 'namejournal.lock', To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
akshjain.jain74 added a comment. Ya I am sending that just trying to find out the file REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6026 To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5967: chistedit: improve proper username in histedit curses interfacein changeset section (issue6072)
akshjain.jain74 added a comment. okay , thanks @martinvonz REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5967 To: akshjain.jain74, durin42, #hg-reviewers, martinvonz Cc: martinvonz, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5967: chistedit: improve proper username in histedit curses interfacein changeset section (issue6072)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGdf1f3ba56157: chistedit: improve proper username in histedit curses interface (authored by akshjain.jain74, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5967?vs=14097=14098 REVISION DETAIL https://phab.mercurial-scm.org/D5967 AFFECTED FILES hgext/histedit.py CHANGE DETAILS diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -1260,7 +1260,7 @@ line = "changeset: {0}:{1:<12}".format(ctx.rev(), ctx) win.addstr(1, 1, line[:length]) -line = "user: {0}".format(stringutil.shortuser(ctx.user())) +line = "user: {0}".format(ctx.user()) win.addstr(2, 1, line[:length]) bms = repo.nodebookmarks(ctx.node()) To: akshjain.jain74, durin42, #hg-reviewers, martinvonz Cc: martinvonz, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5967: curses: improve proper username in histedit curses interfacein changeset section (issue6072)
akshjain.jain74 created this revision. Herald added a reviewer: durin42. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5967 AFFECTED FILES hgext/histedit.py CHANGE DETAILS diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -1246,7 +1246,7 @@ line = "changeset: {0}:{1:<12}".format(ctx.rev(), ctx) win.addstr(1, 1, line[:length]) -line = "user: {0}".format(stringutil.shortuser(ctx.user())) +line = "user: {0}".format(ctx.user()) win.addstr(2, 1, line[:length]) bms = repo.nodebookmarks(ctx.node()) To: akshjain.jain74, durin42, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5941: tweakdefault: Add better documentation for ui.tweakdefault(issue6000)
akshjain.jain74 added a comment. okay REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5941 To: akshjain.jain74, #hg-reviewers, pulkit Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5941: tweakdefault: Add better documentation for ui.tweakdefault(issue6000)
akshjain.jain74 added a comment. @pulkit like what else we required to improve the documentation for the issue , in general what tweakdefault do for mercurial is already mention in the issue 樂 REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5941 To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5941: tweakdefault: Add better documentation for ui.tweakdefault(issue6000)
akshjain.jain74 updated this revision to Diff 14079. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5941?vs=14050=14079 REVISION DETAIL https://phab.mercurial-scm.org/D5941 AFFECTED FILES mercurial/help/config.txt CHANGE DETAILS diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt --- a/mercurial/help/config.txt +++ b/mercurial/help/config.txt @@ -2394,13 +2394,21 @@ ``tweakdefaults`` +Making fine adjustments in mercurial default behavior. + By default Mercurial's behavior changes very little from release to release, but over time the recommended config settings shift. Enable this config to opt in to get automatic tweaks to Mercurial's behavior over time. This config setting will have no effect if ``HGPLAIN`` is set or ``HGPLAINEXCEPT`` is set and does not include ``tweakdefaults``. (default: False) +It is a way to opt-in to what mercurial has decided +is the best default experience for it. + + + + It currently means:: .. tweakdefaultsmarker To: akshjain.jain74, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5743: patch: handle 0 context lines (diff.unified=0) when parsing patches
akshjain.jain74 updated this revision to Diff 14078. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5743?vs=13571=14078 REVISION DETAIL https://phab.mercurial-scm.org/D5743 AFFECTED FILES mercurial/patch.py tests/test-commit-interactive.t tests/test-split.t CHANGE DETAILS diff --git a/tests/test-split.t b/tests/test-split.t --- a/tests/test-split.t +++ b/tests/test-split.t @@ -103,6 +103,12 @@ abort: cannot split multiple revisions [255] +This function splits a bit strangely primarily to avoid changing the behavior of +the test after a bug was fixed with how split/commit --interactive handled +`diff.unified=0`: when there were no context lines, it kept only the last diff +hunk. When running split, this meant that runsplit was always recording three commits, +one for each diff hunk, in reverse order (the base commit was the last diff hunk +in the file). $ runsplit() { > cat > $TESTTMP/messages < split 1 @@ -113,23 +119,36 @@ > EOF > cat < y + > n + > n > y > y + > n > y > y > y > EOF > } $ HGEDITOR=false runsplit diff --git a/a b/a - 1 hunks, 1 lines changed + 3 hunks, 3 lines changed examine changes to 'a'? [Ynesfdaq?] y + @@ -1,1 +1,1 @@ + -1 + +11 + record change 1/3 to 'a'? [Ynesfdaq?] n + + @@ -3,1 +3,1 @@ 2 + -3 + +33 + record change 2/3 to 'a'? [Ynesfdaq?] n + @@ -5,1 +5,1 @@ 4 -5 +55 - record this change to 'a'? [Ynesfdaq?] y + record change 3/3 to 'a'? [Ynesfdaq?] y transaction abort! rollback completed @@ -140,13 +159,23 @@ $ HGEDITOR="\"$PYTHON\" $TESTTMP/editor.py" $ runsplit diff --git a/a b/a - 1 hunks, 1 lines changed + 3 hunks, 3 lines changed examine changes to 'a'? [Ynesfdaq?] y + @@ -1,1 +1,1 @@ + -1 + +11 + record change 1/3 to 'a'? [Ynesfdaq?] n + + @@ -3,1 +3,1 @@ 2 + -3 + +33 + record change 2/3 to 'a'? [Ynesfdaq?] n + @@ -5,1 +5,1 @@ 4 -5 +55 - record this change to 'a'? [Ynesfdaq?] y + record change 3/3 to 'a'? [Ynesfdaq?] y EDITOR: HG: Splitting 1df0d5c5a3ab. Write commit message for the first split changeset. EDITOR: a2 @@ -160,13 +189,18 @@ EDITOR: HG: changed a created new head diff --git a/a b/a - 1 hunks, 1 lines changed + 2 hunks, 2 lines changed examine changes to 'a'? [Ynesfdaq?] y + @@ -1,1 +1,1 @@ + -1 + +11 + record change 1/2 to 'a'? [Ynesfdaq?] n + @@ -3,1 +3,1 @@ 2 -3 +33 - record this change to 'a'? [Ynesfdaq?] y + record change 2/2 to 'a'? [Ynesfdaq?] y EDITOR: HG: Splitting 1df0d5c5a3ab. So far it has been split into: EDITOR: HG: - e704349bd21b: split 1 diff --git a/tests/test-commit-interactive.t b/tests/test-commit-interactive.t --- a/tests/test-commit-interactive.t +++ b/tests/test-commit-interactive.t @@ -1807,3 +1807,38 @@ n 0 -1 unset subdir/f1 $ hg status -A subdir/f1 M subdir/f1 + +Test diff.unified=0 + + $ hg init $TESTTMP/b + $ cd $TESTTMP/b + $ cat > foo < 1 + > 2 + > 3 + > 4 + > 5 + > EOF + $ hg ci -qAm initial + $ cat > foo < 1 + > change1 + > 2 + > 3 + > change2 + > 4 + > 5 + > EOF + $ printf 'y\ny\ny\n' | hg ci -im initial --config diff.unified=0 + diff --git a/foo b/foo + 2 hunks, 2 lines changed + examine changes to 'foo'? [Ynesfdaq?] y + + @@ -1,0 +2,1 @@ 1 + +change1 + record change 1/2 to 'foo'? [Ynesfdaq?] y + + @@ -3,0 +5,1 @@ 3 + +change2 + record change 2/2 to 'foo'? [Ynesfdaq?] y + diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -1609,6 +1609,7 @@ self.headers = [] def addrange(self, limits): +self.addcontext([]) fromstart, fromend, tostart, toend, proc = limits self.fromline = int(fromstart) self.toline = int(tostart) @@ -1629,6 +1630,8 @@ if self.context: self.before = self.context self.context = [] +if self.hunk: +self.addcontext([]) self.hunk = hunk def newfile(self, hdr): To: spectral, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5941: tweakdefault: Add better documentation for ui.tweakdefault(issue6000)
akshjain.jain74 updated this revision to Diff 14050. akshjain.jain74 retitled this revision from "config.txt: Add better documentation for ui.tweakdefault (issue6000)" to "tweakdefault: Add better documentation for ui.tweakdefault (issue6000)". REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5941?vs=14038=14050 REVISION DETAIL https://phab.mercurial-scm.org/D5941 AFFECTED FILES mercurial/help/config.txt CHANGE DETAILS diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt --- a/mercurial/help/config.txt +++ b/mercurial/help/config.txt @@ -2401,6 +2401,13 @@ effect if ``HGPLAIN`` is set or ``HGPLAINEXCEPT`` is set and does not include ``tweakdefaults``. (default: False) +It is a way to opt-in to what the community has decided +is the "best" default experience for Mercurial. + +It greps our current directory instead of grepping every filelog +at all revisions and reportin g the highest filelog revision that matches. + + It currently means:: .. tweakdefaultsmarker To: akshjain.jain74, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5941: config.txt: Add better documentation for ui.tweakdefault(issue6000)***config.txt: Add better documentation for ui.tweakdefault(issue6000)
akshjain.jain74 updated this revision to Diff 14038. akshjain.jain74 retitled this revision from "config.txt: Add better documentation for ui.tweakdefault (issue6000)" to "config.txt: Add better documentation for ui.tweakdefault (issue6000) *** config.txt: Add better documentation for ui.tweakdefault (issue6000)". REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5941?vs=14037=14038 REVISION DETAIL https://phab.mercurial-scm.org/D5941 AFFECTED FILES mercurial/help/config.txt CHANGE DETAILS diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt --- a/mercurial/help/config.txt +++ b/mercurial/help/config.txt @@ -2401,6 +2401,13 @@ effect if ``HGPLAIN`` is set or ``HGPLAINEXCEPT`` is set and does not include ``tweakdefaults``. (default: False) +It is a way to opt-in to what the community has decided +is the "best" default experience for Mercurial + +It greps our current directory instead of grepping every filelog +at all revisions and reporting the highest filelog revision that matches. + + It currently means:: .. tweakdefaultsmarker To: akshjain.jain74, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5941: config.txt: Add better documentation for ui.tweakdefault(issue6000)
akshjain.jain74 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5941 AFFECTED FILES mercurial/help/config.txt CHANGE DETAILS diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt --- a/mercurial/help/config.txt +++ b/mercurial/help/config.txt @@ -2401,9 +2401,13 @@ effect if ``HGPLAIN`` is set or ``HGPLAINEXCEPT`` is set and does not include ``tweakdefaults``. (default: False) +It is a way to opt-in to what the community has decided +is the "best" default experience for Mercurial + It greps our current directory instead of grepping every filelog at all revisions and reporting the highest filelog revision that matches. + It currently means:: .. tweakdefaultsmarker To: akshjain.jain74, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel