diff mercurial/debugcommands.py @ 32745:23734c0e361f

debugcommands: issue warning when repo has secret changesets (issue5589) This seems like a prudent thing to do. As the inline comment says, we may want to make this abort once the functionality is stabilized as part of `hg bundle`. Let's save that debate for another day.
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 09 Jun 2017 10:42:19 -0700
parents 3ef319e9505f
children f78d210f599d
line wrap: on
line diff
--- a/mercurial/debugcommands.py	Fri Jun 09 10:41:13 2017 -0700
+++ b/mercurial/debugcommands.py	Fri Jun 09 10:42:19 2017 -0700
@@ -47,6 +47,7 @@
     lock as lockmod,
     merge as mergemod,
     obsolete,
+    phases,
     policy,
     pvec,
     pycompat,
@@ -421,6 +422,12 @@
     Stream bundles are special bundles that are essentially archives of
     revlog files. They are commonly used for cloning very quickly.
     """
+    # TODO we may want to turn this into an abort when this functionality
+    # is moved into `hg bundle`.
+    if phases.hassecret(repo):
+        ui.warn(_('(warning: stream clone bundle will contain secret '
+                  'revisions)\n'))
+
     requirements, gen = streamclone.generatebundlev1(repo)
     changegroup.writechunks(ui, gen, fname)