harmy / boar

Automatically exported from code.google.com/p/boar
0 stars 0 forks source link

Error while reading setprop files #84

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a new repository and a new session
2. Use `setprop` to include files

What is the expected output? What do you see instead?
I expected the specified glob to be added to the include list, but I have an 
error message instead.

$ boar setprop test include -f include.txt
ERROR: You need to specify a repository to operate on. Use the --repo option or 
set $REPO_PATH.

$ boar --repo=../repo setprop test include -f include.txt
ERROR: Problems reading file include.txt: only mode 'rb' allowed

What platform are you using? (Windows XP, Windows 7, Linux, ...)
Ubuntu

What version of Python are you using?
2.7.2+

What version of boar are you using? (Mercurial change id or daily build date)
boar.29-Jul-2012.tar.gz

Please provide any additional information below.

Here you'll find the full list of command issued (in `commands.txt`) as well as 
the files created by these commands.
[link to be added]

I feel like there is something wrong the reading of files on my system, but I 
have no idea where it could come from. `boar status` and `boar ci` works well.

Original issue reported on code.google.com by timcc.pe...@gmail.com on 25 Oct 2012 at 5:13

GoogleCodeExporter commented 9 years ago
(I thought I could edit my initial post to add the link to the files I 
mentionned, but I'll post it as a comment here instead)

https://github.com/pixelastic/sov/tree/master/issues/boar/84

Original comment by timcc.pe...@gmail.com on 25 Oct 2012 at 5:18

GoogleCodeExporter commented 9 years ago
Confirmed. This is an obvious bug. Using the "setprop" command with the "-f" 
will always give this error in the boar.29-Jul-2012 release. 

Original comment by ekb...@gmail.com on 25 Oct 2012 at 7:34

GoogleCodeExporter commented 9 years ago
I cloned the mercurial repo (commit 5db5e7bc60ab) and the issue is also 
present. I'll keep an eye on future commits. Thanks.

Original comment by timcc.pe...@gmail.com on 25 Oct 2012 at 9:18

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 2f40f2503283.

Original comment by ekb...@gmail.com on 25 Oct 2012 at 8:03

GoogleCodeExporter commented 9 years ago
Thanks, this fixed the issue.

But I still need to include to `--repo` option, even if I'm in a dir that is 
already tracked by boar. I mean I can issue `boar status` just fine, but I need 
to add the `--repo` option for `boar setprop`.

Is that the intended behavior ?

Original comment by timcc.pe...@gmail.com on 26 Oct 2012 at 8:30

GoogleCodeExporter commented 9 years ago
Yes, that is actually the intended behaviour. Since the command can have
serious consequences if you apply it to the wrong session, it intentionally
doesn't use the workdir session by default. You can compare that to the
"ls" command that can be used with or without a workdir, but that command
has no side effects if you accidentially execute it in the wrong place.

However, it would be convenient and just as safe to add a flag to apply
the setprop to the workdir session. Alas, there are many similar simple
enhancements that would make Boar a little bit easier to use and should be
implemented at some time. I add a few every now and then, and I'll keep
this one in mind.

Original comment by ekb...@gmail.com on 26 Oct 2012 at 8:44

GoogleCodeExporter commented 9 years ago
Ok, that makes sense. I'm still a bit confused about the "repo" term but I 
guess a bit more practice of boar is all I need to get it.

Thanks.

Original comment by timcc.pe...@gmail.com on 27 Oct 2012 at 9:07