unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Torsten Bronger <bronger@physik.rwth-aachen.de>
To: Dan Nicolaescu <dann@ics.uci.edu>
Cc: 2157@emacsbugs.donarmstrong.com
Subject: bug#2157: 23.0.90; bzr support: vc-diff doesn't work with prefix argument on unchanged files
Date: Tue, 03 Feb 2009 08:48:30 +0100	[thread overview]
Message-ID: <87eiygq7u9.fsf@physik.rwth-aachen.de> (raw)
In-Reply-To: <200902022237.n12MbtsC025843@rodan.ics.uci.edu>

Hallöchen!

Dan Nicolaescu writes:

> [...]
>
> This shows that (vc-working-revision
> "/home/bronger/src/chantal/current/chantal/samples/remote_client/la2chantal.py")
>
> returns nil.  So probably for some reason
> (vc-bzr-working-revision
> "/home/bronger/src/chantal/current/chantal/samples/remote_client/la2chantal.py")
>
> returns nil.  Can you try to debug why that happens?

I removed the interpretation of the meta data and fork a bzr process
always by pruning the routine to:

(defun vc-bzr-working-revision (file)
  ;; Together with the code in vc-state-heuristic, this makes it possible
  ;; to get the initial VC state of a Bzr file even if Bzr is not installed.
  (lexical-let*
      ((rootdir (vc-bzr-root file))
       (branch-format-file (expand-file-name vc-bzr-admin-branch-format-file
                                             rootdir))
       (revhistory-file (expand-file-name vc-bzr-admin-revhistory rootdir))
       (lastrev-file (expand-file-name vc-bzr-admin-lastrev rootdir)))
    (lexical-let*
        ((result (vc-bzr-command-discarding-stderr
                  vc-bzr-program "revno" (file-relative-name file)))
         (exitcode (car result))
         (output (cdr result)))
      (cond
       ((eq exitcode 0) (substring output 0 -1))
       (t nil)))))

This works perfectly, i.e. I see revision numbers always (even for
lightweight checkouts) and it solves this bug.  However, it is a
lazy and provisional solution because it's much less efficient.

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus
                   Jabber ID: torsten.bronger@jabber.rwth-aachen.de






  parent reply	other threads:[~2009-02-03  7:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200903231626.n2NGQlXn010786@godzilla.ics.uci.edu>
2009-02-02 10:04 ` bug#2157: 23.0.90; bzr support: vc-diff doesn't work with prefix argument on unchanged files Torsten Bronger
2009-02-02 20:05   ` Dan Nicolaescu
2009-02-02 20:37     ` Torsten Bronger
2009-02-02 22:37       ` Dan Nicolaescu
2009-02-03  7:35         ` Torsten Bronger
2009-02-04  7:43           ` Dan Nicolaescu
2009-02-04  8:31             ` Torsten Bronger
2009-02-04 15:48               ` Dan Nicolaescu
2009-02-04 17:09                 ` Torsten Bronger
2009-02-03  7:48         ` Torsten Bronger [this message]
2009-03-23 16:35   ` bug#2157: marked as done (23.0.90; bzr support: vc-diff doesn't work with prefix argument on unchanged files) Emacs bug Tracking System

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eiygq7u9.fsf@physik.rwth-aachen.de \
    --to=bronger@physik.rwth-aachen.de \
    --cc=2157@emacsbugs.donarmstrong.com \
    --cc=dann@ics.uci.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).