Stefan Reichör <[EMAIL PROTECTED]> writes: > How do you import the bzr branch to git? > Is it a one time process or can you update it incrementally?
bzr-fast-export + git-fast-import. It's incremental. The script is
attached. bzr-fast-export is available from the bzr wiki.
Doing the other way (git -> bzr) ought to work with git-fast-export +
bzr-fast-import, but a few quick attempts that I made earlier today
couldn't get bzr-fast-import to work right.
> I think that bzr is sufficient for DVC.
>
> Since the emacs development will also switch to bzr, I think it is a
> worthy goal to further improve the quality of our bzr support. This is
> easier when we keep our repository in bzr.
>
> DVC.el lives from people working with different backends. Better git
> integration is very welcome.
>
> On the other hand: It would be very nice if we could make the
> interoperation between differend revision control systems easier.
That makes sense, and it seems like a good bet to make bzr support solid
in order to future-proof ourselves. Though I really hope that enough
Emacs developers start using git that we can convince Stefan and company
to go with git instead of bzr :^) .
Thinking ahead, even if Emacs used bzr, and we wanted to get DVC into
Emacs, it would not particularly benefit us to use bzr over a different
tool -- the directory structures between the two projects would be too
different. I have a scheme for dealing with that which is VCS-agnostic,
and I'm using it for ERC currently.
> How can I easily apply the patches that you sent to the mailing list
> today? For me it would be best, if you can update your bzr branch.
I'll try again later today to update my bzr branch.
> For the long term it would be nice to recognice and apply various
> patch formats to local checkouts.
Certainly. I could see something like this:
- User sees emailed patch and hits K T a.
- Determine which VCS created the patch.
- Determine working directory.
- Consult general mapping for mailing list to working dir.
- If no mapping is found, ask user for working directory.
- Determine which VCS controls the working directory.
- If they are the same, call the VCS-specific apply tool and done.
- Otherwise:
- Extract log message and patch (in diff -u form).
- Apply patch using "patch" command, piping output to it.
- Bring up a dvc-log-edit buffer with the log message pasted into it
verbatim. Set up buffer-local vars if needed such that a full-tree
commit is achieved when the user hits C-c C-c.
Here's my incremental bzr->git script.
pgpmgmuaL9X0Z.pgp
Description: PGP signature
#!/bin/bash
if test -n "$2"; then
echo "Bad arguments"
exit 1
elif test -n "$1"; then
case "$1" in
dvc-main) ARGS="-b $1 $1" ;;
dvc-dd) ARGS="-b $1 $1" ;;
dvc-moy) ARGS="-b $1 $1" ;;
dvc-mwolson) ARGS="-b $1 $1" ;;
dvc-mwolson-xemacs) ARGS="-b $1 $1" ;;
dvc-sleake) ARGS="-b $1 $1" ;;
dvc-toby_allsopp) ARGS="-b $1 $1" ;;
*)
echo "Unknown branch $1"
exit 1
;;
esac
else
ARGS="dvc-mwolson"
fi
# Constants
BZR_FASTEXPORT=~/.bazaar/plugins/fastimport/exporters/bzr-fast-export.py
MARKS=/stuff/proj/emacs/dvc/marks
# Set to "--export-marks" if this is the first time, "--import-marks"
# otherwise.
if test -f $MARKS.bzr; then
BZR_NPORT=--import-marks
else
BZR_NPORT=--export-marks
fi
if test -f $MARKS.git; then
GIT_NPORT=--import-marks
else
GIT_NPORT=--export-marks
fi
$BZR_FASTEXPORT $BZR_NPORT=$MARKS.bzr $ARGS | \
(cd git-dvc && git-fast-import $GIT_NPORT=$MARKS.git)
-- | Michael Olson | FSF Associate Member #652 | | http://mwolson.org/ | Hobbies: Lisp, HCoop | | Projects: Emacs, Muse, ERC, EMMS, ErBot, DVC, Planner | `-------------------------------------------------------'
_______________________________________________ Dvc-dev mailing list [email protected] https://mail.gna.org/listinfo/dvc-dev
