[PATCH 2 of 4] commit: warn when resurrecting a closed changeset

Gilles Moris gilles.moris at free.fr
Sun May 9 15:50:14 CDT 2010


 mercurial/commands.py |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)


# HG changeset patch
# User Gilles Moris <gilles.moris at free.fr>
# Date 1273437726 -7200
# Node ID 3615f282d6f08fb99976b86816ff37c019b8187a
# Parent  9ab8b7dc5065557877d765b4f524ceb9cb1751e3
commit: warn when resurrecting a closed changeset

diff -r 9ab8b7dc5065 -r 3615f282d6f0 mercurial/commands.py
--- a/mercurial/commands.py	Sun May 09 22:37:18 2010 +0200
+++ b/mercurial/commands.py	Sun May 09 22:42:06 2010 +0200
@@ -743,6 +743,11 @@
           (parents[1] == nullrev or len(cl.heads(cl.node(parents[1]))) > 1)):
         ui.status(_('created new head\n'))
 
+    if not opts.get('close_branch'):
+        for r in parents:
+            if repo[r].extra().get('close'):
+                ui.status(_('resurrecting closed changeset %d\n') % r)
+
     if ui.debugflag:
         ui.write(_('committed changeset %d:%s\n') % (rev, hex(node)))
     elif ui.verbose:


More information about the Mercurial-devel mailing list