4

We know that darcs has no special support for internal branches, but http://hub.darcs.net allows to fork a repo, and then track the fork as related to the mainline repo. (The related repos are displayed in the "branches" section on the site.)

What forking does is copying the current state of a repo.

What if I want to branch from an older tag (to continue development from that older state in the new branch)? (And still have the branch/fork be tracked as a related repo under "branches".)

imz -- Ivan Zakharyaschev
  • 4,921
  • 6
  • 53
  • 104

2 Answers2

2

You can fork the repository and then use

ssh hub.darcs.net obliterate <reponame>

to remove patches.

Unfortunately it doesn't currently accept any arguments which makes going back to a tag a bit inconvenient, but it still should be possible.

Ganesh Sittampalam
  • 28,821
  • 4
  • 79
  • 98
  • I didn't even know that it has an ssh interface with commands! – imz -- Ivan Zakharyaschev Mar 29 '15 at 03:41
  • It has to have something, as that's the only way darcs will push patches to it. That makes it natural to add extra things that people can use directly too. – Ganesh Sittampalam Mar 29 '15 at 11:01
  • Not accepting any arguments, of course, makes it quite inconvenient also for another task for an ordinary user: keeping a mirror of a (local) repo at hub.darcs.net in sync. If you have obliterated/amended some patches in your working repo locally, selecting them manually is inconvenient... (A situation like http://bugs.darcs.net/issue2483 , but there it must be possible to solve giving option to `darcs obliterate` as an admin.) – imz -- Ivan Zakharyaschev Jan 09 '16 at 01:16
  • 1
    Generally darcs and its UI are designed around the assumption that it's rare to change history (i.e. obliterate or edit patches) - this isn't an absolute, but the tooling tends not to help much. – Ganesh Sittampalam Jan 09 '16 at 15:00
1

You can also do something like

  • darcs get a local copy of the repo and darcs obliterate -a -t TAG locally (or, darcs get -t TAG ...)

  • delete the hub repo and re-create it (via web, or ssh hub.darcs.net init REPO)

  • darcs push -a.

Simon Michael
  • 2,278
  • 1
  • 18
  • 21