Antony Lee | 11 Feb 03:44 2014
Picon

Various issues

(First part of the message is re-posted from a previous email that I sent as a non-member and got lost somewhere...)

- Bugs could record local timezone instead of displaying timestamps as +0000.

- Regarding the messages saying that BE crashes on different locales due to strptime failure, I think BE should set the locale to C when serializing timestamps anyways (possibly retranslating them back to the user-defined locale when displaying them to the user), as there is no guarantee that all participants to a project use the same locale.

- I tried to make BE work under Windows (cygwin, to be precise) using a repo first created under Linux, but there is (at least...) an issue with the path separator (entries in id-cache do not match paths constructed with os.path.join/os.path.sep) -- probably some normalization always using posixpath is necessary (after all "/" is a valid pathsep under Windows too).

Best,

Antony
_______________________________________________
Be-devel mailing list
Be-devel <at> bugseverywhere.org
http://void.printf.net/cgi-bin/mailman/listinfo/be-devel
spam | 25 Jan 16:24 2014
Picon

storage of time information is local dependent

Dear All,

I'm completely new to BE, but am very interesting in getting it to work 
as I really like the concept.
I tried the latest release (1.1.1) a few weeks ago, but after getting 
database corruption, I decided to try the latest from git (commit 49808..).

I immediately got problem though, when trying "be init", followed by "be 
new test1":
C:\utv\eget\t>be new test1
ERROR:
'utf8' codec can't decode byte 0xf6 in position 1: invalid start byte
You should set a locale that supports unicode, e.g.
   export LANG=en_US.utf8
See http://docs.python.org/library/locale.html for details

as you can see from my command prompt, I tried this on Windows. 
Win7/64-bit with Swedish locale to be more specific.

After some research, I found the offending part it in 
libbe/util/utility.py, line 105:
RFC_2822_TIME_FMT = "%a, %d %b %Y %H:%M:%S +0000"

this is later used in
def time_to_str(time_val):

I believe that the problem is that on Windows, the C library used by 
python emits an ansi-encoded string. The %a format gives the Swedish 
abbreviation which is "lö" today. Later on, the json serialization has 
problem with this.
My first thought was to try to get a unicode string instead of a more or 
less arbitrary encoded string, but after digging around a little more, I 
found out that the generated string is actually used in the stored database:
C:\utv\eget\t>grep time .be -r
.be/6a36cd03-4a5f-44a0-ba9c-c5bf3dbd7add/bugs/d23969fb-3ae2-4e7e-ac7e-5abec0b1b32a/values: 
"time": "25 jan 2014 15:03:59 +0000"
.be/6a36cd03-4a5f-44a0-ba9c-c5bf3dbd7add/bugs/f4c10efd-d4c2-4fe7-8630-0b8c998eb46d/values: 
"time": "25 jan 2014 13:24:13 +0000"
[I patched the RFC_2822_TIME_FMT format string to get be running, by 
removing the %a]

My main question after the somewhat lengthy explanation is if it really 
is by intention that the serialized format for dates should be locale 
dependent? My guess is that it could cause problem for users running 
different locales, who are accessing the same data? My suggestion would 
be to stick to the offset_since_epoch format (in UTC) for storage, and 
use the formatted version solely for user interaction.

As I'm completely new to BE, I hesitate a little before trying to 
suggest a patch which changes the internal storage format. But if above 
seems like a good idea and maybe if I could get some pointers/ideas from 
someone more experienced with the codebase, I could try to make a fix 
for the above problem.

Sidenote: I see an email on Nov 25, "Crash when showing a bug in a 
different locale", which I suspect could be because of the same problem.

Best Regards,
Jesper
Zunbeltz Izaola | 16 Jan 11:00 2014
Picon

be in git submodules

Dear all,

I am trying to install BE in a git submodule and I have some errors 
(using BE from trunk).

Proyectos/LEBT-HTaccess is a git repository with different things, code, 
documents, ...
Proyectos/LEBT-HTaccess/code/src is a git submodule (a repository in 
itself) where is my code source.
When initializing BE I get the following error:

