##// END OF EJS Templates
effectflag: detect when branch changed...
Boris Feld -
r34419:57980af7 default
parent child Browse files
Show More
@@ -311,6 +311,7 EFFECTFLAGFIELD = "ef1"
311 DESCCHANGED = 1 << 0 # action changed the description
311 DESCCHANGED = 1 << 0 # action changed the description
312 USERCHANGED = 1 << 4 # the user changed
312 USERCHANGED = 1 << 4 # the user changed
313 DATECHANGED = 1 << 5 # the date changed
313 DATECHANGED = 1 << 5 # the date changed
314 BRANCHCHANGED = 1 << 6 # the branch changed
314
315
315 def geteffectflag(relation):
316 def geteffectflag(relation):
316 """ From an obs-marker relation, compute what changed between the
317 """ From an obs-marker relation, compute what changed between the
@@ -333,6 +334,10 def geteffectflag(relation):
333 if changectx.date() != source.date():
334 if changectx.date() != source.date():
334 effects |= DATECHANGED
335 effects |= DATECHANGED
335
336
337 # Check if branch has changed
338 if changectx.branch() != source.branch():
339 effects |= BRANCHCHANGED
340
336 return effects
341 return effects
337
342
338 def getobsoleted(repo, tr):
343 def getobsoleted(repo, tr):
@@ -65,7 +65,7 amend touching the branch only
65 check result
65 check result
66
66
67 $ hg debugobsolete --rev .
67 $ hg debugobsolete --rev .
68 bd3db8264ceebf1966319f5df3be7aac6acd1a8e 14a01456e0574f0e0a0b15b2345486a6364a8d79 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'amend', 'user': 'test'}
68 bd3db8264ceebf1966319f5df3be7aac6acd1a8e 14a01456e0574f0e0a0b15b2345486a6364a8d79 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '64', 'operation': 'amend', 'user': 'test'}
69
69
70 $ hg up default
70 $ hg up default
71 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
71 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
@@ -106,7 +106,7 amend with multiple effect (desc and met
106 check result
106 check result
107
107
108 $ hg debugobsolete --rev .
108 $ hg debugobsolete --rev .
109 fad47e5bd78e6aa4db1b5a0a1751bc12563655ff a94e0fd5f1c81d969381a76eb0d37ce499a44fae 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '49', 'operation': 'amend', 'user': 'test'}
109 fad47e5bd78e6aa4db1b5a0a1751bc12563655ff a94e0fd5f1c81d969381a76eb0d37ce499a44fae 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '113', 'operation': 'amend', 'user': 'test'}
110
110
111 rebase not touching the diff
111 rebase not touching the diff
112 ----------------------------
112 ----------------------------
General Comments 0
You need to be logged in to leave comments. Login now