qrebase extension
Gilles Moris
gilles.moris at free.fr
Sat May 10 02:31:58 CDT 2008
On Wed May 7 2008 18:25:27 Gregory Collins wrote:
> That sounds good to me, although from configuring other extensions I was
> expecting something like:
>
> [qrebase]
> backup=True
>
pushed the configuration option at:
http://freehg.org/u/morisgi/qrebase/rev/58d9d6e3786b
excerpt:
@@ -26,6 +44,8 @@
If a revision is specified, no pull will be performed and the queue
will be rebase to this revision. No argument is expected then.
"""
+ # check the backup configuration option
+ backup = ui.configbool('qrebase', 'backup', True)
# check for clean work tree
cmdutil.bail_if_changed(repo)
# check for mq existence
@@ -163,7 +183,10 @@
q.removeundo(repo) # forbid rollback before 1.0
raise util.Abort(_('could not clean up the merge queue'))
# rm -rf patches.N
- shutil.rmtree(newpath)
+ if backup:
+ ui.write(_("\nBackup queue saved to %s\n") % newpath)
+ else:
+ shutil.rmtree(newpath)
# go to the previous patch level
if curpatch:
ui.write(_("\nPushing to %s patch:\n") % (curpatch))
More information about the Mercurial
mailing list