0

What is the bzr equivalent of

cd ..
rm -fr widelands
git clone url/to/widelands.git

?

After searching for hours yesterday, how to get rid of local changes, I rage quit and did:

$ cd ..
$ rm -fr widelands
$ LANG=C bzr branch lp:widelands # LANG because of the well known not yet fixed bug
Branched 8986 revisions.                                                                                                                                                                                                              
$ cd widelands
$ LANG=C bzr checkout
bzr: ERROR: A control directory already exists: "file:///[...]/widelands/".

???

$ LANG=C bzr remove-tree .

bzr: ERROR: Working tree "[...]/widelands/" has uncommitted changes (See bzr status).

????????????

 $ bzr status
 removed:
   [list of thousands of files]

?????????????????????????????????

$ ls -lA
total 2
drwxr-xr-x 6 root root 2048 Feb 21 15:43 .bzr

According to this page https://wl.widelands.org/wiki/Building%20Widelands/, the steps to get the current development version of widelands is:

bzr branch lp:widelands
cd widelands
bzr checkout
[further steps to compile etc]

And that's basicly, what I tried above.

/edit: I now successfully tried LANG=C bzr revert --no-backup which didn't help me in the old repository before I rage quit, but the question still applies.

Bodo Thiesen
  • 2,476
  • 18
  • 32
  • The "bzr checkout" instruction on that page looks incorrect. There's no need to run that. The "bzr branch" command creates a checkout by default. – jelmer Feb 22 '19 at 06:56

1 Answers1

0

If what you're trying to do is remove the existing clone and create a new one, then the equivalent in bzr is:

$ cd ..
$ rm -fr widelands
$ bzr branch lp:widelands widelands

If you're trying to get rid of pending changes in the current control directory (i.e. git reset --hard), then bzr revert is what you're after.

jelmer
  • 2,405
  • 14
  • 27
  • ```bzr branch lp:widelands widelands``` is basicly what I tried, just the last argument was omitted, but it branched into that dir anyways. I'll test around in a few days about this again maybe with a smaller repo. Oh, and the ```bzr revert``` didn't work in the old repo, that's why I just deleted it in the first place, the changes were not worth any conflict resolving but I got in a state, where I didn't know how to just get to dev head and no google search helped either. All I found just assumed you want to keep your changes. – Bodo Thiesen Feb 24 '19 at 00:56