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:
return False
args = ['update', '-C', '-R', self.dest]
if self.revision is not None:
args = args + ['-r', self.revision]
args = ['update', '-C', '-R', self.dest, '-r', '.']
(rc, out, err) = self._command(args)
if rc != 0:
self.module.fail_json(msg=err)