comparison mercurial/localrepo.py @ 1706:20b621154e17

Run commit message editor in the repo root (like hooks). This makes the hgeditor script work with hg commit -R path/to/repo
author Thomas Arendsen Hein <thomas@intevation.de>
date Thu, 09 Feb 2006 07:01:23 +0100
parents c21b54f7f7b8
children 33d09f4a6fef
comparison
equal deleted inserted replaced
1705:4b5725a4a0a6 1706:20b621154e17
443 edittext += "\n" + "HG: manifest hash %s\n" % hex(mn) 443 edittext += "\n" + "HG: manifest hash %s\n" % hex(mn)
444 edittext += "".join(["HG: changed %s\n" % f for f in changed]) 444 edittext += "".join(["HG: changed %s\n" % f for f in changed])
445 edittext += "".join(["HG: removed %s\n" % f for f in remove]) 445 edittext += "".join(["HG: removed %s\n" % f for f in remove])
446 if not changed and not remove: 446 if not changed and not remove:
447 edittext += "HG: no files changed\n" 447 edittext += "HG: no files changed\n"
448 # run editor in the repository root
449 olddir = os.getcwd()
450 os.chdir(self.root)
448 edittext = self.ui.edit(edittext) 451 edittext = self.ui.edit(edittext)
452 os.chdir(olddir)
449 if not edittext.rstrip(): 453 if not edittext.rstrip():
450 return None 454 return None
451 text = edittext 455 text = edittext
452 456
453 user = user or self.ui.username() 457 user = user or self.ui.username()