[PATCH] new extension: localbranch
Guido Ostkamp
hg at ostkamp.fastmail.fm
Wed Aug 29 14:41:28 CDT 2007
Hello,
> It's a very young extension, and probably still very buggy. Feedback is
> appreciated, but please don't store anything vital exclusively in a
> local branch yet.
the 'hg lbranch -d does_not_exist' command reports a "no such file or
directory" error for a directory in the repository storage location.
It would be better to return a simple message.
I suggest to apply the following patch:
diff -r 3c1c8096a3f5 localbranch.py
--- a/localbranch.py Sun Aug 26 14:40:03 2007 -0700
+++ b/localbranch.py Wed Aug 29 21:36:52 2007 +0200
@@ -39,7 +39,8 @@ def reposetup(ui, repo):
if name:
bdir = self.join('branches')
spath = os.path.join(bdir, util.encodefilename(name))
-
+ if not os.path.isdir(spath):
+ raise util.Abort(_('local branch %s not found') % name)
return spath
def localbranches(self):
Regards,
Guido
More information about the Mercurial-devel
mailing list