zunbeltz <at> zunbeltz-VPCF12E1E:~/Proyectos/LEBT-HTaccess/code/src$ be init
'be' programa ez dago instalatuta. Hurrengoa idatz ezazu instalatzeko:
sudo apt-get install bugs-everywhere
zunbeltz <at> zunbeltz-VPCF12E1E:~/Proyectos/LEBT-HTaccess/code/src$ 
~/.local/bin/be init
Traceback (most recent call last):
   File "/home/zunbeltz/.local/bin/be", line 26, in <module>
     sys.exit(libbe.ui.command_line.main())
   File 
"/home/zunbeltz/.local/lib/python2.7/site-packages/libbe/ui/command_line.py", 
line 393, in main
     ret = dispatch(ui, command, args)
   File 
"/home/zunbeltz/.local/lib/python2.7/site-packages/libbe/ui/command_line.py", 
line 305, in dispatch
     ret = ui.run(command, options, args)
   File 
"/home/zunbeltz/.local/lib/python2.7/site-packages/libbe/command/base.py", 
line 590, in run
     return command.run(options, args)
   File 
"/home/zunbeltz/.local/lib/python2.7/site-packages/libbe/command/base.py", 
line 302, in run
     self.status = self._run(**params)
   File 
"/home/zunbeltz/.local/lib/python2.7/site-packages/libbe/command/init.py", 
line 96, in _run
     storage.init()
   File 
"/home/zunbeltz/.local/lib/python2.7/site-packages/libbe/storage/base.py", 
line 195, in init
     return self._init()
   File 
"/home/zunbeltz/.local/lib/python2.7/site-packages/libbe/storage/vcs/base.py", 
line 695, in _init
     self._vcs_add(self._u_rel_path(self.be_dir))
   File 
"/home/zunbeltz/.local/lib/python2.7/site-packages/libbe/storage/vcs/git.py", 
line 343, in _vcs_add
     self._u_invoke_client('add', path)
   File 
"/home/zunbeltz/.local/lib/python2.7/site-packages/libbe/storage/vcs/base.py", 
line 934, in _u_invoke_client
     return self._u_invoke(cl_args, **kwargs)
   File 
"/home/zunbeltz/.local/lib/python2.7/site-packages/libbe/storage/vcs/base.py", 
line 929, in _u_invoke
     return invoke(*args, **kwargs)
   File 
"/home/zunbeltz/.local/lib/python2.7/site-packages/libbe/util/subproc.py", 
line 94, in invoke
     raise CommandError(list_args, status, stdout, stderr)
libbe.util.subproc.CommandError: Command failed (128):
   fatal: This operation must be run in a work tree

while executing
   ['git', 'add', u'.be']

The process has create a .be directory in
Proyectos/LEBT-HTaccess/.git/modules/code

Is this a bug? Should I just install BE in the master repository?

Thanks for your help in advance,

Zunbeltz

--

-- 
Zunbeltz Izaola
anarcat | 29 Nov 18:00 2013
Picon

clean source for jquery.corners

Hi,

As part of re-inclusion of this in the Debian package, a copyright audit
was performed on the source code, and it was found there are minified
jquery source files without the original source (in
interfaces/web/static/scripts/jquery.corners.min.js).

I have been able to track down where this file comes from - it's an old
2008 jquery plugin that almost disappeared off the web. After fiddling
around, I have added the source file (and licenses!) from this location:

https://github.com/ndbroadbent/shell-fm_sinatra/tree/master/dev/jquery-corners-0.3_0/jquery-corners-0.3

I confirmed it's the same source code as:

ht4tps://www.cs.cmu.edu/~aiton/netflix/jquery-corners-0.3/

The licenses are compatible so that's not a problem - the idea here is
to provide the people with the original source for the minified code so
they can study and edit it, in the spirit of free software.

It's also a a requirement for shipping that file at all in Debian so
either we completely remove it, which will probably break that
interface, or we ship with the extra files mentionned above.

So far, I have taken the second route, so that's an extra patch in the
Debian package.

Please consider fixing this upstream.

Thanks!

A.
--

-- 
Le Québec ne rêve plus de devenir une société modèle: voilà son
problème d'environnement.
                        - Pierre Dansereau (1911 - 2011)
_______________________________________________
Be-devel mailing list
Be-devel <at> bugseverywhere.org
http://void.printf.net/cgi-bin/mailman/listinfo/be-devel
Jerome Charaoui | 25 Nov 19:09 2013
Picon

Crash when showing a bug in a different locale

