[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pcvs branch and merge functions

From: Stefan Monnier
Subject: Re: pcvs branch and merge functions
Date: Mon, 02 Aug 2010 15:19:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> I propose adding the branch and merge functionality that I have added
> to pcvs, which can be viewed with 'bzr branch
> lp:~akwm/emacs/pcvs-branch-and-merge'. It simplifies creating a branch

For this kind of size, it's good to include the diff directly in the
email so that we can review it without needing an internet connection
and a bunch of commands.

> Any thoughts?

Here are some comments on your code:

- please try and follow the coding style used in the rest of the code.
  Most obviously: don't put close-parens on their own lines, and avoid
  breaking the 80-columns barrier.
- why cvs-branch-tag-branch-postfix?  I mean if I name the branch "foo",
  I don't want Emacs to rename it to "foo-BRANCH", do I?
- ("\C-m" .    cvs-mode-merge) binds it to RET (since it's the same as
  ^M), which is already used for something else.
- don't use a global var like cvs-branch-name to pass an argument
  from the `interactive' spec to the function's body.  Use an
  actual argument instead.
- I wouldn't bother supporting the case where
  cvs-branch-tag-base-postfix is nil.
- cvs-mode-merge should provide completion of branch names.
  Otherwise you might as well use C-u M-x cvs-mode-update and type
  the -j yourself.
- I think

    (if (and (not (equal branch-tag merge-tag))
             (not (null cvs-branch-tag-merge-postfix)))
        (cvs-mode-run "update" (list "-j" branch-tag) fis)
      (cvs-mode-run "update" (list "-j" branch-tag) fis))

  is equivalent to

    (cvs-mode-run "update" (list "-j" branch-tag) fis))

  BTW.  Maybe an even better option would be to provide completion after
  "-j" and "-r" when you do c-x M-x cvs-mode-update.

- You might be able to move the -MERGE tag automatically by creating
  (at the end of cvs-mode-merge) a special file in the CVS admin dir
  which would hold some info about the result of the merge, and then in
  cvs-mode-commit you can check this file to see if the commit is
  committing the result of the merge or something else.  Maybe the
  simplest way is an empty file, and upon commit you simply ask the user
  (if the file is present) if he's committing that merge.

-- Stefan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]