Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 20987:298c9f346dde
commit: use revlog.commonancestors instead of .ancestor
This do probably not make any real difference but is slightly more correct and
we would like to get rid of flog.ancestor.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Mon, 07 Apr 2014 23:17:51 +0200 |
parents | 37cdf1fca1b2 |
children | 6c383c871fdb |
comparison
equal
deleted
inserted
replaced
20986:6ae0c41e4b52 | 20987:298c9f346dde |
---|---|
1152 | 1152 |
1153 elif fparent1 == nullid: | 1153 elif fparent1 == nullid: |
1154 fparent1, fparent2 = fparent2, nullid | 1154 fparent1, fparent2 = fparent2, nullid |
1155 elif fparent2 != nullid: | 1155 elif fparent2 != nullid: |
1156 # is one parent an ancestor of the other? | 1156 # is one parent an ancestor of the other? |
1157 fparentancestor = flog.ancestor(fparent1, fparent2) | 1157 fparentancestors = flog.commonancestors(fparent1, fparent2) |
1158 if fparentancestor == fparent1: | 1158 if fparent1 in fparentancestors: |
1159 fparent1, fparent2 = fparent2, nullid | 1159 fparent1, fparent2 = fparent2, nullid |
1160 elif fparentancestor == fparent2: | 1160 elif fparent2 in fparentancestors: |
1161 fparent2 = nullid | 1161 fparent2 = nullid |
1162 | 1162 |
1163 # is the file changed? | 1163 # is the file changed? |
1164 if fparent2 != nullid or flog.cmp(fparent1, text) or meta: | 1164 if fparent2 != nullid or flog.cmp(fparent1, text) or meta: |
1165 changelist.append(fname) | 1165 changelist.append(fname) |