Hi,

I've just started using bugseverywhere on a Debian sid system, but there
seems to be an issue with non-english locales. When I try to do a "be
show" on any bug, I get the following error. I can work around it by
prefixing the "be show" command with LC_ALL="C".

Traceback (most recent call last):
  File "/usr/local/bin/be", line 26, in <module>
    sys.exit(libbe.ui.command_line.main())
  File
"/usr/local/lib/python2.7/dist-packages/libbe/ui/command_line.py", line
393, in main
    ret = dispatch(ui, command, args)
  File
"/usr/local/lib/python2.7/dist-packages/libbe/ui/command_line.py", line
305, in dispatch
    ret = ui.run(command, options, args)
  File "/usr/local/lib/python2.7/dist-packages/libbe/command/base.py",
line 590, in run
    return command.run(options, args)
  File "/usr/local/lib/python2.7/dist-packages/libbe/command/base.py",
line 302, in run
    self.status = self._run(**params)
  File "/usr/local/lib/python2.7/dist-packages/libbe/command/show.py",
line 118, in _run
    with_comments=not params['no-comments'])
  File "/usr/local/lib/python2.7/dist-packages/libbe/command/show.py",
line 186, in output
    lines.append(bug.string(show_comments=with_comments))
  File "/usr/local/lib/python2.7/dist-packages/libbe/bug.py", line 288,
in string
    if self.time == None:
  File "/usr/local/lib/python2.7/dist-packages/libbe/bug.py", line 207,
in _get_time
    self._cached_time = utility.str_to_time(self.time_string)
  File "/usr/local/lib/python2.7/dist-packages/libbe/util/utility.py",
line 162, in str_to_time
    time_val = calendar.timegm(time.strptime(str_time, RFC_2822_TIME_FMT))
  File "/usr/lib/python2.7/_strptime.py", line 467, in _strptime_time
    return _strptime(data_string, format)[0]
  File "/usr/lib/python2.7/_strptime.py", line 325, in _strptime
    (data_string, format))
ValueError: time data u'Sat, 31 Jan 2009 03:02:19 +0000' does not match
format '%a, %d %b %Y %H:%M:%S +0000'

Thanks,

-- Jerome
Ed Keith | 21 Nov 15:07 2013
Picon

problem with be init

I have been looking for a light weight issue tracking system and be look perfect for my needs, however I can
not seem to get it to work.

I am running python 2.7.5 on Mac OS X 10.6.8.

I first pulled the git repository and ran:
python setup.py build
python setup install

when I ran:

be init

I got a lot of errors, so I downloaded and unzipped v. 1.1.1 and did the same to install it but still get the same errors.

new-host:p1 edkeith$ be init
Traceback (most recent call last):
  File "/Users/edkeith/anaconda/bin/be", line 26, in <module>
    sys.exit(libbe.ui.command_line.main())
  File "/Users/edkeith/anaconda/lib/python2.7/site-packages/libbe/ui/command_line.py", line
393, in main
    ret = dispatch(ui, command, args)
  File "/Users/edkeith/anaconda/lib/python2.7/site-packages/libbe/ui/command_line.py", line
305, in dispatch
    ret = ui.run(command, options, args)
  File "/Users/edkeith/anaconda/lib/python2.7/site-packages/libbe/command/base.py", line 590, in run
    return command.run(options, args)
  File "/Users/edkeith/anaconda/lib/python2.7/site-packages/libbe/command/base.py", line 302, in run
    self.status = self._run(**params)
  File "/Users/edkeith/anaconda/lib/python2.7/site-packages/libbe/command/init.py", line 91, in _run
    storage.connect()
  File "/Users/edkeith/anaconda/lib/python2.7/site-packages/libbe/storage/base.py", line 217, in connect
    self._connect()
  File "/Users/edkeith/anaconda/lib/python2.7/site-packages/libbe/storage/vcs/base.py", line
707, in _connect
    self.root()
  File "/Users/edkeith/anaconda/lib/python2.7/site-packages/libbe/storage/vcs/base.py", line
670, in root
    root = self._vcs_root(self.repo)
  File "/Users/edkeith/anaconda/lib/python2.7/site-packages/libbe/storage/vcs/hg.py", line 114,
