Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change default branch when using arc diff?

The first time I used arc diff to submit a branch, it asked me which branch to compare changes to. I entered origin/master. This compares it to all the changes that have been made to the Master branch. Now it always uses the Master to compare it to which I want to change to origin/develop.

I was wondering if there was a way to change the default branch somehow so instead of using arc diff origin/develop I can just use arc diff.

like image 606
Amit Avatar asked May 28 '14 19:05

Amit


People also ask

What does arc diff do?

In Mercurial, arc diff sends all commits in a range for review. By default, this range is changes between the first non-outgoing parent of any revision in history and the directory state. This is a fancy way of saying "every outgoing change since the last merge".

How do you use ARC patches?

apply changes in a revision to the working copy with arc patch. download a patch from Differential with arc export. update Git commit messages after review with arc amend. commit SVN changes with arc commit.


1 Answers

Not sure why this is downvoted, but there are numerous occasions where we intend to create revisions diffed against a different branch.

When you selected origin/master, arc writes this info to a file .git/arc/default-relative-commit.

Edit this file to contain a different relative commit branch to contain,

origin/develop

Your next revisions will get created against the origin/develop branch when you issue arc diff.

You can change it back to origin/master when you need to create revisions off master again.

Hope this helps.

like image 137
vmx Avatar answered Sep 18 '22 08:09

vmx