D4046: absorb: use ui.debug() instead of open-coding it

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Wed Aug 1 22:47:48 UTC 2018


durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4046

AFFECTED FILES
  hgext/absorb.py

CHANGE DETAILS

diff --git a/hgext/absorb.py b/hgext/absorb.py
--- a/hgext/absorb.py
+++ b/hgext/absorb.py
@@ -622,8 +622,7 @@
         # 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".
         for path in sorted(interestingpaths):
-            if self.ui.debugflag:
-                self.ui.write(_('calculating fixups for %s\n') % path)
+            self.ui.debug('calculating fixups for %s\n' % path)
             targetfctx = targetctx[path]
             fctxs, ctx2fctx = getfilestack(self.stack, path, seenfctxs)
             # ignore symbolic links or binary, or unchanged files



To: durin42, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list