in _vcs_root
    return self._u_invoke_client('root', cwd=path)
  File "/Users/edkeith/anaconda/lib/python2.7/site-packages/libbe/storage/vcs/hg.py", line 89,
in _u_invoke_client
    if self.version_cmp(1,9) >= 0:
  File "/Users/edkeith/anaconda/lib/python2.7/site-packages/libbe/storage/vcs/base.py", line
574, in version_cmp
    num_part = self.version().split(' ')[0]
AttributeError: 'NoneType' object has no attribute 'split'

Has anyone seen this problem before? Any ideas how to fix it?

Thank you very much,

     -EdK

____________________________________________________________
FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family!
Visit http://www.inbox.com/photosharing to find out more!
Matěj Cepl | 31 Oct 23:11 2013
Picon

Re: [PATCH] Incorrect accquiring bugdir command line argument

On 31/10/13 21:30, W. Trevor King wrote:
> You might want to check your MUA config, since 'git am …' was giving
> me:

My "MUA" in this case was git-send-email(1) ;), and that bad MIME was a
result of my thinking it was "Are you sure" prompt.

Best,

Matěj

--

-- 
http://www.ceplovi.cz/matej/, Jabber: mcepl <at> ceplovi.cz
GPG Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC

Home is where ~/.bashrc is.
   -- from Usenet

_______________________________________________
Be-devel mailing list
Be-devel <at> bugseverywhere.org
http://void.printf.net/cgi-bin/mailman/listinfo/be-devel
Matěj Cepl | 31 Oct 22:47 2013
Picon

requests as a new dependency

Hi,

after couple of hours struggling with using urllib2 to work with GitHub
I have made everything working in 5 minutes with requests
(https://pypi.python.org/pypi/requests/). Although I generally don't
like requirements of libraries outside of the standard library, this
looks really really good (and API is really nice).

What would you think about switching to requests for all our HTTP(S)
needs? I will prepare a patch if there is an agreement.

Best,

Matěj
-- 
http://www.ceplovi.cz/matej/, Jabber: mcepl <at> ceplovi.cz
GPG Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC

In the government of this Commonwealth, the legislative
department shall never exercise the executive and judicial
powers, or either of them: The executive shall never exercise the
legislative and judicial powers, or either of them: The judicial
shall never exercise the legislative and executive powers, or
either of them: to the end it may be a government of laws and not
of men.
    -- John Adams in the Article XXXth of the Constitution of the
       Commonwealth of Massachusetts

_______________________________________________
Be-devel mailing list
Be-devel <at> bugseverywhere.org
http://void.printf.net/cgi-bin/mailman/listinfo/be-devel
Matěj Cepl | 31 Oct 22:06 2013
Picon

[PATCH] Put correct value into the right place.

Add a proper value to the proper place, where we intialize this
variable.

This is still https://gitorious.org/be/be/merge_requests/18 (rebased to
the current master), which I believe should be finammly merged and
merge-request closed, don't you think so?

If you cannot do it, who can?

Best,

Matěj

---
 libbe/command/import_xml.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libbe/command/import_xml.py b/libbe/command/import_xml.py
index fbf456b..f735326 100644
--- a/libbe/command/import_xml.py
+++ b/libbe/command/import_xml.py
 <at>  <at>  -107,7 +107,8  <at>  <at>  class Import_XML (libbe.command.Command):
                 libbe.command.util.bugdir_bug_comment_from_user_id(
                     bugdirs, params['root']))
         else:
