equal
deleted
inserted
replaced
76 b'filesremoved', |
76 b'filesremoved', |
77 ): |
77 ): |
78 extra.pop(name, None) |
78 extra.pop(name, None) |
79 if repo.changelog._copiesstorage == b'extra': |
79 if repo.changelog._copiesstorage == b'extra': |
80 extra = _extra_with_copies(repo, extra, files) |
80 extra = _extra_with_copies(repo, extra, files) |
|
81 |
|
82 # save the tip to check whether we actually committed anything |
|
83 oldtip = repo.changelog.tiprev() |
81 |
84 |
82 # update changelog |
85 # update changelog |
83 repo.ui.note(_(b"committing changelog\n")) |
86 repo.ui.note(_(b"committing changelog\n")) |
84 repo.changelog.delayupdate(tr) |
87 repo.changelog.delayupdate(tr) |
85 n = repo.changelog.add( |
88 n = repo.changelog.add( |
97 repo.hook( |
100 repo.hook( |
98 b'pretxncommit', throw=True, node=hex(n), parent1=xp1, parent2=xp2, |
101 b'pretxncommit', throw=True, node=hex(n), parent1=xp1, parent2=xp2, |
99 ) |
102 ) |
100 # set the new commit is proper phase |
103 # set the new commit is proper phase |
101 targetphase = subrepoutil.newcommitphase(repo.ui, ctx) |
104 targetphase = subrepoutil.newcommitphase(repo.ui, ctx) |
102 if targetphase: |
105 |
|
106 # prevent unmarking changesets as public on recommit |
|
107 waspublic = oldtip == repo.changelog.tiprev() and not repo[n].phase() |
|
108 |
|
109 if targetphase and not waspublic: |
103 # retract boundary do not alter parent changeset. |
110 # retract boundary do not alter parent changeset. |
104 # if a parent have higher the resulting phase will |
111 # if a parent have higher the resulting phase will |
105 # be compliant anyway |
112 # be compliant anyway |
106 # |
113 # |
107 # if minimal phase was 0 we don't need to retract anything |
114 # if minimal phase was 0 we don't need to retract anything |