Merge pull request #2528 from jordiecometrica/hg-discard

hg: discard changes without changing the current revision
This commit is contained in:
Brian Coca 2016-01-12 09:34:29 -05:00
commit 2a33599698

View file

@ -137,9 +137,7 @@ class Hg(object):
if not before: if not before:
return False return False
args = ['update', '-C', '-R', self.dest] args = ['update', '-C', '-R', self.dest, '-r', '.']
if self.revision is not None:
args = args + ['-r', self.revision]
(rc, out, err) = self._command(args) (rc, out, err) = self._command(args)
if rc != 0: if rc != 0:
self.module.fail_json(msg=err) self.module.fail_json(msg=err)