[prev in list] [next in list] [prev in thread] [next in thread]
List: mercurial-devel
Subject: D541: effectflag: detect when diff changed
From: "martinvonz (Martin von Zweigbergk)" <phabricator () mercurial-scm ! org>
Date: 2017-09-30 16:54:32
Message-ID: c6b059d740fe8d0dd05e4645831b0696 () localhost ! localdomain
[Download RAW message or body]
martinvonz added inline comments.
INLINE COMMENTS
> obsutil.py:341
> + """Drop all information but the username and patch"""
> + cleanunk = []
> + for line in hunk.splitlines():
I think this should be "cleanhunk"
> obsutil.py:360
> +
> + This is a first and basic implementation, with many shortcoming.
> + """
I see this as an argument against storing it in the obsmarker. Can we remove all \
shortcomings before it's no longer experimental?
But, as I said before, the feature is experimental, so we have some time to decide \
whether to calculate it at obsmarker creation time or on the fly (possibly with \
caching).
> obsutil.py:370-377
> + left, right = (0, 0)
> + while None not in (left, right):
> + left = _getdifflines(leftdiff)
> + right = _getdifflines(rightdiff)
> +
> + if left != right:
> + return False
I haven't tested this, but I think the following would remove the need for \
_getdifflines():
leftiter = itertools.chain(leftdiff, itertools.repeat(None))
rightiter = itertools.chain(rightdiff, itertools.repeat(None))
while True:
left, right = next(leftiter), next(rightiter)
if left is None and right is None:
return True
if left != right:
return False
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D541
To: lothiraldan, #hg-reviewers
Cc: martinvonz, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic