Page MenuHomePhabricator

Preview what's new in a diff when attaching it to an existing revision
Closed, WontfixPublic

Description

In the arc diff --preview workflow in the "Update Differential Revision" dialog It would be great to have the changes between the most recent diff on the chosen revision and the diff being uploaded. That would help a lot with filling in the "Comments" field. Currently, to figure out these incremental changes, one has to do a git diff between the previously uploaded branch (which might not even be there anymore with the "git commit --amend" workflow) and the branch with the diff currently being uploaded.

Event Timeline

epriestley triaged this task as Normal priority.Apr 7 2012, 4:26 PM

This seems pretty reasonable -- this workflow could use a UI refresh anyway (I'd like to show Dxx numbers in that "attach to.." dropdown, for example).

epriestley added subscribers: durham, Unknown Object (MLST).Sep 4 2013, 3:10 PM

◀ Merged tasks: T3791.

FWIW, been using the following script to do these previews for an svn repo

1#!/bin/bash
2
3set -e
4
5usage ()
6{
7 echo "Usage: arc_preview [ -d Diff ID ]"
8 echo ""
9 echo "Will detect your local arc Diff ID and your local svn repo"
10 echo "to provide a diff of what has changed. This semantically"
11 echo "should tell you what has changed since your last 'arc diff'."
12 echo "If -d is provided, it will be used as the Diff ID rather than"
13 echo "detecting and using your most recent diff."
14 exit 1
15}
16
17diff=""
18while getopts ":d:" opt; do
19 case "$opt" in
20 d) diff=$OPTARG
21 ;;
22 *)
23 usage
24 ;;
25 esac
26done
27
28if [ -z "$diff" ];
29then
30 diff=`arc which | grep -o "D[1-9][0-9]*"`
31fi
32base_checkout=`svn info | grep ^URL | cut -d" " -f2`
33
34if [ -z "$diff" ];
35then
36 echo "Unable to find diff for working directory"
37 exit
38fi
39
40if [ -z "$base_checkout" ];
41then
42 echo "Unable to find svninfo for working directory"
43 exit
44fi
45
46echo "Diff is $diff"
47echo "Base Revision is $base_checkout"
48
49curr_dir=`pwd`
50
51## start with a fresh tmp dir
52tmp_dir=`mktemp -d`
53
54function cleanup {
55 rm -rf $tmp_dir
56}
57
58trap 'cleanup' EXIT
59
60## checkout the base revision and apply the patch
61svn co $base_checkout $tmp_dir --quiet
62cd $tmp_dir
63
64## patch it up and hide some noise
65arc patch --force ${diff} | grep -v "^patching file" |
66 grep -v "^[A|U|D] "
67
68cd $curr_dir
69
70## perform our diff
71diff -ru $tmp_dir $curr_dir --exclude=".svn"

chad changed the visibility from "All Users" to "Public (No Login Required)".Jul 3 2015, 4:40 AM
eadler added a project: Restricted Project.Jun 17 2016, 7:00 AM
eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Jun 17 2016, 7:09 AM
eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Jul 4 2016, 9:19 PM
epriestley claimed this task.

This is five years old, and doesn't meet the requirements of a modern feature request. If you're still interested in this, feel free to start a new discussion on Discourse.