-            root_bugdir,root_bug,root_comment = (None, None, None)
+            root_bugdir, root_bug, root_comment = (bugdirs.values()[0],
+                                                   None, None)

         xml = self._read_xml(storage, params)
         version,root_bugdirs,root_bugs,root_comments = self._parse_xml(
--

-- 
1.8.4.1.600.g3d092bf

_______________________________________________
Be-devel mailing list
Be-devel <at> bugseverywhere.org
http://void.printf.net/cgi-bin/mailman/listinfo/be-devel
Matěj Cepl | 31 Oct 11:57 2013
Picon

[PATCH] Incorrect accquiring bugdir command line argument

The calling below seems like a typo to me. How can we index with
a variable which has not been initialized yet?

Best,

Matěj Cepl

Signed-off-by: Matěj Cepl <mcepl <at> redhat.com>
---
 libbe/command/new.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libbe/command/new.py b/libbe/command/new.py
index 6e94e79..33ede50 100644
--- a/libbe/command/new.py
+++ b/libbe/command/new.py
 <at>  <at>  -118,7 +118,7  <at>  <at>  class New (libbe.command.Command):
         storage = self._get_storage()
         bugdirs = self._get_bugdirs()
         if params['bugdir']:
-            bugdir = bugdirs[bugdir]
+            bugdir = bugdirs[params['bugdir']]
         elif len(bugdirs) == 1:
             bugdir = bugdirs.values()[0]
         else:
--

-- 
1.8.4.1.600.g3d092bf

_______________________________________________
Be-devel mailing list
Be-devel <at> bugseverywhere.org
http://void.printf.net/cgi-bin/mailman/listinfo/be-devel
W. Trevor King | 31 Oct 03:32 2013
Picon

Re: debian package patches

On Wed, Oct 30, 2013 at 08:50:11PM -0400, Antoine Beaupré wrote:
> On 2013-10-30 20:23:00, W. Trevor King wrote:
> > On Mon, Oct 28, 2013 at 10:42:31PM -0400, anarcat wrote:
> >> I am working on restoring a recent version of bugs-everywhere in
> >> Debian, and I had to make a few patches to make it work in a
> >> meaningful way.
> >
> > Thanks for the patches, but I'd prefer if you sent future series as
> > separate messages with a cover letter:
> >
> >   $ git format-patch --cover-letter -o debian-fixes origin/master
> >   $ git send-email --to be-devel <at>  debian-fixes/
> >
> > That makes them easier to apply with `git am`.
> 
> Understood. It is difficult because I am not on the mailing list (and
> would prefer not subscribe) so my original mail was queued for
> moderation and never approved until I posted through gmane.org.

Ah, sorry.  Chris Ball maintains the mailing list, so I'm not sure if
I can help you there.

> >> Subject: [PATCH] allow passing the debian layout down to distutils
> >> …
> >> diff --git a/Makefile b/Makefile
> >> index 075fcac..fe6ccba 100644
> >> --- a/Makefile
> >> +++ b/Makefile
> >>  <at>  <at>  -40,7 +40,11  <at>  <at>  endif
> >>  ifdef DESTDIR
> >>  INSTALL_OPTIONS+= "--root=$(DESTDIR)"
> >>  endif
> >> -#INSTALL_OPTIONS?= "--user"
> >> +ifdef LAYOUT
> >> +INSTALL_OPTIONS+= "--install-layout=$(LAYOUT)"
> >> +else
> >> +INSTALL_OPTIONS+= "--user"
> >> +endif
> >
> > To me this looks like whenever you *don't* specify LAYOUT, you're
> > going to end up with '--user' at the end of INSTALL_OPTIONS.  If you
> > just set DESTDIR, that's probably not what you'd expect.
> 
> Well, --user was the default before, so I am not sure what else should
> be done here...

How about using the override directive [1]:

  ifdef DESTDIR
    override INSTALL_OPTIONS += "--root=$(DESTDIR)"
  endif
  INSTALL_OPTIONS ?= "--user"

Then you can invoke make with:

  make INSTALL_OPTIONS=--layout=deb

or

  make INSTALL_OPTIONS=--layout=deb DESTDIR=/usr

in your Debian build.

> >> Generated _version.py
> >> =====================
> >> 
> >> That part of the build system is problematic for the Debian package,
> >> because we can't rely on git to rebuild the package from source.
> >
> > Which is why _version.py is bundled into the released tarballs.  You
> > just need to clear LIBBE_VERSION when you call make to remove the
> > dependency.
> 
> What do you mean "clear LIBBE_VERSION"? Remove the file?

I mean:

  make LIBBE_VERSION=

This variable is how libbe/_version.py is inserted into
GENERATED_FILES and the 'build' prerequisites.  By overriding the
variable from the command line (as above), we turn off _version.py's
autogeneration and build with the _version.py that came with the
tarball.

Cheers,
Trevor

[1]: http://www.gnu.org/software/make/manual/html_node/Override-Directive.html

--

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
_______________________________________________
Be-devel mailing list
Be-devel <at> bugseverywhere.org
http://void.printf.net/cgi-bin/mailman/listinfo/be-devel

Gmane