# HG changeset patch # User Bryan O'Sullivan # Date 1186429997 25200 # Node ID c9126c24e0988ca0445bd4e0744d2c0e2f5eb470 # Parent 90be02035993e6f35a0f6f9ddbede55df0903b4e record: work properly if invoked in a subdirectory diff -r 90be02035993 -r c9126c24e098 hgext/record.py --- a/hgext/record.py Mon Aug 06 20:31:15 2007 +0200 +++ b/hgext/record.py Mon Aug 06 12:53:17 2007 -0700 @@ -363,7 +363,7 @@ try: for realname, tmpname in backups.iteritems(): ui.debug('restoring %r to %r\n' % (tmpname, realname)) - util.copyfile(tmpname, realname) + util.copyfile(tmpname, repo.wjoin(realname)) os.unlink(tmpname) os.rmdir(backupdir) except OSError: diff -r 90be02035993 -r c9126c24e098 tests/test-record --- a/tests/test-record Mon Aug 06 20:31:15 2007 +0200 +++ b/tests/test-record Mon Aug 06 12:53:17 2007 -0700 @@ -202,3 +202,15 @@ y EOF echo; hg tip -p + +mkdir subdir +cd subdir +echo a > a +hg ci -d '16 0' -Amsubdir + +echo a >> a +hg record -d '16 0' -m subdir-change a <