如何解锁本地mercurial文件?

时间:2010-12-26 17:18:51

标签: linux mercurial

我正在尝试删除锁定文件,但它无效:

ubuntu@ubuntu:/media/My Book/montao$ sudo rm -f .hg/wlock
rm: cannot remove `.hg/wlock': Read-only file system

我既不能用hg提交文件,因为它说hg正在等待锁定。你能推荐一下怎么办?这是mount

的输出
$ mount
aufs on / type aufs (rw)
none on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
/dev/sr1 on /cdrom type iso9660 (ro,noatime)
/dev/loop0 on /rofs type squashfs (ro,noatime)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/ubuntu/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=ubuntu)
/dev/sdc1 on /media/My Book type vfat (rw,nosuid,nodev,uhelper=udisks,uid=999,gid=999,shortname=mixed,dmask=0077,utf8=1,flush)

谢谢

1 个答案:

答案 0 :(得分:1)

一种可能的解决办法(虽然有点蹩脚)可能是:

$ mv .hg .hg-old
$ cp -r .hg-old .hg

然后看看你是否可以移除锁......