Details
Details
- Reviewers
indygreg - Group Reviewers
hg-reviewers - Commits
- rHGe930df0f9a55: absorb: use ui.debug() instead of open-coding it
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
| indygreg |
| hg-reviewers |
| Lint Skipped |
| Unit Tests Skipped |
| Path | Packages | |||
|---|---|---|---|---|
| M | hgext/absorb.py (3 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| Augie Fackler | Aug 1 2018, 6:29 PM |
| interestingpaths = match.files() | interestingpaths = match.files() | ||||
| else: | else: | ||||
| interestingpaths = self.status.modified | interestingpaths = self.status.modified | ||||
| # prepare the filefixupstate | # prepare the filefixupstate | ||||
| seenfctxs = set() | seenfctxs = set() | ||||
| # sorting is necessary to eliminate ambiguity for the "double move" | # sorting is necessary to eliminate ambiguity for the "double move" | ||||
| # case: "hg cp A B; hg cp A C; hg rm A", then only "B" can affect "A". | # case: "hg cp A B; hg cp A C; hg rm A", then only "B" can affect "A". | ||||
| for path in sorted(interestingpaths): | for path in sorted(interestingpaths): | ||||
| if self.ui.debugflag: | self.ui.debug('calculating fixups for %s\n' % path) | ||||
| self.ui.write(_('calculating fixups for %s\n') % path) | |||||
| targetfctx = targetctx[path] | targetfctx = targetctx[path] | ||||
| fctxs, ctx2fctx = getfilestack(self.stack, path, seenfctxs) | fctxs, ctx2fctx = getfilestack(self.stack, path, seenfctxs) | ||||
| # ignore symbolic links or binary, or unchanged files | # ignore symbolic links or binary, or unchanged files | ||||
| if any(f.islink() or stringutil.binary(f.data()) | if any(f.islink() or stringutil.binary(f.data()) | ||||
| for f in [targetfctx] + fctxs | for f in [targetfctx] + fctxs | ||||
| if not isinstance(f, emptyfilecontext)): | if not isinstance(f, emptyfilecontext)): | ||||
| continue | continue | ||||
| if targetfctx.data() == fctxs[-1].data() and not editopt: | if targetfctx.data() == fctxs[-1].data() and not editopt: | ||||